Pulling trade info with API | API Development | TORN

Pulling trade info with API

    • shadowhunter742 [2206992]
    • Role: Civilian
    • Level: 88
    • Posts: 52
    • Karma: 34
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    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?
    • DeKleineKobini [2114440]
    • Role: Committee
    • Level: 100
    • Posts: 3,745
    • Karma: 5,371
    • Last Action: 3 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 21:08:16 - 29/03/22 (2 years ago)
    Post link copied to clipboard Copy post link
    Kind of. There is no direct trade api, but you can figure it out using the log api. Good luck with that though xd
    • shadowhunter742 [2206992]
    • Role: Civilian
    • Level: 88
    • Posts: 52
    • Karma: 34
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 21:11:15 - 29/03/22 (2 years ago)
    Post link copied to clipboard Copy post link

    DeKleineKobini [2114440]

    Kind of. There is no direct trade api, but you can figure it out using the log api. Good luck with that though xd
    huh 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?
    • DeKleineKobini [2114440]
    • Role: Committee
    • Level: 100
    • Posts: 3,745
    • Karma: 5,371
    • Last Action: 3 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 21:24:06 - 29/03/22 (2 years ago)
    Post link copied to clipboard Copy post link

    DeKleineKobini [2114440]

    Kind of. There is no direct trade api, but you can figure it out using the log api. Good luck with that though xd

    shadowhunter742 [2206992]

    huh 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?
    You 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).
    • Ata [2507441]
    • Role: Civilian
    • Level: 100
    • Posts: 3,049
    • Karma: 5,233
    • Last Action: 1 minute
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 21:41:14 - 29/03/22 (2 years ago)
    Post link copied to clipboard Copy post link

    shadowhunter742 [2206992]

    huh 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?
    You 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]
    This is what I see in Activity Log, something similar should probably in Log API. Find that, and you can do whatever you want with it.
    • shadowhunter742 [2206992]
    • Role: Civilian
    • Level: 88
    • Posts: 52
    • Karma: 34
    • Last Action: 1 hour
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 21:44:58 - 29/03/22 (2 years ago)
    Post link copied to clipboard Copy post link

    shadowhunter742 [2206992]

    huh 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?

    Ata [2507441]

    You 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]
    This is what I see in Activity Log, something similar should probably in Log API. Find that, and you can do whatever you want with it.
    ive 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
Reply
Thread Title: