Quick Start
Setp 1 Requirements
Setp 2 Install
run in terminal,
git clone https://github.com/rainfu/xcoin.gitOr, to download directly,
wget https://github.com/rainfu/xcoin/archive/master.tar.gz
tar -xf master.tar.gz
mv xcoin-master xcoinCreate 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.jsto suit your trading habits. - View and edit
conf-future.jsto 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
yarnSome common commands
Get help:
node ./xcoin --helpList all trading strategies:
node ./xcoin strategiesGet your assets on an exchange
node ./xcoin exchange uniswap --balanceRun 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 --paperYou can also use the yarn command directly, both have the same effect
yarn trade pancakeswap --watch-symbols binance.BTC-USDT,ETH-USDt --paperUse 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.jsonFor 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
XCoin