TradingView to Binance Futures Bridge
A small, auditable server that turns TradingView alerts into Binance USDS-M futures orders.
A FastAPI service that executes TradingView strategy webhooks as signed Binance futures orders with leverage, sizing modes, and close-then-flip handling.

- Executes TradingView webhooks as signed Binance USDS-M futures orders
- Leverage, margin/notional sizing modes, and close-then-flip handling
- Documented Pine alert JSON contract
- Test suite and one-command Docker deploy
A deliberately small, auditable FastAPI server that receives TradingView strategy-alert webhooks — ordered command arrays — and executes them as signed Binance USDS-M Futures market orders. It handles leverage setting, margin and notional sizing modes, and close-then-flip logic so a reversal alert cleanly exits and re-enters.
The exact Pine alert JSON contract is documented, there is a test suite, and it deploys via Docker. The design goal was auditability: the code is small enough to read top to bottom before you trust it with a live account, and every order path is explicit rather than hidden behind a framework.
Executes live broker orders; shared as engineering work, not financial advice. No profit is promised and users trade their own accounts at their own risk.
How it works
- Pine strategy alert posts command array to FastAPI
- Request parsed against documented JSON contract
- Leverage and margin or notional sizing applied
- Close-then-flip logic handles reversals
- Signed order sent to Binance USDS-M futures
Software and automation are infrastructure, not financial advice. No performance guarantees. Every live system needs staged testing, risk limits, and owner approval.