TradingView to Bybit: run your alerts on Bybit USDT perpetuals
Point a TradingView alert at your AlgoVesta webhook and each alert becomes an order on your Bybit account. On USDT perpetuals the stop-loss and take-profit are placed as reduce-only orders and checked on Bybit after the fill. On Bybit spot only the stop-loss is placed, and this page explains why.
How it works
Choose a system-generated key, set permissions to Read-Write and enable Contract - Trade. No withdrawal permission.
Paste key and secret into the dashboard; there is no passphrase on Bybit.
Pick symbol, side, margin and leverage in the signal designer and copy the JSON it produces.
Send the built-in test signal first; it is a dry run and opens nothing on Bybit.
Bybit futures: what the order looks like
Most TradingView users on Bybit trade USDT perpetual contracts, and that is where the full protection set applies. AlgoVesta opens the position, then places the stop-loss and the take-profit as reduce-only conditional orders, so they can only shrink the position you hold. Both are read back from Bybit afterwards, and a stop-loss that cannot be confirmed means the position is closed rather than left open without protection.
If your alert lists several take-profit levels with a percentage for each, those levels are placed as individual reduce-only orders. Without percentages, the first target takes the whole position by default; you can switch the bot to equal splits in its settings.
Why Bybit spot gets a stop-loss but no take-profit
On Bybit spot a stop-loss and a take-profit placed together reserve the same coins. The exchange accepts the first order and rejects the second with an insufficient-balance error. Rather than send an order that is known to fail, AlgoVesta places the stop-loss, which protects the position, and does not attempt the take-profit.
In practice that means a spot alert on Bybit exits at your stop or when a later alert closes it. If you rely on fixed take-profit levels, the perpetual market is the better fit on Bybit. The bot setup screen shows this before you save, so it is not a surprise later.
Margin and size on Bybit
The amount in the alert is the margin you commit. With 10x leverage, $30 of margin opens roughly $300 of contract value. AlgoVesta rounds to the nearest quantity step Bybit allows for that symbol; when the closest step is more than 20% away from your amount, the order is held back and the bot card lists the amounts that would fit.
The alert message
Paste this into the alert's message box. The two plot values come from your indicator; leverage is ignored on spot.
{
"symbol": "{{ticker}}",
"action": "buy",
"price": "{{close}}",
"stop_loss": "{{plot_0}}",
"take_profit": "{{plot_1}}",
"leverage": 10
}
For a Pine strategy, use the strategy template so exits and reversals work. Do not send only {{strategy.order.action}}: on an exit it reads "sell" and would open a short instead of closing. The market_position fields tell AlgoVesta when the strategy is flat.
{
"symbol": "{{ticker}}",
"action": "{{strategy.order.action}}",
"market_position": "{{strategy.market_position}}",
"prev_market_position": "{{strategy.prev_market_position}}",
"position_size": "{{strategy.position_size}}",
"price": "{{close}}"
}
TradingView only shows the Webhook URL box when two-factor authentication is on in your TradingView account. TradingView cannot send custom headers, so AlgoVesta verifies the source from TradingView's own server addresses and auto-trades only alerts it can verify.
Connect your Bybit API key
Create the key in Bybit with these permissions: Read-Write, Contract - Trade. Withdrawal and transfer stay disabled, because AlgoVesta never needs them: it can place and close orders, but it cannot move funds out of your account. Bybit keys have a key and a secret only, with no passphrase.
If you restrict the key to IP addresses, the AlgoVesta connection wizard shows the two server addresses to add. The full click-by-click guide, with what each Bybit screen looks like, is in the help center.
How to connect Bybit to AlgoVesta →
Rules that apply to every order
- A stop-loss on every order: from the signal, or from your own percentage or distance. No stop-loss source, no order.
- A daily-loss limit that pauses new entries until the next UTC day.
- Maximum open positions and maximum trades per day per bot.
- A panic button that closes what AlgoVesta opened and leaves your own positions alone.
On crypto exchanges an order opens in about 4.1 seconds on average, from the signal arriving to a filled order with its protection attached, measured across AlgoVesta's own executions.
Bybit questions
The most common questions before you decide — if you still have doubts, start here.
Try TradingView alerts on Bybit in paper mode first
Every bot can start on a $5,000 virtual balance, so you see the fills before a real order is sent. 7-day free trial, no credit card required.
Start Free Trial