OPSkins / trade-opskins-api

API docs for trade.opskins.com
41 stars 19 forks source link

Getting wrong trade state #72

Closed skylight-ity closed 6 years ago

skylight-ity commented 6 years ago

I'm sending trade to steamid and console logging response.offer.state every second but nothing is changing even when user accepts the trade, how do I suppose to get the state of the trade?

ha1331 commented 6 years ago

@tuz1k I'm not sure what you mean, but you're supposed to use https://github.com/OPSkins/trade-opskins-api/blob/master/ITrade/GetOffers.md to query the offer(s) state(s).

It's up to you to implement the logic of what trades and how often you want to check the states for. You might also want to implement some kind of manual expiration logic (cancel the trade after it hasn't been accepted after certain period of time) unless you are fine with the trade being active for 2 weeks before opskins will expire the trade. If you don't expire these trades manually, that 2 weeks might become issue if lot of these are left active and you check their state on some specified interval.

ha1331 commented 6 years ago

Relevant issues you might want to track: #30 and #33