{"repo":"Haehnchen/crypto-trading-bot","free":true,"listed":false,"github":"https://github.com/Haehnchen/crypto-trading-bot","clone":"git clone https://github.com/Haehnchen/crypto-trading-bot.git","description":"Cryptocurrency trading bot in javascript for Bitfinex, Bitmex, Binance, Bybit ... (public edition)","language":"TypeScript","stars":3514,"topics":["binance","bitfinex","bitmex","bot","bybit","ccxt","coinbase","crypto","cryptocurrency","docker","exchange","javascript","margin","nodejs","trading","trading-bot","trading-strategies","tradingview","websocket"],"license":"MIT","category":"trading_bot","readme_excerpt":"# Crypto Trading Bot\n\n[![Build Status](https://github.com/Haehnchen/crypto-trading-bot/actions/workflows/node.js.yml/badge.svg)](https://github.com/Haehnchen/crypto-trading-bot/actions/workflows/node.js.yml)\n\nA cryptocurrency trading bot supporting multiple exchanges via [CCXT](https://github.com/ccxt/ccxt).\n\n**Not production ready** only basic functionality\n\n## Features\n\n- Multi pair support in one instance\n- sqlite3 storage for candles, tickers, ...\n- Webserver UI with dashboard\n- Support for going \"Short\" and \"Long\"\n- Signal browser dashboard for pairs\n- Slack, Telegram and email notification\n- Profile-based bot management with strategy execution\n- CCXT-based exchange support (100+ exchanges)\n\n## Technical stuff and packages\n\n- node.js\n- sqlite3\n- [technicalindicators](https://github.com/anandanand84/technicalindicators)\n- [TA-Lib](https://mrjbq7.github.io/ta-lib/)\n- [CCXT](https://github.com/ccxt/ccxt)\n- Tailwind CSS 4\n- Tradingview widgets\n\n## How to use\n\n### [optional] Preinstall\n\nFor building sqlite and indicators libraries (if needed)\n\n```\nsudo apt-get install build-essential\n```\n\n### Start\n\n```\nnpm install --production\nnpm start\n```\n\n```\n# or with special port\n# npm start -- --port=55555\n```\n\n```\nopen browser: http://127.0.0.1:8080\n```\n\n## Web UI\n\n### Dashboard\n\n![Webserver UI](documentation/cryptobot.png 'Webserver UI')\n\n### Trades / Positions / Orders\n\n![Webserver UI](documentation/trades.png 'Trades / Positions / Orders')\n\n### Manual Orders\n\n![Webserver UI](documentation/manual_order.png 'Manual Orders')\n\n## Build In Strategies\n\nCommon strategy with indicators are inside, which most of the time are not profitable. See some more advanced strategy in the list below\n\n- [dip_catcher](src/strategy/strategies/dip_catcher/README.md)\n- [dca_dipper](src/strategy/strategies/dca_dipper/README.md) - **Long term invest** Dollar-Cost Averaging (DCA) Dip Investor Strategy\n\nFind some example strategies inside [src/strategy/strategies](src/strategy/strategies)\n\n## Custom Strategies\n\nFor custom strategies use [var/strategies](var/strategies) folder.\n\n```\n# simple file structure\nvar/strategies/your_strategy.js\n\n# or wrap strategy into any sub folder depth\nvar/strategies/my_strategy/my_strategy.js\n```\n\n## Signals\n\n### Slack\n\n![Webserver UI](documentation/slack_signals.png 'Slack signals')\n\n## Tests\n\n```\nnpm test\n```\n\n### Security / Authentication\n\nAs 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.\n\n```\n# /etc/nginx/sites-available/YOURHOST\nserver {\n    server_name YOURHOST;\n\n    location / {\n        proxy_pass http://127.0.0.1:8080;\n    }\n\n    listen 443 ssl; # managed by Certbot\n    ssl_certificate /etc/letsencrypt/live/YOURHOST/fullchain.pem; # managed by Certbot\n    ssl_certificate_key /etc/letsencrypt/live/YOURHOST/privkey.pem; # managed by Certbot\n    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot\n    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot\n}\n\n```\n\n## Setting Up Telegram Bot\n\nFirst, you'll need to create a bot for Telegram. Just talk to [BotFather](https://telegram.me/botfather) and follow simple steps until it gives you a token for it.\nYou'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\").\n\n### Retrieving Chat IDs\n\nInvite `@RawDataBot` to your group and get your group id in sended chat id field\n\n```text\nMessage\n ├ message_id: 338\n ├ from\n ┊  ├ id: *****\n ┊  ├ is_bot: false\n ┊  ├ first_name: 사이드\n ┊  ├ username: ******\n ┊  └ language_code: en\n ├ chat\n ┊  ├ id: -1001118554477\n ┊  ├ title: Test Group\n ┊  └ type: supergroup\n ├ date: 1544948900\n └ text: A\n```\n\nLook for id: -1001118554477 is your chat id (with the negative sign).\n\n\n## Related Links\n\n### Trading Bots Inspiration\n\nOther bots with possible design pattern\n\n- https://github.com/DeviaVir/zenbot\n- https://github.com/magic8bot/magic8bot\n- https://github.com/askmike/gekko\n- https://github.com/freqtrade/freqtrade\n- https://github.com/Ekliptor/WolfBot\n- https://github.com/andresilvasantos/bitprophet\n- https://github.com/kavehs87/PHPTradingBot\n- https://github.com/Superalgos/Superalgos\n\n### Strategies\n\nSome strategies based on technical indicators for collection some ideas\n\n- https://github.com/freqtrade/freqtrade-strategies\n- https://github.com/freqtrade/freqtrade-strategies/tree/master/user_data/strategies/berlinguyinca\n- https://github.com/xFFFFF/Gekko-Strategies\n- https://github.com/sthewissen/Mynt/tree/master/src/Mynt.Core/Strategies\n- https://github.com/Ekliptor/WolfBot/tree/master/src/Strategies\n- https://github.com/Superalgos/Strategy-BTC-WeakHandsBuster\n- https://github.com/Superalgos/Strategy-BTC-BB-Top-Bounce\n","default_branch":"master","files":177,"tree":[".dockerignore",".gitattributes",".github/workflows/node.js.yml",".gitignore",".prettierrc","AGENTS.md","CLAUDE.md","CODE_OF_CONDUCT.md","LICENSE","README.md","docs/backtest_v2_migration.md","documentation/backtest_result.png","documentation/cryptobot.png","documentation/manual_order.png","documentation/slack_signals.png","documentation/trades.png","esbuild.config.mjs","index.ts","package-lock.json","package.json","src/command/trade.ts","src/controller/backtest_controller.ts","src/controller/base_controller.ts","src/controller/candles_controller.ts","src/controller/ccxt_exchanges_controller.ts","src/controller/dashboard_controller.ts","src/controller/dashboard_settings_controller.ts","src/controller/desks_controller.ts","src/controller/index.ts","src/controller/logs_controller.ts","src/controller/orders_controller.ts","src/controller/profile_controller.ts","src/controller/settings_controller.ts","src/controller/signals_controller.ts","src/controller/trades_controller.ts","src/controller/tradingview_controller.ts","src/dict/candlestick.ts","src/dict/exchange_candlestick.ts","src/modules/exchange/exchange_candle_combine.ts","src/modules/http.ts","src/modules/profile_pair_service.ts","src/modules/services.ts","src/modules/strategy/v2/indicator_calculator.ts","src/modules/strategy/v2/strategy_registry.ts","src/modules/strategy/v2/typed_backtest.ts","src/modules/system/candle_export_http.ts","src/modules/system/candle_importer.ts","src/modules/system/ccxt_candle_prefill_service.ts","src/modules/system/ccxt_candle_watch_service.ts","src/modules/system/config_service.ts","src/modules/system/dashboard_config_service.ts","src/modules/system/desk_service.ts","src/modules/system/exchange_instance_service.ts","src/modules/system/logs_http.ts","src/modules/system/symbol_search_service.ts","src/modules/ta.ts","src/modules/trade.ts","src/notify/mail.ts","src/notify/notify.ts","src/notify/slack.ts","src/notify/telegram.ts","src/profile/profile_order_service.ts","src/profile/profile_service.ts","src/profile/types.ts","src/repository/candlestick_repository.ts","src/repository/index.ts","src/repository/logs_repository.ts","src/repository/signal_repository.ts","src/repository/ticker_log_repository.ts","src/repository/ticker_repository.ts","src/strategy/bot_runner.ts","src/strategy/strategies/awesome_oscillator_cross_zero.ts","src/strategy/strategies/cci.ts","src/strategy/strategies/cci_macd.ts","src/strategy/strategies/dca_dipper/README.md","src/strategy/strategies/dca_dipper/dca_dipper.ts","src/strategy/strategies/dca_dipper/doc/crypto_dca_btc.png","src/strategy/strategies/dca_dipper/doc/crypto_dca_eth.png","src/strategy/strategies/dip_catcher/README.md","src/strategy/strategies/dip_catcher/dip_catcher.ts","src/strategy/strategies/dip_catcher/doc/dip_catcher_backtest.png","src/strategy/strategies/dip_catcher/doc/dip_catcher_tradingview.png","src/strategy/strategies/macd.ts","src/strategy/strategies/noop.ts","src/strategy/strategies/obv_pump_dump.ts","src/strategy/strategies/parabolicsar.ts","src/strategy/strategies/pivot_reversal_strategy.ts","src/strategy/strategies/trader.ts","src/strategy/strategy.ts","src/utils/binance_price_service.ts","src/utils/common_util.ts","src/utils/database_schema.ts","src/utils/file_cache.ts","src/utils/indicators.ts","src/utils/queue.ts","src/utils/resample.ts","src/utils/technical_analysis_validator.ts","src/utils/technical_pattern.ts","src/utils/tradingview_util.ts","src/utils/winston_sqlite_transport.ts","test/modules/strategy/v2/fixtures/btc-usdt-15m.json","test/modules/strategy/v2/indicator_calculator.test.ts","test/modules/strategy/v2/strategies/awesome_oscillator_cross_zero.test.ts","test/modules/strategy/v2/strategies/cci.test.ts","test/modules/strategy/v2/strategies/cci_macd.test.ts","test/modules/strategy/v2/strategies/dca_dipper.test.ts","test/modules/strategy/v2/strategies/dip_catcher.test.ts","test/modules/strategy/v2/strategies/macd.test.ts","test/modules/strategy/v2/strategies/noop.test.ts","test/modules/strategy/v2/strategies/obv_pump_dump.test.ts","test/modules/strategy/v2/strategies/parabolicsar.test.ts","test/modules/strategy/v2/strategies/pivot_reversal_strategy.test.ts","test/modules/strategy/v2/strategies/playground.test.ts","test/modules/strategy/v2/strategies/trader.test.ts","test/profile/profile_order_service.test.ts","test/system/config_service.test.ts","test/utils/fixtures/pattern/volume_pump_BNBUSDT.json","test/utils/fixtures/pattern/volume_pump_BNBUSDT.png","test/utils/fixtures/xbt-usd-5m.json","test/utils/indicators.test.ts","test/utils/resample.test.ts","test/utils/technical_analysis_validator.test.ts","test/utils/technical_pattern.test.ts","tsconfig.json","var/log/.gitignore","var/strategies/.gitignore","var/strategies/README.md","var/strategies/playground/playground.ts","views/backtest.ejs","views/backtest_result.ejs","views/candles.ejs","views/ccxt_exchanges.ejs","views/components/alert.ejs","views/components/backtest_summary.ejs","views/components/backtest_table.ejs","views/components/settings_sidebar.ejs","views/dashboard.ejs","views/dashboard/settings.ejs","views/desk/form.ejs","views/desk/index.ejs","views/desks.ejs","views/error.ejs","views/layout.ejs","views/logs.ejs","views/orders/index.ejs","views/orders/orders.ejs","views/profile/bot_form.ejs","views/profile/form.ejs","views/profile/index.ejs","views/profile/view.ejs","views/settings.ejs","views/settings/index.ejs","views/settings/notifications.ejs","views/settings/webserver.ejs","views/signals.ejs","views/trades.ejs","views/tradingview_chart.ejs","views/tradingview_desk.ejs","web/static/css/backtest.css","web/static/css/style.css","web/static/favicon.ico","web/static/img/bitcoin.svg","web/static/img/exchanges/binance.png","web/static/img/exchanges/binance_futures.png","web/static/img/exchanges/binance_margin.png","web/static/img/exchanges/bitfinex.png","web/static/img/exchanges/bitmex.png","web/static/img/exchanges/bybit.png","web/static/img/exchanges/bybit_linear.png","web/static/img/exchanges/bybit_unified.png","web/static/img/exchanges/coinbase_pro.png","web/static/img/exchanges/ftx.png","web/static/js/backtest-form.js","web/static/js/backtest.js","web/static/js/orders.js","web/static/js/slim-select.js","web/static/robots.txt"],"storefront":"/r/Haehnchen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Haehnchen/crypto-trading-bot/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}