Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 2.08 KB

GETTING-STARTED-MANUALLY.md

File metadata and controls

62 lines (46 loc) · 2.08 KB

Getting started manually

WARNING: This documentation has not been updated for Spat's fork. These were the instructions for the previous version of the trader. So please don't expect any of the below to work, but I'm leaving it here for reference just in case.

Table of contents

  1. Requirements
  2. Installation 📦
  3. Usage ⚡️

Requirements

  • Git (see if it is already installed with the command: git --version)
  • Node.JS (see if it is already installed with the command: npm --version)

Installation 📦

git clone https://github.com/jsappme/node-binance-trader
cd node-binance-trader
npm i --unsafe-perm

Usage ⚡️

Before everything, please review the source code of the JS scripts (server.js, trader.js) and then add your secret data to .env.

To kickstart, just duplicate the .env.example, name it .env and insert your secret values:

cp .env.example .env
$EDITOR .env

Never check in your .env file! It contains your most private information.

This project can be used as a Docker container! Use the docker run commands below, after building the container: docker build -t jsappme/node-binance-trader .

To start the server to save pair data, define strategies and emit trading signals:

npm run server
// or
docker run -d --name node-binance-trader -v "$PWD/.env:/srv/app/.env" -p 4000:4000 jsappme/node-binance-trader npm run server

To start the auto trader to monitor strategies and signals received from the server via the NBT Hub:

Important note: Always make sure to have some BNB available on your corresponding wallet to pay for the fees.

npm run trader
// or
docker run -d --name node-binance-trader -v "$PWD/.env:/srv/app/.env" jsappme/node-binance-trader npm run trader

To backtest strategies using the data recorded by the server:

npm run backtest
// or
docker run -d --name node-binance-trader -v "$PWD/.env:/srv/app/.env" jsappme/node-binance-trader npm run backtest