node-csgo-web-tradebot

How to install this web-based CS:GO trading bot. Download

Contents

  • Requirements
  • Curl / Node / Git
  • Clone Repository
  • Configuration
  • Starting / Stopping
  • Where do I get secrets?

Requirements

Introduction

This tutorial assumes you're going to be using Ubuntu 16.04 x64 LTS and that you know how to connect to your server or VPS using Putty.

Before we start..

The following script is not meant for beginners. It's strongly advised to learn how the code works before using it. SteamApis takes no responsibility for any loss of items.

Requirements
  • Linux, Windows
  • Node.js
  • Git
  • Putty To connect to your machine
  • SteamApis Access to Steam/Inventory and Market/Items endpoints and available funds.

Curl / Node / Git

Update
sudo apt update
Stop Apache & Nginx
sudo systemctl stop apache2 sudo systemctl stop nginx
Curl

Check if you have curl installed by typing curl into the command line. You should see the following if it's installed:

curl: try 'curl --help' or 'curl --manual' for more information

If it's not installed type sudo apt install curl into the command line. Press Y and Enter if it wants you to confirm the installation.

Node.js

We're going to be installing Node from the PPA that's maintained by NodeSource. This is a more up-to-date version of Node.js than the one in official Ubuntu repository.

curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh sudo bash nodesource_setup.sh

The PPA will be added to your configuration and your local package cache will be updated automatically. After running the setup script from nodesource, you can install the Node.js package.

sudo apt install nodejs sudo apt install build-essential
Git
apt install git

Clone Repository

Cloning

In this part we will be cloning the script files to your machine where it'll be running.

cd ~ git clone https://github.com/pepzwee/node-csgo-web-tradebot.git tradebot
Installing dependencies
cd ~/tradebot npm install npm i -g pm2

Configuration

config.js

To run this script you're going to have to edit the config.js file.

vim config.js

If vim is not installed - sudo apt install vim

Press i to edit the file, you can move around with your arrow keys.

What to change?
  • appID If you wish to have a trading site for another Steam game. This is by default set to 730 (CS:GO)
  • contextID Related to the appID. Valve games usually have 2 as the value.
  • accountName Bot username
  • password Bot password
  • twoFactorCode shared_secret value
  • identitySecret identity_secret value
  • steamID64 Bot SteamID64 value
  • steamApiKey API key from: https://steamcommunity.com/dev/apikey
  • SteamApisKey API key from: https://steamapis.com/user/access
  • domain Domain name where the site will be accessible from, example: tradesite.com
  • website Full URL for the website, example: http://tradesite.com

Everything else is optional, change as you see fit.

Once you're done changing the config.js file and wish to save press ESC, SHIFT + Z + Z

Starting / Stopping / Restarting

Running the script

Since we want the script to be running even after we've closed the terminal window we will be using PM2

Starting it for the first time
pm2 start index.js -n "Tradebot"
Start
pm2 start 0
Restart
pm2 restart 0
Stop
pm2 stop 0
Logs (Errors etc..)
pm2 logs 0