Skip to main content
General TradingView information. This section describes standard TradingView behavior, not a QuantNomad-specific feature. TradingView updates its interface regularly, so menu names and positions may differ slightly from what you see. When in doubt, check the TradingView Help Center.
A webhook makes TradingView send an HTTP request to a URL of your choice every time an alert fires. It’s the standard way to connect indicator signals to trading bots, messaging tools, spreadsheets, or your own code.

How it works

When the alert fires, TradingView sends an HTTP POST request to the URL. The request body is the alert message, after placeholders such as {{ticker}} have been replaced.

Requirements

  • A TradingView plan that includes webhook alerts. See TradingView pricing.
  • Two-factor authentication on your TradingView account, if TradingView prompts for it when you enable webhooks.
  • A receiving URL reachable from the internet. TradingView only accepts ports 80 and 443 in webhook URLs.
  • A receiver that responds quickly. TradingView cancels the request if the server takes longer than about three seconds, so acknowledge first and do slow work afterwards.
Check TradingView’s webhook documentation for current requirements, timeouts, and the IP addresses webhooks are sent from.

Set up a webhook alert

1

Get the URL

Copy the webhook URL from the receiving service, or set up an endpoint on your own server.
2

Write the message

Use the format the receiving service expects. If the message is valid JSON, TradingView sends it with a JSON content type. Otherwise it’s sent as plain text.
3

Attach the webhook

In the alert’s Notifications tab, enable Webhook URL and paste the URL.
4

Test

Trigger a test alert and confirm the receiving service got the expected message.

JSON message template

Your message must be editable for this to work. Scripts that use alert() calls send their own fixed message. For strategies such as UT Bot v2 and UT Bot Pro, use Order fills only alerts, which let you write the message and use strategy placeholders:
  • {{strategy.order.action}} is buy or sell, so one alert covers both directions.
  • Keep placeholder values in quotes so the message is always valid JSON.
  • Include fired_at so the receiver can reject delayed or duplicate messages.

A minimal receiver

A small example of a server that receives and logs webhook alerts. It’s a starting point for testing, not a production trading system.
webhook_receiver.py

Security

Anyone who knows your webhook URL can send requests to it. Treat it like a password.
  • Include a long, random secret in the URL path or in the message, and reject requests without it.
  • Never put exchange API keys or passwords in the alert message.
  • Validate every field before acting on it, and reject unexpected symbols or values.
  • Make the receiver idempotent: the same alert received twice should not place two orders.

Before automating real trades

  • Paper trade the full chain (indicator → alert → webhook → execution) first.
  • Use Once Per Bar Close triggers to avoid acting on signals that later disappear. See Confirmed vs Unconfirmed Signals.
  • Monitor the alert log and your receiver’s logs. Webhooks can be delayed or fail.
  • Add limits in the execution layer: maximum position size, maximum orders per day, and a way to stop everything quickly.
Educational use only. QuantNomad indicators are analysis tools, not financial advice. Signals can be wrong, past behavior does not predict future results, and trading involves substantial risk of loss. Read the full Risk Disclaimer.
Last modified on November 7, 2026