Skip to content

Latest commit

 

History

History
101 lines (66 loc) · 2.38 KB

start.md

File metadata and controls

101 lines (66 loc) · 2.38 KB

Quick Start

Setp 1 Requirements

  • Windows / Linux / macOS 10 (or Docker)
  • Node.js (version 12.0.0 or higher) and MongoDB.

Setp 2 Install

run in terminal,

git clone https://github.com/rainfu/xcoin.git

Or, to download directly,

wget https://github.com/rainfu/xcoin/archive/master.tar.gz
tar -xf master.tar.gz
mv xcoin-master xcoin

Create your security configuration file config/conf-secret-sample.js to config/conf-secret.js:

cp conf --secret-sample.js conf.js
  • Add database, third-party exchange API and other necessary data, security has been seen, please do not provide transfer function in third-party API
  • View and edit conf-base.js to suit your trading habits.
  • View and edit conf-future.js to suit your futures trading habits.
  • If you need to use a separate price update thread, please modify conf-server.js
  • If you need to use PM2 to manage your threads, please view or edit binane.config.js

Initialize the project:

cd xcoin
yarn

Some common commands

Get help:

node ./xcoin --help

List all trading strategies:

node ./xcoin strategies

Get your assets on an exchange

node ./xcoin exchange uniswap --balance

Run XCoin

The following command will simulate two trading pairs of BTC and ETH on Binance Exchange.

node ./xcoin trade binance --watch-symbols binance.BTC-USDT,ETH-USDt --paper

You can also use the yarn command directly, both have the same effect

yarn trade pancakeswap --watch-symbols binance.BTC-USDT,ETH-USDt --paper

Use the --paper flag to decide whether to trade live or paper.

Use the --trade_type flag to identify how the trading bot will trade, including

  • auto automatic trading

  • autoBuy buy automatically

  • autoSell automatically sell

  • manual

Use the --conf flag to identify the configuration file used by the trading robot, which will override the conf-base.js configuration file

The following command will trade the settings under the specified configuration file

yarn trade binance --conf ./data/config/binance/30mf.json

For more transaction parameters that can be brought by the command line, please refer to the commands/trade.js file. All transaction references can be set directly in the config file

yarn trade --help