Skip to content
TORNLIFE More

[API] item market

Started by Solumna [2413131] on in Bugs & Issues.

5 replies · 37 views · thread synced · 4 days ago · View on torn.com
About this thread

Posts archived: 6 / 6 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
6
Discussion span
→
People posting
4
Likes on archived posts
0
Posts by staff, officers and moderators
1
Authority score
53 / 100
Historical score
16 / 100
Story score
30 / 100
Engagement score
38 / 100
Solumna [2413131]
hi, i'm newbie trying to make automated spreadsheet to keep track of items that i had buy, not sure if this is the right place, but i saw some post about api too so here it is

i called
https://api.torn.com/market/?selections=itemmarket&key=
and it give me ID, cost, and quantity

is it possible to include [item ID] too?
thanks before
Lugburz [2386297]
The results you see are for item id 1. To query different item IDs, use
https://api.torn.com/market/$ID?selections=itemmarket&key=
Solumna [2413131]
{"itemmarket":[{"ID":89627914,"cost":30,"quantity":1},{"ID":89331094,"cost":245,"quantity":1},{"ID":89331090,"cost":245,"quantity":1},{"ID":89331091,"cost":245,"quantity":1},{"ID":89331087,"cost":245,"quantity":1},{"ID":89331096,"cost":245,"quantity":1}


i got these result, i'm quite sure the ID is the transaction ID, not the item id
Lugburz [2386297]
Those are some kind of market listing IDs, I believe.

I guess the idea behind the results is that the caller knows which item ID it queries so there's no need to duplicate it in the results.
Stewie [1494547]
Yes, you need to add the item ID to the URL to see listings for different items. Doing this, you would already know the item ID, and would be no need to include it.

Also, the numbers you see on the results is the listing IDs.