MrCHICK Posted July 17 Report Posted July 17 After the new steam update with the ability to reverse trades, I tested the revert system on a trade, but by calling manager.getOffer(), I am getting the same state id 3 (Completed), instead 12 (Rolled Back). This is the history of my trades using https://api.steampowered.com/IEconService/GetTradeHistory/v1 API. You can see how the original trade has been rolled back with status 12, and the other one is the rollback trade, which gave me back the item. And this is the response from manager.getOffer(). The state didnt change and is still 3. Any solutions for this problem? Is there comming a fix for this steam update for node-steam-tradeoffer-manager module? Quote
JVz Posted July 17 Report Posted July 17 could you check same trade using this api endpoint? I assume steam failed to update it. https://api.steampowered.com/IEconService/GetTradeOffer/v1/ Quote
MrCHICK Posted July 17 Author Report Posted July 17 2 hours ago, JVz said: could you check same trade using this api endpoint? I assume steam failed to update it. https://api.steampowered.com/IEconService/GetTradeOffer/v1/ I checked also that API endpoint you mention and still same state id, 3 (Completed). Now I thing that is something from steam, they didnt update properly the system, or they didnt update this endpoint. I think that node-steam-tradeoffer-manager module is also using this endpoint, so may not be a problem from module, but from steam. As a conclusion, the trade state is updated only on trade history API: https://api.steampowered.com/IEconService/GetTradeHistory/v1 Quote
JVz Posted July 17 Report Posted July 17 yep, if you will find other endpoint that will give info about trades on hold let us all know. GetTradeHistory isn't convenient for our use case Quote
MrCHICK Posted July 17 Author Report Posted July 17 18 minutes ago, JVz said: yep, if you will find other endpoint that will give info about trades on hold let us all know. GetTradeHistory isn't convenient for our use case Yes is a bit difficult to use GetTradeHistory, but for the moment this is the only solution, until steam will solve the endpoint. I just implemented GetTradeHistory to track also the rolled back trades (state == 12) and is working. You just have to get the trade history and find that one with your trade id, and you will get the state and the items also. Quote
Dr. McKay Posted July 19 Report Posted July 19 As you've figured out, the actual trade offer stays in the Accepted state, but the underlying trade gets rolled back. steam-tradeoffer-manager doesn't poll GetTradeHistory at all right now, so adding support for detecting these rolled back trades would incur additional requests. I'm still working on thinking of the best way to go about this, but for now I suggest you do your own GetTradeHistory polling. Quote
JVz Posted July 19 Report Posted July 19 Am I trippin or steam added new fields to GetTradeOffer API? eresult: 1 delay_settlement: true Quote
uft Posted July 19 Report Posted July 19 6 hours ago, Dr. McKay said: As you've figured out, the actual trade offer stays in the Accepted state, but the underlying trade gets rolled back. steam-tradeoffer-manager doesn't poll GetTradeHistory at all right now, so adding support for detecting these rolled back trades would incur additional requests. I'm still working on thinking of the best way to go about this, but for now I suggest you do your own GetTradeHistory polling. the trade offer is not updated during the rollback, only trade. Thus, GetTradeStatus with tradeid from GetTradeOffer returns the correct status 12 Quote
Dr. McKay Posted July 19 Report Posted July 19 43 minutes ago, uft said: the trade offer is not updated during the rollback, only trade. Thus, GetTradeStatus with tradeid from GetTradeOffer returns the correct status 12 Yes, that's what I said. Quote
月光下漫步 Posted 13 hours ago Report Posted 13 hours ago (edited) Retrieve time_updated from the Trade Offer API First, use the Steam Trade Offer API to get the time_updated field of the target trade. For example: https://api.steampowered.com/IEconService/GetTradeOffer/v1/?tradeofferid=8301957547&access_token=xx.xx.xx { "response": { "offer": { "tradeofferid": "8301957547", "tradeid": "807950398061201297", "time_updated": 1753501576, ... } } } Use time_updated as the start_after_time parameter to query the Trade History API Next, pass the time_updated value as the start_after_time parameter when calling the Trade History API: GET https://api.steampowered.com/IEconService/GetTradeHistory/v1/?max_trades=1&start_after_time=1753501576&access_token=xxx.xxx.xxx The API response will include the trade information starting from that timestamp: { "response": { "more": true, "trades": [ { "tradeid": "807950398061201297", "time_init": 1753501576, ... }, ... ] } } This method allows you to accurately locate a trade in the trade history using the time_updated value, which is useful for tracking or further processing. Edited 13 hours ago by 月光下漫步 Quote
Dr. McKay Posted 13 hours ago Report Posted 13 hours ago 51 minutes ago, 月光下漫步 said: Retrieve time_updated from the Trade Offer API First, use the Steam Trade Offer API to get the time_updated field of the target trade. For example: https://api.steampowered.com/IEconService/GetTradeOffer/v1/?tradeofferid=8301957547&access_token=xx.xx.xx { "response": { "offer": { "tradeofferid": "8301957547", "tradeid": "807950398061201297", "time_updated": 1753501576, ... } } } Use time_updated as the start_after_time parameter to query the Trade History API Next, pass the time_updated value as the start_after_time parameter when calling the Trade History API: GET https://api.steampowered.com/IEconService/GetTradeHistory/v1/?max_trades=1&start_after_time=1753501576&access_token=xxx.xxx.xxx The API response will include the trade information starting from that timestamp: { "response": { "more": true, "trades": [ { "tradeid": "807950398061201297", "time_init": 1753501576, ... }, ... ] } } This method allows you to accurately locate a trade in the trade history using the time_updated value, which is useful for tracking or further processing. Or you could just use GetTradeStatus which takes a tradeid as input? Quote
月光下漫步 Posted 9 hours ago Report Posted 9 hours ago 3 hours ago, Dr. McKay said: Or you could just use GetTradeStatus which takes a tradeid as input? In GetTradeStatus, even if a trade is rolled back midway, it still returns a success status (3). It has been observed that when using the start_after_time parameter in the GetTradeHistory API, there are still cases where the corresponding tradeid is not returned—approximately 1 out of every 20 trades. Therefore, it’s still necessary to paginate through the results to locate it. Quote
月光下漫步 Posted 8 hours ago Report Posted 8 hours ago 31 minutes ago, 月光下漫步 said: In GetTradeStatus, even if a trade is rolled back midway, it still returns a success status (3). It has been observed that when using the start_after_time parameter in the GetTradeHistory API, there are still cases where the corresponding tradeid is not returned—approximately 1 out of every 20 trades. Therefore, it’s still necessary to paginate through the results to locate it. A previous offer's corresponding tradeid couldn't be found in the trade history API because the previously saved time_updated value was not the latest—it had changed. By using the updated time_updated value, the corresponding tradeid can be found in the trade history. Quote
Dr. McKay Posted 6 hours ago Report Posted 6 hours ago 2 hours ago, 月光下漫步 said: In GetTradeStatus, even if a trade is rolled back midway, it still returns a success status (3). It has been observed that when using the start_after_time parameter in the GetTradeHistory API, there are still cases where the corresponding tradeid is not returned—approximately 1 out of every 20 trades. Therefore, it’s still necessary to paginate through the results to locate it. A trade that's reversed during Trade Protection will go to status 12 in GetTradeHistory and GetTradeStatus. 月光下漫步 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.