chrisleekr /binance-trading-bot
Automated Binance trading bot with pluggable strategies, historical backtesting, a live dashboard, and connect an AI agent over MCP
★ 5,609⑂ 1,165👁 119⑃ 296● 488▤ 57
+3
Daily
5,609
stars
1,165
forks
119
watchers
296
prs
488
issues
57
releases
README
Binance Trading Bot Automated Binance trading bot with pluggable strategies, historical backtesting, and a live dashboard. Self-hosted. Multiple strategy profiles: grid, momentum, or rebalancing. Documentation · Quick start · Deploy · Strategies [!WARNING] I cannot guarantee whether you can make money or not. Use it at your own risk. I have no responsibility for any loss or hardship incurred directly or indirectly by using this code. Read the disclaimer before using it. Under active development and not recommended for real funds. How it works You run the app on your own server, connect it to your Binance account with an API key, and it watches the market and places buy and sell orders on your behalf. Once running, it repeats a short loop for every coin you told it to watch: read the market, run your strategy's rules, decide buy / sell / wait, and act. - Strategy-pluggable. A _strategy_ is the rulebook the bot trades by. Three ship today: trailing-trade, momentum, and rebalance, and you pick one per profile. Each lives in its own package behind a shared contract, so adding a fourth is mostly a new package plus a registry entry, not a rewrite of the trading loop. - Account-scoped profiles. One operator login owns one or more Binance _accounts_. Each account is one API key pair, one environment (testnet or live), and one wallet. Each account runs N independent _profiles_, each with its own coins, budget, and strategy, all sharing that account's wallet. - Reliability-first. Crash-only worker, idempotent jobs, and a version-aware per-symbol state commit mean a restart resumes cleanly and never double-places an order. Persistence is Postgres + TimescaleDB; cache and queues are Redis + BullMQ. Schema lives in packages/db. Act on a symbol Every monitored symbol gets a workspace: live market data, the strategy's current signal, open orders, and manual overrides in one place. Tune a strategy, then backtest it Configure a strategy per profile, then replay it against historical candles before risking anything. Every run is kept, so you can compare windows and symbols side by side. More screens are covered in the user guide. Ask an AI agent Optionally, connect an AI agent such as Claude Code over MCP. Once you approve it, it can read your accounts, profiles, orders and backtests, and place orders and change settings through the same checks as the web app. It is off by default. See AI agents (MCP). Configuration Per-profile configuration (grid, indicators, notifier providers, Technicals gates) lives in the database and is editable through the SPA after first run. See configure a profile. Process-level environment variables (DATABASE_URL, REDIS_URL, WEB_ORIGIN, AUTH_SECRET, etc.) are listed in .env.example and described in the environment variable reference. Quick start (development) Prerequisites: Bun 1.4+ (exact version pinned in .tool-versions; bun.lock is a lockfileVersion: 2 file that Bun 1.3.x cannot parse) a
Top issues
Latest release
v1.10.0 v1.10.0 2026-11-121.10.0 (2026-11-12) Features momentum: add trendQuality entry trigger and break-even lock (826) (e9c2797) Bug Fixes backtest: replay on a decision clock with snapshotted, comparable runs (827) (2ad4671)