TradingView to 3Commas, A Clean, Reliable Webhook Setup (With Pitfalls)
Step-by-step setup for sending TradingView alerts into 3Commas via webhooks, plus where this execution path fits inside a production crypto trading bot workflow like vyn premium.

If you are sending TradingView alerts to 3Commas and half of them never fire, you are not alone. This is the most common broken link in retail crypto automation, and it is almost always a configuration issue, not a platform issue.
Let me address this directly: TradingView to 3Commas works reliably when you set it up correctly, and it breaks silently when you do not. I have been wiring these pipes together since 2017, running it in production on our own accounts and walking hundreds of Fiverr students through the setup. This article is the clean version of that walkthrough, the exact payload format, the webhook configuration, the duplicate-handling logic, and the failure modes that will eventually bite you if you do not design around them.
No fluff. Just the working setup and the edges where it falls apart.
What this stack actually does
TradingView is your signal layer. You run a strategy or indicator on a chart, it fires alerts when conditions are met, and those alerts post a webhook to 3Commas. 3Commas is your execution layer. It receives the webhook, looks up the associated DCA bot or smart trade, and places orders on your connected exchange.
Three moving parts. Each one can fail independently. The job is to understand where the failures happen and design for them.
Why this setup is popular
- TradingView has the best charting and alert system in retail.
- 3Commas has broad exchange support and a reasonable execution engine.
- The webhook bridge between them is free if you already have both.
- You can wire a confluence-based signal from something like block algo flex straight into a 3Commas DCA bot without writing a single line of code.
It is a practical stack. It is not a perfect one, we will get to that.
Step-by-step: the full setup
Here is the actual sequence. Do it in this order or you will debug ghosts.
- Create your 3Commas DCA bot first. Set the base order size, max safety orders, take-profit percentage, and connect it to your exchange API. Do not enable the "deal start condition" as an indicator, you are going to trigger it manually via webhook.
- Get your bot's webhook URL and deal-start token from 3Commas. In the bot settings, 3Commas exposes a unique URL plus a
secrettoken that authenticates incoming requests. - Set up your TradingView alert on the chart. Use a strategy that supports alert message templates, or an indicator with alert conditions. For confluence signals, block algo flex already emits the right alert fields.
- Configure the webhook URL in the alert dialog. Paste the 3Commas URL into the "Webhook URL" field. Enable the "Webhook URL" checkbox, this is the one users forget.
- Configure the alert message body. This is the JSON payload 3Commas expects. Exact format below.
- Test with a small bot and a manual trigger first. Fire one alert, watch 3Commas log, confirm the deal opened. Do not skip this.
- Set alert expiration to "open-ended" and frequency to "once per bar close." Bar-close firing avoids intra-bar flapping. Once per bar means you do not double-fire on the same condition.
- Add a duplicate-protection layer (covered below).
That is the minimum viable setup. It works. It is also where most tutorials stop, which is why most retail setups eventually fail silently.
The exact JSON payload format
3Commas expects a specific structure. The canonical start-deal payload for a long DCA bot looks like this:
{
"message_type": "bot",
"bot_id": 123456,
"email_token": "your-3commas-email-token",
"delay_seconds": 0,
"pair": "USDT_BTC"
}
Field-by-field:
message_type, always"bot"for a DCA bot trigger.bot_id, the numeric ID of your bot, visible in the 3Commas URL when you open the bot.email_token, a per-bot secret token that authenticates the webhook. Treat this like an API key.delay_seconds, how long 3Commas waits before acting. Usually 0.pair, the trading pair in 3Commas format. Note theQUOTE_BASEordering, not the other way around.
If any field is wrong, 3Commas silently rejects the webhook and does not tell you. That is the most common failure mode for new setups.
Why the pair format trips everyone up
TradingView shows BTCUSDT. 3Commas wants USDT_BTC. This has cost more deals than any single other configuration mistake. If you are templating the pair dynamically in TradingView via {{ticker}}, you need a transformation layer. The simplest fix is to hardcode the pair in the alert message per bot rather than templating it.
Close-deal payload
For closing a deal via webhook (if you use TradingView to exit rather than the bot's internal take-profit):
{
"action": "close_at_market_price",
"message_type": "bot",
"bot_id": 123456,
"email_token": "your-3commas-email-token"
}
Again, message_type and email_token are mandatory. Miss either and the request fails silently.
Duplicate alerts and how to handle them
TradingView can fire the same alert twice. Network retries, bar re-evaluation on data revision, alert engine quirks, it happens. If both fire, 3Commas will open two deals if your bot allows it, or reject the second, depending on your max-active-deals setting.
You have two options. First, set max_active_deals to 1 on the 3Commas side. Second, if you need multiple concurrent deals, add a cooldown in your alert logic so the same signal cannot fire twice within N minutes.
Neither is perfect. Both are better than nothing.
The "frequency" setting matters more than people think
In the TradingView alert dialog, the Once Per Bar Close option is the safest default for most strategies. Once Per Bar fires on every tick within the bar as soon as the condition is true, unstable. Only Once fires one time total and then disables the alert, almost never what you want.
Set every production alert to Once Per Bar Close unless you have a very specific reason otherwise.
Common failure modes (the honest list)
Things that will eventually go wrong with this setup:
- Silent alert rejection. Webhook URL checkbox not enabled, malformed JSON, wrong email_token. 3Commas does not email you when this happens.
- Missed alerts. TradingView's alert delivery is not SLA'd. Occasional drops happen. During high-volatility events, the queue can back up.
- Network round-trip latency. Alert fires, webhook posts, 3Commas queues, exchange executes. Typical latency is 2 to 8 seconds. On volatile wicks, your fill price can differ meaningfully from the alert price.
- Exchange rejects. API key expired, insufficient balance, pair not available on that account. 3Commas logs these; you rarely look at the log until something goes wrong.
- Bar revision. TradingView sometimes revises historical bars after data feed corrections. If your alert condition becomes true on a revised bar, it will not re-fire, but your backtest will show it did.
None of these are deal-breakers for a retail DCA setup. All of them are reasons you should be monitoring your bot's activity log daily, not set-and-forget-for-six-months.
Monitoring, minimum viable
- Daily: check 3Commas bot log for deal opens/closes and error messages.
- Weekly: reconcile deal count against alert count in TradingView. Missed alerts show up here.
- Monthly: audit exchange API key scope and balance. Expired keys are the silent killer.
Boring, yes. This is the part that separates the setups that run for years from the ones that die in three months.
When this stack is not enough
TradingView → 3Commas is great for retail DCA bots on major crypto pairs. It starts to creak when:
- You need sub-second execution. The round-trip just is not fast enough.
- You want to trade US stocks. 3Commas does not execute stocks; it is crypto-only.
- You want to trade CFDs on Capital.com. Same issue.
- You need guaranteed delivery with retry semantics. TradingView does not guarantee alerts; 3Commas does not guarantee execution.
- You want the execution layer to enforce its own risk checks beyond what the bot config allows.
This is where signal pipe fits, it is the native webhook-execution engine we built for exactly these cases. Alpaca for US stocks, Capital.com for global CFDs, race-condition protection, encrypted API credential storage, and a position-sync layer that catches fills the broker reports out-of-band.
If you are happy running DCA bots on Binance or ByBit with a 2-to-8-second execution latency, stay on 3Commas. If you need faster, broader, or stricter, graduate.
A production-ready alert message template
For a confluence signal firing a long DCA bot, this is the message I actually use in alerts:
{
"message_type": "bot",
"bot_id": 123456,
"email_token": "abc123-your-token-here",
"delay_seconds": 0,
"pair": "USDT_BTC",
"timestamp": "{{time}}"
}
The timestamp field is not required by 3Commas but is useful in your own logs. Most users skip it. I do not.
Where vyn premium fits
If your goal is not just "send an alert" but run a full vyn premium crypto trading bot workflow, the stack looks like this: TradingView creates the signal, 3Commas executes crypto deals, and the strategy logic decides when base orders, exits, and Smart Safety Orders are allowed to fire. You still hold the exchange account. vyn premium supplies the TradingView strategy, the alert templates, and the DCA risk logic that sits before execution.
That distinction matters. A raw TradingView to 3Commas setup is plumbing. It can start a DCA bot, but it does not decide whether the market regime is good enough, whether a safety order should wait, or whether the same logic should route stocks through Alpaca instead of crypto through 3Commas.
| Workflow | Signal layer | Execution layer | Best use |
|---|---|---|---|
| Manual TradingView to 3Commas | Your own alert | 3Commas | Simple crypto DCA bots |
| vyn premium crypto workflow | vyn premium in TradingView | 3Commas | Smart Safety Orders and volatility-adaptive DCA |
| vyn premium stocks workflow | vyn premium in TradingView | signal pipe to Alpaca | Stock trading bot execution |
| vyn premium CFD workflow | vyn premium in TradingView | signal pipe to Capital.com | FX, indices, and CFD routing |
If you are still designing the signal side, start with the DCA bot strategy and Smart Safety Orders explained articles first. If you already know you want the production version, the next page is vyn premium for TradingView, 3Commas, signal pipe, Alpaca and Capital.com execution.
Quick comparison, execution venues for TradingView alerts
| Venue | What it is for | Latency | Best for |
|---|---|---|---|
| 3Commas | Crypto DCA + smart trades | 2 to 8s | Retail crypto |
| signal pipe (Alpaca) | US stocks, commission-free | Sub-3s | Stock automation |
| signal pipe (Capital.com) | Global CFDs | Sub-3s | FX, indices, stocks |
| TradersPost | Multi-broker bridge | Variable | Mixed broker setups |
| Tickerly | Mid-tier webhook bridge | Variable | Simpler setups |
Pick the venue that matches the asset. Do not try to force 3Commas to do stocks.
FAQ
Q: Why is my 3Commas bot not opening deals?
A: Most likely one of: webhook URL checkbox not enabled in TradingView, malformed JSON in the alert message, wrong email_token, pair name in the wrong format (USDT_BTC not BTCUSDT), or max active deals already reached on the bot. Check the 3Commas bot log first.
Q: Can I send the same alert to multiple bots? A: TradingView supports only one webhook URL per alert. Workaround: create duplicate alerts with different bot IDs, or use a webhook fan-out service between TradingView and 3Commas.
Q: What happens if my TradingView plan runs out of alerts? A: Alerts silently stop firing when you hit your plan limit. TradingView does not email you. Check the alert manager periodically.
Q: Is 3Commas safe for API keys? A: Use API keys with trade permissions only, never withdrawal permissions. Whitelist 3Commas IPs where the exchange supports it. Rotate keys annually.
Q: Do I need a TradingView Pro subscription? A: For reliable webhooks, yes. The free tier has no webhook support. Pro, Pro+, or Premium all support alerts with webhook URLs.
Q: How do I handle short signals on a DCA long bot? A: You do not. DCA long bots only understand long-side deals. For shorts, create a separate short DCA bot and send short signals to its webhook. Mixing long and short signals in one bot is not supported.
Q: Can I backtest this exact setup? A: You can backtest the strategy in TradingView. The webhook delivery and 3Commas execution are not part of the backtest. Live paper-trading in 3Commas is the closest approximation. See trading bot backtesting for the broader picture.
Q: Do crypto trading bots work? A: Yes, when the strategy has an edge and the execution layer does not leak that edge through slippage, missed fills, or duplicate orders. I have run vyn premium live since 2017, the bot itself is not the hard part, the entry logic and risk sizing are. A bot without a tested strategy is just a faster way to lose money.
Q: Can you make $100 a day with Bitcoin? A: Mathematically, $100 a day is roughly 36% a year on a $100k account, or 365% on a $10k account. The first is plausible in a good year with a solid system, the second is fantasy. Anyone promising fixed daily PnL on Bitcoin is selling you something, not trading.
Q: Are crypto trading bots worth it? A: Worth it if you treat them as execution tools, not money printers. A bot like vyn premium is worth the seat if you already have a thesis and want consistent, emotionless entries with Smart Safety Orders® handling drawdown defense. If you are hoping the bot itself will find alpha, you will lose money faster than trading by hand. The cost only makes sense once your size and trade frequency justify the subscription.
Risk disclaimer
Webhook-based automation introduces multiple points of failure, TradingView alert delivery, network round-trip, 3Commas queueing, exchange execution. Test every new setup in paper trading before going live. Monitor bot activity logs regularly. Never deploy with API keys that have withdrawal permissions enabled. Past performance of any strategy is not indicative of future results.
The honest take
TradingView to 3Commas works. It is not the fastest, it is not the most robust, and it is not the right stack for US stocks or CFDs. But for retail crypto DCA it remains the most accessible way to connect a TradingView strategy to live execution without writing a single line of code.
The failure modes are predictable. Pair format, email token, the webhook URL checkbox, bar-close timing, duplicate handling. Nail those five and the setup is stable for years. Miss any of them and you will spend a weekend debugging something that should have taken ten minutes.
If you need faster execution or broader asset support, US stocks on Alpaca, CFDs on Capital.com, sub-second delivery with retry semantics, that is what signal pipe exists for. It is the native execution layer behind vyn premium and it is built around the same webhook pattern, just with production-grade reliability.
Pick the stack that matches the job. Do not over-engineer when 3Commas is enough. Do not under-engineer when it is not.
Timo from blockresearch.ai
Founder of Block Research. Running automated trading systems on personal and company capital since 2017, three full crypto cycles of live execution. Author of Smart Safety Orders (volatility-adaptive DCA), the mean-reversion entries inside vyn premium, and the 3-second webhook response invariant inside SignalPipe. We ship the same strategies we run on our own money.