Pulling trade info with API
-
Thread created on 20:59:43 - 29/03/22 (2 years ago)|Last replied 21:44:58 - 29/03/22 (2 years ago)So my idea is, to be able to pull item id and quantity out of a trade to calculate a running total. Is there any way to take api's of trades or is this not possible?
-
-
Posted on 21:08:16 - 29/03/22 (2 years ago)Post link copied to clipboard Copy post linkKind of. There is no direct trade api, but you can figure it out using the log api. Good luck with that though xd
-
-
Posted on 21:11:15 - 29/03/22 (2 years ago)Post link copied to clipboard Copy post linkhuh ok that makes sense, can you do that during the trade or only after?
also if u have any ideas as to how would be great? -
-
Posted on 21:24:06 - 29/03/22 (2 years ago)Post link copied to clipboard Copy post linkYou can do that during the trade. As for how to do it, I've not used the activity log a lot myself, but you'd need to use user/log and filter on category ('cat' query param) or type ('log' query param) and filter based on time, in unix seconds ('to' and 'from' query params).
The category and type ids can be found under torn/logcategories and torn/log.... (use api.torn.com, I'm mobile atm). -
-
Posted on 21:41:14 - 29/03/22 (2 years ago)Post link copied to clipboard Copy post linkYou should experiment. I believe you are looking for something like this:21:10:42 - 29/03/22 xxx added 28x Chamois Plushie, 234x Lion Plushie, 141x Nessie Plushie, 9x Red Fox Plushie, 112x Stingray Plushie to a trade with you [view]
-
-
Posted on 21:44:58 - 29/03/22 (2 years ago)Post link copied to clipboard Copy post linkive played around in torns api bit and can see the values ive got to pull, but no idea as to how im gunna go about it yet. Might be time to learn some coding
-