Jump to content
McKay Development

Search the Community

Showing results for tags 'node-steam-tradeoffer-manager'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • Releases & Updates
  • Help & Support
    • General
    • Guides
    • node-steam-user
    • node-steamcommunity
    • node-steam-tradeoffer-manager
    • node-steam-session

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Location


Interests

  1. Hay, i cant send Tradeoffer's. My Code is: SteamUser.on('webSession', function(sessionID, cookies) { log('Got the WebSession from the login!'); SteamCommunity.setCookies(cookies); // sets the cookies for steamcommunity manager.setCookies(cookies); // sets the cookies for the trade-offer manager manager.parentalUnlock('....'); var offer = manager.createOffer(tradeurl); // create a new offer offer.addTheirItem({"appid": 730, "contextid": 2, "assetid": "6658188534"}); // add a item offer.send(function(err, status) { // send a offer if (err) { // if it fails log(err + ' ' + status, true); } else { console.log("Offer #" + offer.id + " " + status); } }); }); /* TODO: A WAY TO REFRESH SESSIONS */ This gives me the following Error: [2016:06:22-12:59:42] accountname: Error: HTTP error 403 undefined
  2. Hey Guys, i run into a very simple problem but cant find a solution for it. during my creation process for the trade offer, i run a kind of loop and insert each item single into the trade offer object. the problem behind is, after ive added a item (e.g. a cs:go case) and in a other round of inserting i add the same case again the object "fails" to insert it, since its allready in it. the solution should be to increase the amount of it. and theres where i cant find a solution for, since its not only to increase it to 2.. it could also be 3-xxxx . is there any way to recieve the amount of the item allready in the "offer object" so i can increase this directly or remove the item and insert it with a higher amount then ? p.s. sry for a non nativ english tried my best
  3. So, we all know that error 16 timeout is steam's fault. It doesn't return an offer object, but sometimes (most of the time), the offer does go through. So I have no way of recording the offer in my database. The only thing I could do is take a hash of the itemIDs and store that in my DB and wait for a new offer to come in that matches it. Is this what you guys do? Is there anything else i can do?
  4. Hello, I got a node.js bot from someone on my friendlist. What it does / should do: Instantly accept donations (offers, that don't take anything from my inventory) Ignore every offer that is not a donation (just don't decline it) Decline offers from people who have escrow Send a notification to my smartphone It worked without problems for days on my RaspberryPI. Suddenly, I saw some declined trades and checked my bot. The error log: Bot connected to Steam! Got API key for bot: 792A6EBE693DE91876804BXXXXX Received new offer from 76561198293XXXXXX Accepting offer from 76561198293XXXXXX Sending notification! Received new offer from 765611982934XXXXX Accepting offer from 765611982934XXXXX Sending notification! Received new offer from 76561198292XXXXXX [Error: Not Logged In] Declined cause escrow - 76561198292XXXXXX - undefined - undefined Received new offer from 76561198292XXXXXX [Error: Not Logged In] Declined cause escrow - 76561198292XXXXXX - undefined - undefined Received new offer from 76561198292XXXXXX [Error: Not Logged In] Declined cause escrow - 76561198292XXXXXX - undefined - undefined Received new offer from 76561198292XXXXXX [Error: Not Logged In] Declined cause escrow - 76561198292XXXXXX - undefined - undefined Received new offer from 76561198292XXXXXX [Error: Not Logged In] Declined cause escrow - 76561198292XXXXXX - undefined - undefined Received new offer from 765611982931XXXXX [Error: Not Logged In] Declined cause escrow - 765611982931XXXXX - undefined - undefined Received new offer from 76561198292XXXXXX [Error: Not Logged In] Declined cause escrow - 76561198292XXXXXX - undefined - undefined Received new offer from 765611982934XXXXX [Error: Not Logged In] Declined cause escrow - 765611982934XXXXX - undefined - undefined Received new offer from 765611982934XXXXX [Error: Not Logged In] Declined cause escrow - 765611982934XXXXX - undefined - undefined Received new offer from 765611982934XXXXX [Error: Not Logged In] Declined cause escrow - 765611982934XXXXX - undefined - undefined Received new offer from 765611982934XXXXX [Error: Not Logged In] Declined cause escrow - 765611982934XXXXX - undefined - undefined I greyed out the IDs for privacy reasons. He accepted two offers, then he declined ALL offers from four different accounts. Three tradebots (which belong together with the first two he accepted) and my roommates account, who 100% sure is not on escrow. I am kind of new to JS and SteamBots in general, but I got the feeling, that there is an error in my SteamBot causing it not to be able to read the "daysTheirEscrow" and "daysMyEscrow" variable (they appear to be "undefined" in the error). Here is my Node.JS script: var Pushover = require('node-pushover'); var fs = require('fs'); var util = require('util'); var SteamUser = require('steam-user'); var TradeOfferManager = require('steam-tradeoffer-manager'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var community = new SteamCommunity(); var client = new SteamUser(); var manager = new TradeOfferManager({ "steam": client, "domain": "localhost", "language": "en", }); var ConfirmationChecker = false; var shared_secret = 'x='; var identity_secret = 'x'; var timekey = Math.round(Date.now() / 1000); var code = SteamTotp.generateAuthCode(shared_secret); var logOnOptions = { accountName: 'x', password: 'x', twoFactorCode: code }; var push = new Pushover({ token: "x", user: "x" }); client.logOn(logOnOptions); client.on('loggedOn', function(details) { console.log("Bot connected to Steam!"); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if(err) { console.log(err); process.exit(1); return; } console.log("Got API key for bot: " + manager.apiKey); community.setCookies(cookies); var identity_hashed = identity_secret.toString('base64'); var poll_interval = setInterval( function() { manager.doPoll(); }, 1000); }); }); manager.on('pollData', function(pollData) { fs.writeFile('polldata.json', JSON.stringify(pollData)); }); manager.on('newOffer', function(offer) { var steamID = offer.partner.getSteamID64(); console.log("Received new offer from " + steamID); offer.getEscrowDuration(function(_err, daysTheirEscrow, daysMyEscrow) { if (daysTheirEscrow != 0 || daysMyEscrow != 0 || _err) { offer.decline( function() { console.log('Declined cause escrow - ' + steamID + ' - ' + daysTheirEscrow + ' - ' + daysMyEscrow); }); console.log(_err); } else { if (!offer.itemsToGive.length || steamID == "76561198046273125") { console.log("Accepting offer from " + steamID); console.log("Sending notification!"); var newItemsReceive = []; offer.itemsToReceive.forEach(item => newItemsReceive.push(item.market_hash_name)); push.send("Bot accepted!", offer.message + "\nItem: " + newItemsReceive[0] + " [" + newItemsReceive.length + "]"); offer.accept(); } else { var newItems = []; offer.itemsToReceive.forEach(item => newItems.push(item.market_hash_name)); var newItemsReceive = []; offer.itemsToReceive.forEach(item => newItemsReceive.push(item.market_hash_name)); var newItemsGive = []; offer.itemsToGive.forEach(item => newItemsGive.push(item.market_hash_name)); push.send("New offer!", "Give: " + newItemsGive + "! " + "Receive: " + newItemsReceive + "!"); console.log("Ignoring an offer from " + steamID); } } }); }); community.on('confKeyNeeded', function(tag, callback) { var time = Math.floor(Date.now() / 1000); console.log('Conf Key Needed'); callback(null, time, SteamTotp.generateAuthCode(shared_secret, time, tag)); }); Any help is appreciated! Thank you in advance!
  5. Hi there At first thnx for the awesome wrapper around the steam trade offers! I have encountered an issue with creating tradeoffers, accepting works like a charm! When i try to create and offer, add items to it and send, i don't receive any feedback err and status are undefined. If i log the tradeoffer all is set, what am i missing? Thnx in advance! steam.login(logOnOptions, function(err, sessionID, cookies, steamguard) { if (err) { console.log("Steam login fail: " + err.message); process.exit(1); } fs.writeFile('steamguard.txt', steamguard); console.log("Logged into Steam"); manager.setCookies(cookies, function(err) { if (err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + manager.apiKey); // var inventory = manager.loadUserInventory("*****", 730, 2); // console.log(inventory); var offer = manager.createOffer("****"); offer.addMyItem({"appid": 730, "contextid": 2, "assetid": "6582251698"}); offer.send(function(err, status) { if (err) { console.log("send" + err); } else { console.log("Offer #" + offer.id + " " + status); } console.log(status); console.log('hierheirieirh'); }); }); console.log('testtest'); // Checks and accepts confirmations every 30 seconds steam.startConfirmationChecker(30000, config.identity_secret); });
  6. Hey there, I made a quick code to send a trade offer but the error i got is HTTP error 401 and i don't know how to fix it. The bot is not a limited account. ... var offers = new TradeOfferManager({ steam: client, language: "en", pollInterval: 10000, domain: 'localhost', cancelTime: 300000 }); var code = SteamTotp.generateAuthCode(config.shared_secret); var login_details = { "accountName": config.username, "password": config.password, "twoFactorCode": code }; community.login(login_details, function(err, sessionID, cookies, steamguard) { if (err) { console.log("Steam login fail: " + err.message); process.exit(1); } console.log("Logged into Steam"); offers.setCookies(cookies, function(err) { if (err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + offers.apiKey); }); community.startConfirmationChecker(10000, config.identity_secret); }); client.on('webSession', function (sessionID, cookies) { offers.setCookies(cookies, function (err){ if (err) { console.log('Unable to set trade offer cookies: '+err); process.exit(1); } console.log("Trade offer cookies set. Got API Key: "+offers.apiKey); }); }); var offer = offers.createOffer("xxx"); offer.addTheirItem({"appid": 753, "contextid": 6, "assetid": "1768042517"}); offer.send("", "xxx", function(err, status) { if (err) { console.log(err); } else { console.log("Offer #" + offer.id + " " + status); } });
  7. Hey guys, i'm currently upgrading my system and build a solid bot solution like e.g. csgohunt use. We got this with different bots which accept incomming trades and send them to a payout bot (collect all items) + send the user a offer. But there is still the delay when the trade is pending between accepted and received... on the deposit bot ... So now i'm thinking about something like let the user select the items on a Interface and my bots send them a trade with the specific item ids. In my opinion that would be much faster if i'm right bec the user got the "delay" and not my system. Delay: Tradehistory not available for a while when the items are pending between the user and my account. Anybody got experience if there is a difference between deposit and request a trade? Also is there a difference if i request 50 or 100 items from different users at the same time?
  8. Hi, I made this code to send offer but the problem that I got that error "Error: HTTP error 401" When I using "manager.setCookies" I got the error access denied because my limited account . So I looked for another module "node-steam-tradeoffers" and it's working with "steam-weblogon" and "steam-web-api-key" and it's send the offers from my limited account, but I need to using your module, so I made this code which can make the api key. var Steam = require('steam'); var SteamWebLogOn = require('steam-weblogon'); var getSteamAPIKey = require('steam-web-api-key'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); var fs = require('fs'); //var client = new SteamUser(); var community = new SteamCommunity(); var steamClient = new Steam.SteamClient(); var steamUser = new Steam.SteamUser(steamClient); var steamFriends = new Steam.SteamFriends(steamClient); var steamWebLogOn = new SteamWebLogOn(steamClient, steamUser); var manager = new TradeOfferManager({ "steam": steamClient, // Polling every 30 seconds is fine since we get notifications from Steam "domain": "localhost", // Our domain is example.com "language": "en" // We want English item descriptions }); if (fs.existsSync('polldata.json')) { manager.pollData = JSON.parse(fs.readFileSync('polldata.json')); } steamClient.connect(); steamClient.on('connected', function() { steamUser.logOn({ account_name: '*********', password: '***********', two_factor_code: SteamTotp.generateAuthCode('**********************') }); }); steamClient.on('logOnResponse', function(logonResp) { if (logonResp.eresult == Steam.EResult.OK) { console.log('Logged in!'); steamWebLogOn.webLogOn(function(sessionID, newCookie) { getSteamAPIKey({ sessionID: sessionID, webCookie: newCookie }, function(err, APIKey) { manager.apiKey = APIKey; var offer = manager.createOffer("************"); offer.addMyItem({"appid": 730, "contextid": 2, "assetid": "655530455"}); offer.send(function(err, status) { if (err) { console.log("send" + err); } else { console.log("Offer #" + offer.id + " " + status); } }); }); community.setCookies(newCookie); community.startConfirmationChecker(10000, '*********************************'); }); } });
  9. Hi, i think we could use getReceivedItems like this: manager.getReceivedItems('454115964132273087', function(err, items) { });or its possible to use this method knowing only tradeid?
  10. Hello again... Now i get this follow error on my console: Error: There was an error sending your trade offer. Please try again later. (15) Normal steam error or what?The guy that im trying to trade have only 8 items in inventory, so it cant be full. Thank you.
  11. Hello guys. Sometimes im getting errors with the steambot. The error that i get is on offer.getReceivedItems, that doesnt return array items, so that doesnt regist the name. Already tryed this follow part of code: http://pastebin.com/RFc2KiEd either with true or with nothing sometimes doesnt regist the name.
  12. So I'm quite new to this stuff and I'd like to get some help. I want to make a bot that accepts only certain trade offers, for ex, user put a KB-808 in the trade offer and took 3 scrap(/1 rec) and I want that to be accepted, what I have right now accepts everything, here's the bot: ----------------------------------------- var Steam = require ('steam'); var SteamUser = require('steam-user'); var client = new SteamUser(); var SteamTotp = require('steam-totp'); var fs = require("fs"); var SteamCommunity = require('steamcommunity'); var community = new SteamCommunity(steamClient); var steamClient = new Steam.SteamClient(); var SteamUser = new Steam.SteamUser(steamClient); var SteamFriends = new Steam.SteamFriends(steamClient); var crypto = require('crypto'); var SteamTradeOffers = require('steam-tradeoffers'); var offers = new SteamTradeOffers(); var config; try { config = JSON.parse(fs.readFileSync('./config.json')); } catch (err) { console.log("Error: Unable to parse config.json"); console.log(err); process.exit(1); } client.logOn({ "accountName": config.username, "password": config.password }); var TradeOfferManager = require('steam-tradeoffer-manager'); var manager = new TradeOfferManager({ "community": community, "language": "en", "pollInterval": 1000 }); client.on("webSession", function(steamID, cookies){ manager.setCookies(cookies); community.setCookies(cookies); SteamTotp.steamID = steamID; community.startConfirmationChecker(2500, config.identitySecret) }); manager.on('newOffer', function(offer) { console.log("New offer #" + offer.id + " from " + offer.partner.getSteam3RenderedID()); offer.accept(function(err) { if (err) { console.log("Unable to accept offer: " + err.message); } else { community.checkConfirmations(); // Check for confirmations right after accepting the offer console.log("Offer accepted"); } }); }); manager.on('receivedOfferChanged', function(offer, oldState) { console.log("Offer #" + offer.id + " changed: " + TradeOfferManager.getStateName(oldState) + " -> " + TradeOfferManager.getStateName(offer.state)); if (offer.state == TradeOfferManager.ETradeOfferState.Accepted) { offer.getReceivedItems(function(err, items) { if (err) { console.log("Couldn't get received items: " + err); } else { var names = items.map(function(item) { return item.name; }); console.log("Received: " + names.join(', ')); } }); } }); client.on("loggedOn", function(details) { client.setPersona(Steam.EPersonaState.Online) client.gamesPlayed(440) console.log("Successfully logged onto Steam, APIKey: " + config.apikey) }); client.on("steamGuard", function(domain, callback, lastCodeWrong) { if(lastCodeWrong) { console.log("Last code wrong, retrying"); } var shared_secret = config.sharedsecret; callback(SteamTotp.generateAuthCode(shared_secret)); }); community.on("newConfirmation", function(conf) { conf.respond(Math.floor(Date.now() / 1000), SteamTotp.getConfirmationKey(config.identitysecret,Math.floor(Date.now() / 1000), "allow"), true, function(err){ if(err) { console.log("Confirmation failed: " + err); return; } console.log("Sucessfully confirmed!"); }); }); community.on("confKeyNeeded", function(tag, callback){ var time = Math.floor(Date.now() / 1000); callback(null, time, SteamTotp.getConfirmationKey(config.identitysecret, time, tag)); });
  13. I don't know why but yesterday I have 429 error on all my bots and all my VDS, do somebody know what's happen?
  14. How do i make it so my bot will only accept offers where i am being sent csgo keys for free.
  15. How can i make a trade cancel because i was looking at the offer.expires and idk how to set it just for 5 minutes to expire. Please help. Thanks!
  16. hi, I am getting this error when i send offer via bot with items from bot inventory- There was an error sending your trade offer. Please try again later. (26) But when i send offer again via bot with item from other's inventory- it works perfectly fine. Please help me here as way of sending offer is same in both case except itemstogive and itemstoreceive value in offer.
  17. So im using offer.loadPartnetInventoy and im getting this error /root/node_modules/steam-tradeoffer-manager/node_modules/steamcommunity/components/users.js:292 callback(null, inventory, currency); ^ TypeError: callback is not a function at SteamCommunity.<anonymous> (/root/node_modules/steam-tradeoffer-manager/node_modules/steamcommunity/components/users.js:292:5) at Request._callback (/root/node_modules/steam-tradeoffer-manager/node_modules/steamcommunity/components/http.js:62:14) at Request.self.callback (/root/node_modules/request/request.js:198:22) at emitTwo (events.js:100:13) at Request.emit (events.js:185:7) at Request.<anonymous> (/root/node_modules/request/request.js:1035:10) at emitOne (events.js:95:20) at Request.emit (events.js:182:7) at IncomingMessage.<anonymous> (/root/node_modules/request/request.js:962:12) at emitNone (events.js:85:20)
  18. I am really bad at coding in nodejs because to me its confusing because i know to many languages but do you think i can get an example to work off of for checking this?
  19. Sometimes when I add too many items in one trade offer. When it is complete. pollFailure shows an err:Error: Data temporarily unavailable And normally it doesn't happen in those trade offers with few items. So is there a suggested number?
  20. So im trying to make a withdraw system on my site and i found out assetids change after the trade. So how can i get the new one to store in a database?
  21. Hi, I tried to mess around with the module but didn't manage to get the bot to only accept empty tradeoffers. I want the bot to automatically accept items but never give any. I'd also like the bot to auto-accept these empty trades where it can receive these items but let the regular 1:1, 2:1 etc tradeoffers pending. So that I can accept or decline them manually. Thank you very much for the help !
  22. Hey, we use the tradeoffer manager to let the user deposit on our system. For that we only let them deposit skins and don't take skins from our bot. In this case we check the offer and after accept it we use the getReceivedItems function to recheck the offer + read the item ids. in 70% of the cases all works fine. But on the 30% of cases even if we try it up to 180 times over 12 hours the receivedItems is still 0 But the offer is definitly accepted and the items which was in this trade are on our account. Since we checked it 180 times over 12 hours i don't think there is a error bec steam is down or something. Maybe you've got an idea guys?
×
×
  • Create New...