A real-money Binance perpetual-futures trading bot with a real scored strategy (no placeholder points) and a full set of safety rails. It is a separate val from the Jupiter paper bot — it never touches that code or its account.
⚠️ This trades real money. It places live market orders, sets 5x leverage, and parks reduce-only stop-loss / take-profit brackets on Binance USDT-M futures. Start with a tiny funded account and watch it in paper/forward-test mode first.
| File | Role |
|---|---|
main.ts | Cron entrypoint — scans, scores, and trades |
strategy.ts | Order-flow scalping signal from HVN/LVN + footprint imbalance |
flow.ts | Builds the volume profile (POC, HVN, LVN, Core Zone) + footprint from trades |
safety.ts | Kill switch, daily loss/trade caps, drawdown guard, dedup, cooldown, reconcile |
config.ts | All tunable settings in one place |
telegram.ts | Telegram alerts |
control.ts | HTTP webhook — status + remote kill switch |
README.md | This file |
Every 2 hours the bot re-scans the whole Binance USDT-M market and rebuilds its watchlist. A symbol is included only if it meets all of:
MIN_VOLUME_USD ($20M)/USDT:USDT)EXCLUDED_BASES)MAX_BASE_PRICE_USD ($1,000)The strategy is built on order flow, not lagging indicators. For each symbol it pulls up to the last 2h of trades and:
Signal logic:
Gates: the setup must be off an HVN and backed by a strong footprint
imbalance — never a blind one-sided entry. Trades only at score ≥ 70.
Stop = 25% of the observed trading range; target = 2× stop distance (R:R 1:2).
CONTROL_TOKEN) or by setting KILL_SWITCH-style DB state.MAX_DAILY_LOSS_USD (default $50).MAX_DAILY_TRADES (default 10) per UTC day.MAX_DRAWDOWN_USD (default $100).MAX_OPEN_TRADES (default 2), counted correctly for
shorts (|contracts| > 0).SYMBOL_COOLDOWN_MS after a trade.BINANCE_API_KEY, BINANCE_SECRET_KEY — futures-enabled API keysTELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID — alerts (optional)CONTROL_TOKEN — secret to authorize kill-switch toggles (optional)main.ts (default: every 15 min).GET → JSON status (kill switch, today's PnL/trades, open positions)POST {"action":"kill","state":true} with header X-Control-Token: <token>
→ flips the kill switch. Refused unless CONTROL_TOKEN is set.