Cryptocurrency trading bot in javascript for Bitfinex, Bitmex, Binance, Bybit ... (public edition)
Crypto Trading Bot
A cryptocurrency trading bot supporting multiple exchanges via CCXT.
Not production ready only basic functionality
Features
- Multi pair support in one instance
- sqlite3 storage for candles, tickers, ...
- Webserver UI with dashboard
- Support for going "Short" and "Long"
- Signal browser dashboard for pairs
- Slack, Telegram and email notification
- Profile-based bot management with strategy execution
- CCXT-based exchange support (100+ exchanges)
Technical stuff and packages
- node.js
- sqlite3
- technicalindicators
- TA-Lib
- CCXT
- Tailwind CSS 4
- Tradingview widgets
How to use
[optional] Preinstall
For building sqlite and indicators libraries (if needed)
sudo apt-get install build-essential
Start
npm install --production
npm start
# or with special port
npm start -- --port=55555
open browser: http://127.0.0.1:8080
Web UI
Dashboard

Trades / Positions / Orders

Manual Orders

Build In Strategies
Common strategy with indicators are inside, which most of the time are not profitable. See some more advanced strategy in the list below
- dip_catcher
- dca_dipper - Long term invest Dollar-Cost Averaging (DCA) Dip Investor Strategy
Custom Strategies
For custom strategies use var/strategies folder.
# simple file structure
var/strategies/your_strategy.js
or wrap strategy into any sub folder depth
var/strategies/mystrategy/mystrategy.js
Signals
Slack

Tests
npm test
Security / Authentication
As the webserver provides just basic auth for access you should combine some with eh a https for public server. Here s simple proxy_pass for nginx.
# /etc/nginx/sites-available/YOURHOST
server {
server_name YOURHOST;
location / { proxy_pass http://127.0.0.1:8080; }
listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/YOURHOST/fullchain.pem; # managed by Certbot sslcertificatekey /etc/letsencrypt/live/YOURHOST/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot }
Setting Up Telegram Bot
First, you'll need to create a bot for Telegram. Just talk to BotFather and follow simple steps until it gives you a token for it. You'll also need to create a Telegram group, the place where you and crypto-trading-bot will communicate. After creating it, add the bot as administrator (make sure to uncheck "All Members Are Admins").
Retrieving Chat IDs
Invite @RawDataBot to your group and get your group id in sended chat id field
Message
โ message_id: 338
โ from
โ โ id: *
โ โ is_bot: false
โ โ first_name: ์ฌ์ด๋
โ โ username:
โ โ language_code: en
โ chat
โ โ id: -1001118554477
โ โ title: Test Group
โ โ type: supergroup
โ date: 1544948900
โ text: A
Look for id: -1001118554477 is your chat id (with the negative sign).
Related Links
Trading Bots Inspiration
Other bots with possible design pattern
- https://github.com/DeviaVir/zenbot
- https://github.com/magic8bot/magic8bot
- https://github.com/askmike/gekko
- https://github.com/freqtrade/freqtrade
- https://github.com/Ekliptor/WolfBot
- https://github.com/andresilvasantos/bitprophet
- https://github.com/kavehs87/PHPTradingBot
- https://github.com/Superalgos/Superalgos
Strategies
Some strategies based on technical indicators for collection some ideas
- https://github.com/freqtrade/freqtrade-strategies
- https://github.com/freqtrade/freqtrade-strategies/tree/master/user_data/strategies/berlinguyinca
- https://github.com/xFFFFF/Gekko-Strategies
- https://github.com/sthewissen/Mynt/tree/master/src/Mynt.Core/Strategies
- https://github.com/Ekliptor/WolfBot/tree/master/src/Strategies
- https://github.com/Superalgos/Strategy-BTC-WeakHandsBuster
- https://github.com/Superalgos/Strategy-BTC-BB-Top-Bounce