Jump to content
McKay Development

JVz

Member
  • Posts

    19
  • Joined

  • Last visited

Everything posted by JVz

  1. my bad, I've changed log level of newOffer to debug, and didn't check debug logs
  2. After cs2 trade hold update my bot stopped receiving "newOffer" event for counteroffers
  3. Am I trippin or steam added new fields to GetTradeOffer API? eresult: 1 delay_settlement: true
  4. 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
  5. could you check same trade using this api endpoint? I assume steam failed to update it. https://api.steampowered.com/IEconService/GetTradeOffer/v1/
  6. works fine, dont forget to change logger to console output or logger of your choice and community to your node-steamcommunity instance let tradeOfferAcknowledged = false; const acknowledgeTradeOffer = function(sessionId=null, callback) { try { if (tradeOfferAcknowledged) { const error = new Error('Trade offer has already been acknowledged'); logger.warn('Attempt to acknowledge trade offer that was already acknowledged'); if (callback) callback(error); return; } if (!community) { const error = new Error('Community not initialized'); logger.error('Cannot acknowledge trade offer - community not initialized'); if (callback) callback(error); return; } if (!sessionId) { sessionId = community.getSessionID(); } const options = { uri: 'https://steamcommunity.com/trade/new/acknowledge', method: 'POST', form: { sessionid: sessionId, message: 1 } }; logger.info('Acknowledging trade offer'); community.httpRequest(options, (err, response, body) => { if (err) { logger.error(`Error acknowledging trade offer: ${err}`); if (callback) callback(err); return; } // Check if response indicates success (currently Steam returns [] on success) if (response && response.statusCode === 200) { tradeOfferAcknowledged = true; logger.info(`Trade offer acknowledged successfully. Response: ${body}`); if (callback) callback(null, body); } else { const error = new Error(`Unexpected response from Steam: ${response ? response.statusCode : 'unknown'}`); logger.error(`Failed to acknowledge trade offer: ${error.message}. Response body: ${body}`); if (callback) callback(error); } }, 'acknowledgeTradeOffer'); } catch (error) { logger.error(`Error acknowledging trade offer: ${error}`); if (callback) callback(error); } };
  7. also did anyone find the way to know if item is still protected or trade finalized? Clicking "acknowledge and close" sends post request: url: https://steamcommunity.com//trade/new/acknowledge body: sessionid=YOURSESSIONID&message=1
  8. JVz

    relog wierd behaviour

    Can't find consistent way to reproduce but got same behaviour again. I disabled my relog to let bot reconnect using autorelog Received disconnected event from steam user eresult=3 msg=NoConnection but didn't get error from steam user. 2 hours later still steamID is null. After restarting bot connected just fine
  9. JVz

    relog wierd behaviour

    looks like sometimes client.steamID is null even when steam-user is logged in
  10. My bot checks every 10 minutes for client.steamID property and if its null I'm trying to relog with client.logOn but loggin on produces this errors: client error Error: LogonSessionReplaced steam user error: {"eresult":34} I'm also checking for client.publicIP and it is undefined when steamID is null I was thinking it can be issues with connection, so I've tried to check 5 times with 5 sec intervals before relogging and every time client.publicIP is undefined and client.steamID is null but after that bot relogs just fine with LogonSessionReplaced error, so I assume connection is okay
  11. you should add "useAccessToken": true, to tradeoffermanager constructor
  12. JVz

    Using proxy

    Works fine if I put httpProxy in constructor let client = new SteamUser({"httpProxy": proxyUrl}); thx for help
  13. JVz

    Using proxy

    "steam-user": "^4.12.4" Yes, but after some time community or client can disconnect or socket can hang up, and bot has to do relog, the problem is that disconnect event sometimes doesnt fire so I'm checking if everything is online and ready for trades before creating tradeoffer. Maybe there is a better way to do it?
  14. JVz

    Using proxy

    Hi. I'm using this code: let proxyUrl = "http://" + proxyUser + ":" + proxyPassword + "@" + proxyHost + ":" + proxyPort; let proxifiedRequest = request.defaults({ 'proxy': proxyUrl }); let steamClient = new SteamClient.CMClient(); steamClient.setHttpProxy(proxyUrl); let community = new SteamCommunity({ request: proxifiedRequest }); let client = new SteamUser(steamClient); let manager = new TradeOfferManager({ "steam": client, "community": community, "language": "en", "cancelTime": 120000, "pendingCancelTime": 30000 }); and after loggin in I'm checking IP using this property client.publicIP but it shows my IP withput proxy. Am I missing something here? PS. 1 more unrelated question: how can I check If tradeoffer manger is fully logged in and nothing happened after initial loggin in (nothing disconnected and so on) and it is ready to send trades? Thx in advance
  15. So I gues there is no workaround atm. If so few more question: 1. These offers from "unknownOfferSent" still should always fire event "sentOfferChanged" if they will be accepted/canceled/etc? 2. Seems like these offers ignore "cancelTime" "pendingCancelTime" options of tradeoffer manager because they are not considered as offers created by manager. Is there better way than using setTimeout to implement same behavior as that options?
  16. Sometimes on sending tradeoffer bot will receive error from steam: "There was an error sending your trade offer. Please try again later. (16)" but in 5-60 seconds unknownOfferSent event fires 1-3 times with this exact trade (I triple checked that I create offer only once, with logs too), one of these offers will behave as usual and all others (if there are others) will have status InvalidItems. Usually it happens when steam lags Is it even possible? Or should I look for errors in my code?
  17. Maybe there is some lib that can process tradeoffers and avoids using steam dev API?
  18. You can't send or accept this trade offer because either you can't trade with the other user, or one of the parties in this trade can't send/receive one of the items in the trade. Possible causes: a ) You aren't friends with the other user and you didn't provide a trade token. b ) The trade token was wrong. c) You are trying to send or receive an item for a game in which you or the other user can't trade (e.g. due to a VAC ban). d) You are trying to send an item and the other user's inventory is full for that game.
  19. Hi. I'm using tradeoffer-manager for buying/selling items on OPSkins and few other marketplaces, but lately Valve started to ban my accounts. Usually I have 40-70 trades per day per account. What I need to change to stop receiving bans? Maybe you have some advices what i shouldn't do? Because Valve don't want to tell me what exactly am I doing agains their rules
×
×
  • Create New...