Home >
Blog > TradingView Webhook Crypto Bot
TradingView Webhook Crypto Bot Setup: Automate Your Alerts into Real Trades
Published May 2, 2026 · 7 min read
TradingView is where most crypto traders do their analysis. You draw your levels, set your alerts, and watch your indicators. But when that alert fires at 3 AM, you are asleep. The trade you planned never happens. Sound familiar?
A TradingView webhook solves this by sending your alert data to a bot that executes the trade automatically on your exchange. In this guide, you will learn how to connect TradingView alerts to a crypto trading bot and turn your chart analysis into automated trades.
What Is a TradingView Webhook?
A webhook is a URL that TradingView sends data to when an alert triggers. Instead of just getting a phone notification, TradingView sends a JSON payload to your bot's endpoint. The bot reads the payload, interprets the signal (buy, sell, close), and executes the order on your exchange.
The Flow
- Your Pine Script indicator or alert condition triggers on TradingView
- TradingView sends a POST request to your webhook URL
- The bot receives the signal and validates it
- The bot places the order on Bybit, Binance, or OKX via API
- You get a Telegram notification confirming the trade
Requirement: TradingView webhooks are available on the Pro plan and above. The free TradingView plan does not support webhooks.
Why Use DeepAlpha for TradingView Webhooks?
You could build your own webhook receiver, but that requires a server, SSL certificates, error handling, exchange API integration, and ongoing maintenance. DeepAlpha provides all of this out of the box:
- Hosted webhook endpoint — No server setup required. You get a unique URL instantly.
- 12 exchange support — Route your TradingView signals to Bybit, Binance, OKX, Kraken, KuCoin, and more.
- Smart order routing — Limit orders with automatic retry if not filled within a timeout.
- Risk management layer — Even webhook-triggered trades respect your position size limits and drawdown caps.
- Trade logging — Every webhook signal and resulting trade is logged in your cloud dashboard.
- Combine with AI — Use TradingView alerts as one input alongside DeepAlpha's own ML signals for higher conviction trades.
Step-by-Step Setup Guide
Step 1: Get Your Webhook URL
Sign up at deepalphabot.com/cloud/login and navigate to Settings > TradingView Webhook. You will see a unique URL like:
https://deepalphabot.com/api/webhook/tv/YOUR_UNIQUE_TOKEN
Copy this URL. You will paste it into TradingView in a moment.
Step 2: Create Your Alert in TradingView
Open TradingView, set up your chart and indicator, then create an alert:
- Click the "Alerts" button (clock icon) in the right panel
- Set your condition (e.g., RSI crosses below 30)
- In the "Notifications" tab, check "Webhook URL"
- Paste your DeepAlpha webhook URL
- In the "Message" field, enter your signal payload
Step 3: Format Your Alert Message
The alert message must be valid JSON so the bot can parse it. Here is the standard format:
{
"action": "buy",
"symbol": "BTCUSDT",
"qty": "10%",
"leverage": 3,
"stopLoss": "2%",
"takeProfit": "4%"
}
Supported fields:
- action — "buy", "sell", or "close"
- symbol — The trading pair (must match your exchange's format)
- qty — Position size as a percentage of your balance or fixed USDT amount
- leverage — Leverage multiplier (optional, defaults to your dashboard setting)
- stopLoss — Stop loss as percentage or fixed price
- takeProfit — Take profit as percentage or fixed price
Step 4: Test with a Paper Trade
Before going live, set your DeepAlpha dashboard to "Paper Trading" mode. Trigger your TradingView alert manually (right-click the alert > "Trigger Alert") and verify that:
- The webhook is received (check the Webhook Log in your dashboard)
- The paper trade is placed correctly
- The position size and leverage match your settings
- Stop loss and take profit are set properly
Step 5: Go Live
Once you have verified everything works in paper mode, switch to live trading in your dashboard. From now on, every TradingView alert that fires will automatically execute a real trade on your exchange.
Advanced: Pine Script Integration
For more sophisticated strategies, you can use Pine Script to generate dynamic alert messages. Here is an example:
// Pine Script v5 example
//@version=5
strategy("My Webhook Strategy", overlay=true)
longCondition = ta.crossover(ta.sma(close, 20), ta.sma(close, 50))
shortCondition = ta.crossunder(ta.sma(close, 20), ta.sma(close, 50))
if longCondition
strategy.entry("Long", strategy.long)
alert('{"action":"buy","symbol":"' + syminfo.ticker + 'USDT","qty":"10%","leverage":3}', alert.freq_once_per_bar)
if shortCondition
strategy.entry("Short", strategy.short)
alert('{"action":"sell","symbol":"' + syminfo.ticker + 'USDT","qty":"10%","leverage":3}', alert.freq_once_per_bar)
Common Webhook Issues and Fixes
Alert fires but no trade is placed
- Check the Webhook Log in your DeepAlpha dashboard for error messages
- Verify the JSON format is valid (use jsonlint.com to check)
- Make sure the symbol matches exactly (BTCUSDT, not BTC/USDT)
Trade is placed but with wrong size
- Check if you are using percentage ("10%") or absolute ("100") for qty
- Verify your available balance on the exchange
Webhook URL returns 403
- Your trial may have expired. Check your account status at deepalphabot.com/cloud/login
- Regenerate your webhook token if you suspect it was compromised
TradingView Webhook vs. DeepAlpha AI Signals
You do not have to choose one or the other. Many DeepAlpha users combine both approaches:
- TradingView webhooks for discretionary setups you identify manually (support/resistance breaks, pattern completions)
- DeepAlpha AI signals for systematic, always-on trading that catches opportunities you miss
- Confluence mode — Configure the bot to only trade when both your TradingView alert AND the AI model agree on direction
Get Started Today
Setting up TradingView webhooks with DeepAlpha takes less than 10 minutes. The free 7-day trial includes full webhook access across all 12 supported exchanges.
Turn Your TradingView Alerts into Automated Trades
Connect in 5 minutes. No server required. 12 exchanges supported.
Start Free 7-Day Trial
Back to Blog · Homepage