Steam has banned bots before for buying and selling e.g. TF2 keys for a profit. I am not responsible if anything happens to your Steam account when using this. For support on a ban, do not contact me, instead contact the Steam Support.
Quick and easy
var WebSteam = ;var MyUser = ;MyUser;
The user class, required for accessing everything else. Setting the
DEBUG environment variable to
SteamClass:User (See debug) you will be able to see all errors and debugging messages. No options are required. Options are:
CookieJar- A WebSteam.CookieJar object. Useful when loading cookies from a JSON file using CookieJar.fromJSON(string)
Username- The Steam Login name.
Currency- The currency integer;
User.Login(Username, Password, SteamGuardCode, Callback)
Logs the user in using the given credentials.
Usernameis the username you use to login on Steam.
Passwordis the password, which has to be Base64 encoded.
SteamGuardCodeis the Steam Guard code, which you receive in your inbox after a failed (code 2) login.
Callback(err, code)is the callback after the function is done logging in or has failed. Possible codes are:
0- You are already logged in, your cookie jar contains a session which is still valid.
1- You are now logged in.
2- Either your Steam Guard code is invalid, or you didn't give one but is required.
3- The login returned with a readable error message, check
4- An unknown error has shown up, check
Your Steam Community ID (steamcommunity.com/id/example) is not set after the Login, you need to call this before accessing
Callback(err, id)is called when it has found the username or has failed to (
err). If it can't find the ID,
Because, just like the Steam Community ID,
User.SessionID is not set yet, you need to call this. This tries to retrieve the Session ID from the CookieJar. The function returns a bool, which is either
true if it has successfully found it, or
false if it failed to do so.
Gets the missing cards for crafting a badge from the Game
AppIDis the App ID which has to have the trading cards feature.
Callback(err, items)is called when it has found the required items or has failed. The items variable is an array that contains the item hashes of the missing cards.
User.rCookieJaris Request's version of the CookieJar (
User.Usernameis the user's login name.
User.SteamCommunityIDis the Steam Community ID. This is empty until
trueif the user is logged in,
User.PublicKeyModis the Public Key Modulus, required for encrypting the password for logging in (SteamEncrypt.js).
User.PublicKeyExpis the Public Key Exponent, idem.
User.SessionIDis the Session ID. See
User.Currencyis the currency the account is using, see above for values. Defaults to
Class for using the market for things like checking items or creating buy orders. Setting the
DEBUG environment variable to
SteamClass:MarketItem (See debug) you will be able to see all errors and debugging messages. Options are:
ItemHash- The item's hash, can be found at the end of the item's url (e.g. steamcommunity.com/market/listings/753/4000-Invasion).
AppID- The App ID, can also be found in the url (e.g. steamcommunity.com/market/listings/753/4000-Invasion)
User- The User (
WebSteam.Userclass) that sees the item.
Finds the price and available amount of the item.
Callback(err, success)is called on success or failure.
successis true on success.
MarketItem.Buy(Amount, Price, Callback)
Creates a buy order for the item.
Amountis the amount of items you want to buy at once.
Priceis the price you pay for this item. Note: this is an integer, this means it cannot have decimals. For e.g. $2.19 use
Callback(err, buyorderid)is called on success or failure.
0if the buy order is not created.
MarketItem.SessionIDis the SessionID, retrieved from
MarketItem.AppIDis the App ID (See
MarketItem.ItemHashis the Item hash (idem)
MarketItem.Priceis the price after
MarketItem.Amountis the amount of items available after
MarketItem.Currencyis the currency, see above.
MarketItem.Useris the User class (