Any chance for get info about the completed trades?
API Suggestions & Improvements
Any chance for get info about the completed trades?
It's already there, in the logs.
yeah, but its not visible to to see in 1 log, who, what and price.? i can be wrong tho.....
I don't see a reason why not. I will add this to my to-do list!
Thanks.
Suggestion type:
New feature request
What needs to be done:Add API section for faction armory events, instead of just "amrorynews"
Just like for attacks and revives they also have attacks and attacksfull.
Why do you need this:
The armorynews data needs to be parsed. It also means the data is limited to 100 results, instead of 1,000, like attacksfull, which means more API calls are required to get all the required data.
Consider any drawbacks of your suggestion:
None that I can think of.
Example:
(Finally, provide an example of the API change){ "armory": { "ID": { "timestamp": 1726567085, "giver_user_id": 123456,
"receiver_user_id": 123456, "item_id": 105, "item_uid": 10235647895412, "action": "Used" / "Gave" / "Retrieved" / "Donated" / "Loaned" / "Filled", "quantity": 1, },
}
}
Unfortunately, I'm only able to provide news in the same format as they're on the faction page, so this isn't possible to do.
I can look into increasing the limits, but they're probably there for a good reason.
Thanks!
Any chance for get info about the completed trades?
It's already there, in the logs.
yeah, but its not visible to to see in 1 log, who, what and price.? i can be wrong tho.....
I don't see a reason why not. I will add this to my to-do list!
Thanks.
awesome!!! dont wanna rush you but got an idea when this will be a thing?
I might be missing something but it doesn't looks like theres a way to explicitly get a faction's memberlist. I could've sworn there used to be a factions->members selection
This is an issue because two calls are required if you need something like OCs + members (to match player ids with names)
I might be missing something but it doesn't looks like theres a way to explicitly get a faction's memberlist. I could've sworn there used to be a factions->members selection
This is an issue because two calls are required if you need something like OCs + members (to match player ids with names)
in v1, the members are inside faction->basic
in v2, there is an explicit faction->members
@splent in v2 faction->basic, the key "members" is mapped to string, but returns an integer. fixed, thanks!
I might be missing something but it doesn't looks like theres a way to explicitly get a faction's memberlist. I could've sworn there used to be a factions->members selection
This is an issue because two calls are required if you need something like OCs + members (to match player ids with names)
in v1, the members are inside faction->basic
in v2, there is an explicit faction->members
@splent in v2 faction->basic, the key "members" is mapped to string, but returns an integer.fixed, thanks!
Ah, thank you
Suggestion type:
New feature request
What needs to be done:Add API section for faction armory events, instead of just "amrorynews"
Just like for attacks and revives they also have attacks and attacksfull.
Why do you need this:
The armorynews data needs to be parsed. It also means the data is limited to 100 results, instead of 1,000, like attacksfull, which means more API calls are required to get all the required data.
Consider any drawbacks of your suggestion:
None that I can think of.
Example:
(Finally, provide an example of the API change){ "armory": { "ID": { "timestamp": 1726567085, "giver_user_id": 123456,
"receiver_user_id": 123456, "item_id": 105, "item_uid": 10235647895412, "action": "Used" / "Gave" / "Retrieved" / "Donated" / "Loaned" / "Filled", "quantity": 1, },
}
}Unfortunately, I'm only able to provide news in the same format as they're on the faction page, so this isn't possible to do.
I can look into increasing the limits, but they're probably there for a good reason.
Thanks!
But why can we get attacks and revives in better format?
Suggestion type:
New feature request
What needs to be done:Add API section for faction armory events, instead of just "amrorynews"
Just like for attacks and revives they also have attacks and attacksfull.
Why do you need this:
The armorynews data needs to be parsed. It also means the data is limited to 100 results, instead of 1,000, like attacksfull, which means more API calls are required to get all the required data.
Consider any drawbacks of your suggestion:
None that I can think of.
Example:
(Finally, provide an example of the API change){ "armory": { "ID": { "timestamp": 1726567085, "giver_user_id": 123456,
"receiver_user_id": 123456, "item_id": 105, "item_uid": 10235647895412, "action": "Used" / "Gave" / "Retrieved" / "Donated" / "Loaned" / "Filled", "quantity": 1, },
}
}Unfortunately, I'm only able to provide news in the same format as they're on the faction page, so this isn't possible to do.
I can look into increasing the limits, but they're probably there for a good reason.
Thanks!
Does the new faction > news in APIv2 achieve this? I see you mentioned different Armory catagories
Suggestion type:
New feature request
What needs to be done:Add API section for faction armory events, instead of just "amrorynews"
Just like for attacks and revives they also have attacks and attacksfull.
Why do you need this:
The armorynews data needs to be parsed. It also means the data is limited to 100 results, instead of 1,000, like attacksfull, which means more API calls are required to get all the required data.
Consider any drawbacks of your suggestion:
None that I can think of.
Example:
(Finally, provide an example of the API change){ "armory": { "ID": { "timestamp": 1726567085, "giver_user_id": 123456,
"receiver_user_id": 123456, "item_id": 105, "item_uid": 10235647895412, "action": "Used" / "Gave" / "Retrieved" / "Donated" / "Loaned" / "Filled", "quantity": 1, },
}
}Unfortunately, I'm only able to provide news in the same format as they're on the faction page, so this isn't possible to do.
I can look into increasing the limits, but they're probably there for a good reason.
Thanks!Does the new faction > news in APIv2 achieve this? I see you mentioned different Armory catagories
Unfortunately not, they're still just news messages, and there's nothing else beside that data that I could display. There's just a little bit more granularity now, so you could use category "armoryDeposit" to get messages where somebody deposited something and "armoryAction" for everything else, but that's probably still not what you're looking for.
Feel free to play with Swagger a little bit to see how it works:
https://www.torn.com/swagger/index.html#/Faction/get_faction__selections_news
Thanks!
Suggestion type:
New feature request
What needs to be done:Add API section for faction armory events, instead of just "amrorynews"
Just like for attacks and revives they also have attacks and attacksfull.
Why do you need this:
The armorynews data needs to be parsed. It also means the data is limited to 100 results, instead of 1,000, like attacksfull, which means more API calls are required to get all the required data.
Consider any drawbacks of your suggestion:
None that I can think of.
Example:
(Finally, provide an example of the API change){ "armory": { "ID": { "timestamp": 1726567085, "giver_user_id": 123456,
"receiver_user_id": 123456, "item_id": 105, "item_uid": 10235647895412, "action": "Used" / "Gave" / "Retrieved" / "Donated" / "Loaned" / "Filled", "quantity": 1, },
}
}Unfortunately, I'm only able to provide news in the same format as they're on the faction page, so this isn't possible to do.
I can look into increasing the limits, but they're probably there for a good reason.
Thanks!Does the new faction > news in APIv2 achieve this? I see you mentioned different Armory catagories
Unfortunately not, they're still just news messages, and there's nothing else beside that data that I could display. There's just a little bit more granularity now, so you could use category "armoryDeposit" to get messages where somebody deposited something and "armoryAction" for everything else, but that's probably still not what you're looking for.
Feel free to play with Swagger a little bit to see how it works:
https://www.torn.com/swagger/index.html#/Faction/get_faction__selections_news
Thanks!
It's annoying that we have revive data, which is only accessible via the API, but not armory data :(
Suggestion type:
New feature request
What needs to be done:Add API section for faction armory events, instead of just "amrorynews"
Just like for attacks and revives they also have attacks and attacksfull.
Why do you need this:
The armorynews data needs to be parsed. It also means the data is limited to 100 results, instead of 1,000, like attacksfull, which means more API calls are required to get all the required data.
Consider any drawbacks of your suggestion:
None that I can think of.
Example:
(Finally, provide an example of the API change){ "armory": { "ID": { "timestamp": 1726567085, "giver_user_id": 123456,
"receiver_user_id": 123456, "item_id": 105, "item_uid": 10235647895412, "action": "Used" / "Gave" / "Retrieved" / "Donated" / "Loaned" / "Filled", "quantity": 1, },
}
}Unfortunately, I'm only able to provide news in the same format as they're on the faction page, so this isn't possible to do.
I can look into increasing the limits, but they're probably there for a good reason.
Thanks!Does the new faction > news in APIv2 achieve this? I see you mentioned different Armory catagories
Unfortunately not, they're still just news messages, and there's nothing else beside that data that I could display. There's just a little bit more granularity now, so you could use category "armoryDeposit" to get messages where somebody deposited something and "armoryAction" for everything else, but that's probably still not what you're looking for.
Feel free to play with Swagger a little bit to see how it works:
https://www.torn.com/swagger/index.html#/Faction/get_faction__selections_news
Thanks!
It's annoying that we have revive data, which is only accessible via the API, but not armory data :(
Pretty sure it's a technical limitation here, not just blocking access to things for the sake of it.
Stuff like faction news is pulled from a cloud db where I assume it's stored in plaintext and/or html only, no link to the actual items
Add an end point for friends and enemy list.
Suggestion type:
New Feature Request
What needs to be done:
Add a new section to display additional item stats for primary, secondary, melee, temporary and armor items.
Very similar to Torn > Items but include the additional stats that these items carry. I can see this data when I purchase the weapon from Big Als, etc, but it is not available on the API.
e.g. Torn > Equipment
Why do you need this:
I'd like to expand on the weapon comparison I did but this will require a more complex script. I'd also like to include RW bonuses.
However, the first step is to input the data and this can take a very long time.
It would be great if all of the equipment could be retrieved like in torn > education, or specific items using the ID.
Consider any drawbacks of your suggestion:
I can't think of any drawbacks. Except for showing stats for weapons which cannot be bought, such as NPC Loot and holiday items.
Could we add this to the list? Thanks!
Hi,
Suggestion type:
- New feature request
What needs to be done:
add to the "Torn" section of API, a new endpoint for perks, listing perks in the same way as medals, honors
Why do you need this:
I'm trying to make a google sheet that imports my perks from API (this bit works) and compare to a master list of perks (that bit I can't find). I have done this successfully for education, medal and honors, because there is a list in the "Torn" section of the API for those, but not for perks.
The use case is to compare which of the possible perks I have, and plan priorities for which ones I don't have yet to get the next merit for perks
Consider any drawbacks of your suggestion:
None obvious, it is similar to education, medals and honors - provides a master list of all possibilities
Example:
Same format as User/perks but the full list under Torn/perks
{
"faction_perks": [
"+ 10% crime exp and skill gain",
"+ 40 maximum nerve",
"+ 30% jail time reduction",
"+ 50% bust success chance",
"+ 3 bust nerve cost reduction",
"+ 50% drug addiction gain reduction",
"+ 30% drug overdose risk reduction",
"+ 30% drug addiction mitigation and side effects reduction",
"+ 24 hours maximum booster cooldown",
"+ 50% energy gain from energy drinks",
"+ 50% nerve gain from alcohol",
"+ 50% happy gain from candy",
"+ 10 travel item capacity",
"+ 20% rehabilitation cost reduction",
"+ 4% incoming hospital time reduction",
"+ 180 minutes maximum medical cooldown",
"+ 1.0% life regeneration",
"+ 10% medical item effectiveness",
"+ 10% strength gym gains",
"+ 15% speed gym gains",
"+ 17% defense gym gains",
"+ 10% dexterity gym gains"
],
"job_perks": [
"+ 50% awareness"
],
"property_perks": [
"+ Access to airstrip",
"+ 1% life regeneration",
"+ 2% damage",
"+ 2% gym gains"
Suggestion Type:
General improvement
What needs to be done:
Change API error response so that if the selections passed are not valid for the endpoint used, the response is "wrong fields" rather than "Access level of this key is not high enough".
How to replicate:
> Send request to Company endpoint with applications as selection, values are returned as expected
> Send request to User endpoint with applications as selection, error response: "Access level of this key is not high enough"
> send request to User endpoint with test as selection, error response: "wrong fields"
Why is this required:
Better error handling when managing Torn API requests that fail. Easier that this is correct than implementing all possible selections for each end point (which can be subject to change).
Drawbacks:
Can't think of any other than your time/cost and any existing functionality that might rely on the above use case being the current result.
Example:
Instead of:
{
"error": {
"code": 16,
"error": "Access level of this key is not high enough",
},
}
we get:
{
"error": {
"code": 4,
"error": "Wrong fields",
},
}
Thanks,
Dsuttz
Suggestion type:
Minor improvement
What needs to be done:
Add tradable status inside torn->items
Why do you need this:
Currently, there is no API way of telling if an item is tradable or not. In game, there are a handful of ways of telling that, like the send icon in the inventory missing, or the word untradable in a trade/bazaar/item market selection.
Consider any drawbacks of your suggestion:
There is no item where some instances are tradable, but others aren't, so torn->items should be sufficient
As it is an addition, implementing should not break existing projects
It does not give any advantage of knowing this information, except preventing players searching the forums for an hour finding out why they can't just buy a book
Example:
"items": {
"1": {
"name": "Hammer",
"description": "A small, lightweight tool used in the building industry. Can also be used as a weapon.",
"effect": "",
"requirement": "",
"type": "Melee",
"weapon_type": "Clubbing",
"buy_price": 75,
"sell_price": 50,
"market_value": 30,
"circulation": 2342606,
"tradable": true,
"image": "https://www.torn.com/images/items/1/large.png"
}, ...
"871": {
"name": "Bug Swatter",
"description": "This bug swatter is given to those who report serious exploits or bugs which they could have abused for their own gain. The number of these items in circulation gives a good idea of how honest citizens really are.",
"effect": "",
"requirement": "",
"type": "Melee",
"weapon_type": "Slashing",
"buy_price": 0,
"sell_price": 0,
"market_value": 0,
"circulation": 35,
"tradable": false,
"image": "https://www.torn.com/images/items/871/large.png"
}, ...
Suggestion type:
- New feature request
- Minor improvement
What needs to be done:
- Add data from city hall to torn>stats
- Points used/day, points held by faction/users are the ones I'm especially interested in
Why do you need this:
Points are an important facet of the overall economy and a good indicator of how prices of travel items will behave. I track what data is available already, which is how much gets spent on e refills, merits, honors and try to estimate production of points vs plushies/flowers imported to get a sense of how the market will behave. Not having to scrape/manually enter that data would be a huge relief.
Consider any drawbacks of your suggestion:
None that I can think of. The data is already public, and it wouldn't give scripters anymore advantage than other market tracking scripts.
Example:
{
"stats":
{
...
"points_used": number,
"points_held_by_factions": number,
"points_held_by_users": number,
...
}
}
Suggestion type:
- New feature request
- Minor improvement
What needs to be done:- Add data from city hall to torn>stats
- Points used/day, points held by faction/users are the ones I'm especially interested in
Why do you need this:Points are an important facet of the overall economy and a good indicator of how prices of travel items will behave. I track what data is available already, which is how much gets spent on e refills, merits, honors and try to estimate production of points vs plushies/flowers imported to get a sense of how the market will behave. Not having to scrape/manually enter that data would be a huge relief.
Consider any drawbacks of your suggestion:None that I can think of. The data is already public, and it wouldn't give scripters anymore advantage than other market tracking scripts.
Example:
{
"stats":{
...
"points_used": number,
"points_held_by_factions": number,
"points_held_by_users": number,...
}
}
oh, misunderstood
how are they already public, where can I look at that data? Because I don't think that points held by type is stated somewhere
Suggestion type:
- New feature request
- Minor improvement
What needs to be done:- Add data from city hall to torn>stats
- Points used/day, points held by faction/users are the ones I'm especially interested in
Why do you need this:Points are an important facet of the overall economy and a good indicator of how prices of travel items will behave. I track what data is available already, which is how much gets spent on e refills, merits, honors and try to estimate production of points vs plushies/flowers imported to get a sense of how the market will behave. Not having to scrape/manually enter that data would be a huge relief.
Consider any drawbacks of your suggestion:None that I can think of. The data is already public, and it wouldn't give scripters anymore advantage than other market tracking scripts.
Example:
{
"stats":{
...
"points_used": number,
"points_held_by_factions": number,
"points_held_by_users": number,...
}
}oh, misunderstood
how are they already public, where can I look at that data? Because I don't think that points held by type is stated somewhere
They’re here: https://www.torn.com/citystats.php
Under “Points in circulation” option.
Chedburn added this a few days ago, so of course it makes sense to add this to the API as well.
I should be able to squeeze this change into v1 soon.