August 10, 2026 · 9 min read

TradingView Webhooks: The Complete Guide (Setup, JSON, Testing)

How TradingView webhooks work end to end: creating the alert, writing the message with placeholders, JSON payloads, the timeout and retry rules, why empty alerts fire, and how to route alerts to Telegram in minutes.

TradingView Webhooks: The Complete Guide (Setup, JSON, Testing)

Short answer: a TradingView webhook turns an alert into an HTTP POST — whatever is in the alert's message box gets sent to a URL you choose, the instant the alert fires. That one mechanism connects TradingView to Telegram, to bots, to anything with a URL. This guide is the complete setup, the placeholder reference, the JSON rules, and the failure modes — including the empty-alert one almost nobody documents.

How the pieces fit

Three parts, in order: a condition (price crosses a level, an indicator signal, a strategy order), an alert wrapping that condition, and the webhook URL the alert calls. TradingView's servers do the calling — your computer can be off. The receiving end must answer quickly with HTTP 2xx; slow or failing receivers cause TradingView to mark deliveries failed, and repeated failures can stop the alert entirely.

Setting one up

  1. Create the alert (bell icon, or right-click a level → Add alert).
  2. In the alert dialog, open the Notifications tab and tick Webhook URL. Paste your URL exactly — no trailing spaces.
  3. Write the Message. This text, after placeholder substitution, is the entire request body.
  4. Save. Fire a test by letting the condition trigger, or temporarily set a condition that triggers immediately.

The placeholders that matter

PlaceholderBecomes
{{ticker}}Symbol without exchange (EURUSD)
{{exchange}}The exchange/broker prefix
{{close}}, {{open}}, {{high}}, {{low}}Bar prices at trigger time
{{time}}Bar time, ISO format
{{interval}}Chart timeframe
{{strategy.order.action}}buy / sell (strategy alerts)
{{strategy.order.contracts}}Order size (strategy alerts)
{{strategy.order.alert_message}}The alert_message string from your Pine strategy

Plain text or JSON?

For a human reading Telegram, plain text wins: {{ticker}} closed at {{close}} on the {{interval}} arrives exactly that readable. For software, JSON:

{
  "ticker": "{{ticker}}",
  "action": "{{strategy.order.action}}",
  "price": {{close}},
  "time": "{{time}}"
}

Two JSON rules that cause most breakage: numeric placeholders like {{close}} take no quotes, text ones do; and if your receiver looks for a message field, remember that an empty value means "nothing to say" — a well-built receiver skips it rather than posting an empty message.

The empty-alert trap

TradingView fires the webhook even when the message resolves to nothing — the classic case is {{strategy.order.alert_message}} on a strategy order that never set an alert_message. The webhook arrives with an empty body, and a strict receiver that answers 400 makes TradingView paint a red "delivery failed" on an alert that is actually fine — enough failures and TradingView stops the alert. We hit exactly this in production; our receiver now answers 200 and logs the alert as skipped instead. If you run your own receiver, do the same. If your webhook shows delivery failures with an empty payload, this is almost certainly why.

Getting alerts into Telegram

Telegram bots cannot be called by TradingView directly — the URL shapes do not match. The standard pattern is a relay: a service gives you a URL, TradingView posts to it, the service forwards the body to your chat through your own bot. Our TV Alerts does this free: add your BotFather token, point it at a chat or channel, create a webhook, and paste the generated URL into TradingView. Each webhook URL is unguessable and is the only credential — treat it like a password. The step-by-step with screenshots is in the TradingView-to-Telegram guide.

Debug checklist, in order

  1. Did the alert fire at all? Check TradingView's alert log first. No trigger, no webhook.
  2. Copy the URL again. Character-perfect, no spaces. Paste into a new browser tab: even an error page proves DNS and TLS work.
  3. Check the receiver's log. Ours shows every delivery — including skipped empty ones — within a second on the logs page.
  4. Validate the JSON if you send JSON: trigger the alert, read the raw body in your receiver's log, run it through a JSON validator. The bug is almost always a quote around a numeric placeholder.
  5. Timing: if deliveries fail intermittently, your receiver is answering slowly. TradingView wants its 2xx fast.

Frequently asked questions

What is a TradingView webhook?

A webhook is a URL that TradingView calls the moment one of your alerts fires, sending your alert message as the request body. Instead of an email or popup, the alert becomes a machine-readable HTTP request that any server — a Telegram forwarder, a trading bot, your own script — can act on in real time.

Do TradingView webhooks require a paid plan?

Yes. The Webhook URL checkbox in the alert dialog is available on TradingView's paid tiers, not the free plan. Alerts themselves exist on the free plan; delivering them to a URL is the paid part.

Why is my TradingView webhook not working?

The usual causes, in order: the URL was pasted with a typo or trailing space; the receiving server takes too long to answer (TradingView expects a fast 2xx response); the alert message resolves to an empty body, which some receivers reject; or the alert simply has not triggered — check the alert log first, because webhooks only fire when the alert does.

Can TradingView send JSON in a webhook?

Yes — whatever you write in the alert's message box is the request body, so writing valid JSON there produces a JSON webhook. Placeholders like {{close}} and {{ticker}} are substituted before sending, which also means one misplaced quote around a placeholder produces invalid JSON — the most common webhook bug there is.

How do I send TradingView alerts to Telegram?

You need a middleman URL, because Telegram cannot receive webhooks from TradingView directly. A forwarder service gives you a URL that relays whatever TradingView sends into your Telegram chat or channel through your own bot. CopyConnectFX's TV Alerts does this free: create a webhook, paste the URL into the alert, done.

Copy trades between MT4 & MT5 in milliseconds

Free local trade copier with a realtime web dashboard. Set up in 10 minutes — no coding.

Get Started Free