jeka-kiselyov / kramjah

Crypto Trading Bot In Node.JS
https://t.me/kramjah
GNU Affero General Public License v3.0
38 stars 13 forks source link
bitcoin crypto cryptocurrency ethereum hitbtc hitbtc-api instance-trading telegram trading trading-bot trading-pairs trading-simulation trading-strategy

Kramjah

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.

Kramjah in action photo_2021-03-20_15-22-24

Join Telegram Channel for updates

Installation

Simulation or trade with real money?

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.

Try it in action

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.

Do real trading

Trade over few pairs based on settings.

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.

Trading Window Hotkeys

Important notes

Write your own trading strategy

Want to try other pairs?

Refresh .dat file with real market data

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

Let Kramjah notify you of profits in Telegram?

Want to simulate trading on different time interval?

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.

Want to simulate with different starting balance?

node app.js flashback path/to/file.dat Simple pairsymbol 1 fromTime toTime startBalance

Get statistic on available trading pairs to decide what to trade on

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.