TradingView to Bybit Automation
Full automation pipeline from TradingView strategy alerts to live order execution on Bybit's Unified Trading account, with position tracking and risk management.
Automated TradingView to Bybit execution with live balance tracking, position management, and configurable direction control
The Brief
The client needed automated execution of TradingView strategy signals on Bybit, with proper position tracking, balance awareness, and control over which trade directions the bot would act on.
What We Built
A FastAPI webhook server that receives TradingView alerts and executes them on Bybit’s Unified Trading account via the pybit library. The bot tracks open positions, fetches live account balance and unrealised PnL before each order, and queries instrument data to size orders correctly.
It supports long-only, short-only, or both directions, and can be configured for live, demo, or testnet environments. An opposite signal mode allows the bot to either ignore or close existing positions when a signal in the opposite direction is received.
TradingView alerts send structured JSON with the symbol, side, quantity, and optional take profit and stop loss values directly to the bot’s endpoint.
Interested in a similar project?
Get in touch