1.0.1 • Published 11 months ago

nodesteamtrader v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

NodeSteamTrader

NodeSteamTrader is a tool designed to automate the sending of trade offers on Steam using the Steam Web API. This tool is intended for use with Node.js.

npm version npm downloads

Installation

To install NodeSteamTrader, use npm or yarn:

$ npm install nodesteamtrader
$ yarn add nodesteamtrader

Steam Guard

NodeSteamTrader manages Steam Guard protection. You can pass your Steam Guard code directly when initializing the bot. If you don't use a mobile authenticator, a file will be created in the root folder where the code will be checked every 10 seconds.

this.steamGuardFilePath = 'steam_guard_code.txt';

In both cases, if the code is incorrect, the application will stop working.

Usage

Get inventory

const SteamTradeBot = require('nodesteamtrader');

const bot = new SteamTradeBot('your_steam_username', 'your_steam_password');
// or
const bot = new SteamTradeBot('your_steam_username', 'your_steam_password' "twoFactorCode");


bot.getInventory('steamid64_of_user', 570)  // Dota 2 Example
    .then(inventory => {
        console.log('Inventory:', inventory);
    })
    .catch(error => {
        console.error('Failed to fetch inventory:', error);
    });

Send trade

const SteamTradeBot = require('nodesteamtrader');

const bot = new SteamTradeBot('your_steam_username', 'your_steam_password');
// or
const bot = new SteamTradeBot('your_steam_username', 'your_steam_password' "twoFactorCode");

const itemsToSend = [
    {
        appid: 570, 
        contextid: '2',
        assetid: 'asset_id_of_item'  // ID of the item in your inventory
    },
];
bot.sendTradeOffer('steamid64_of_recipient', itemsToSend, 'Your custom trade message')
    .then(response => {
        console.log('Trade offer response:', response);
    })
    .catch(error => {
        console.error('Failed to send trade offer:', error);
    });

Links

1.0.1

11 months ago

1.0.0

11 months ago