Node.js trading bot application. Simple trading strategy included. Works over HitBTC exchange with any trading pair, but feel free to fork it and change to any exchange, should be relatively simple to.
git clone https://github.com/jeka-kiselyov/kramjah.git
npm install
First, you'd better spend some time optimizing the trading strategy for your needs and vision. Then run "flashback" command to check how successful your strategy would be on historical data. When you are ok with it, run real trading with dotrade
or trade
commands.
Run node app.js flashback data/btcusd2021.dat Simple btcusd 1
to simulate trading over btc/usd pair with Simple trading strategy over historical data.
Order book, History, Trading balance
, Payment information
and Place/cancel orders
access rights..env
file to the application root with content of:
HITBTC_API_KEY=xxxxx
HITBTC_SECRET_KEY=yyyyyy
HITBTC_MODE=market
node app.js dotrade data/btcusd2021.dat Simple btcusd 1
to run trading.No need to remember all symbol-strategies you are trading over. Edit traders
array in settings/settings.js
and run trading over them running node app.js trade
. Use [up] and [down] keys for navigation between traders. Press [p] to pause traders loop for 30 seconds.
node app.js cachecsv path/to/file.csv
node app.js cachecsv path/to/file.csv maxWeeksCount startTimestamp
node app.js testdat path/to/file.dat
node app.js flashback path/to/file.dat Simple pairsymbol 1
For faster initialization, refresh .dat file, run node app.js refreshdat path/to/file.dat pairsymbol
, result file will be saved at path/to/file_updated.dat
TELEGRAM_BOT_TOKEN=xxxxx:xxxx-xxx-xx
with bot token to .env filenode app.js checktelegram
and send another message to the bot while command is runningTELEGRAM_NOTIFY_USER_ID=xxxxx
node app.js trade
command, you can ask bot to check your profits balance. Send /balance
command to it.There's an option:
node app.js flashback path/to/file.dat Simple pairsymbol 1 fromTime toTime
where fromTime and toTime are timestamps. Use something like this to generate needed timestamps.
node app.js flashback path/to/file.dat Simple pairsymbol 1 fromTime toTime startBalance
Run node app.js checkpair
or node app.js checkpair >> report.csv
to write to the file. It will take few hours, but will generate you a report for some statistics over the last 7 days on all available symbols on the marketplace.