Automation & Bots Intermediate

Webhook Bot

Also known as: TradingView webhook bot, alert-to-order bot, webhook trading bot, HTTP webhook executor

What is it?

A webhook bot is software that listens for an incoming HTTP message — a webhook — and turns it into a live broker order. When your charting platform or strategy fires an alert, it sends a small JSON payload to a URL the bot is watching, and the bot reads that payload and places the trade for you.

How it flows
sequenceDiagram
    autonumber
    participant Chart as TradingView alert
    participant Bot as Webhook bot
    participant Broker as Broker
    Chart->>Bot: POST webhook {"side":"buy","size":0.10}
    Bot->>Bot: Verify token + validate payload
    Bot->>Broker: Place 0.10-lot buy order
    Broker-->>Bot: Fill confirmation
    Bot-->>Chart: Logged: position open
    
How a webhook bot turns a single TradingView buy alert into a validated, authenticated broker order in one sequence.

Say you build an alert in TradingView that triggers when EUR/USD crosses its 50-period moving average. The moment it fires, TradingView posts a webhook like {"symbol":"EURUSD","side":"buy","size":0.10} to your bot's endpoint.

In under a second the bot validates the message, maps it to your broker account, and opens a 0.10-lot long — no manual clicking, no sitting at the screen. The webhook is just the messenger; the bot is the part that authenticates, applies your rules, and routes the order, so your strategy runs the same way every time it triggers.

Why it matters: It turns a one-line alert from your chart into an automatically executed broker order, so a strategy trades exactly as written without you watching.

Trade impact: High

A malformed or spoofed webhook can fire real orders with real money, so payload validation and authentication directly affect your capital.

Real-world example

A TradingView alert on BTC/USDT posts {"side":"buy","size":0.05} to the bot's URL; the bot reads it and opens a 0.05 BTC long on Binance within roughly 300 ms of the candle close.

How SignalBots handles it

The SignalBots Connector gives you a secured webhook endpoint so your TradingView alerts execute on your broker automatically, with token checks and per-payload validation handled for you. See /risk-warning.

Pro tip

Add a shared secret or token check to your webhook endpoint so only your own alerts — not a random POST from the internet — can ever place a trade.

Common pitfalls

Exposing the webhook URL publicly without authentication, letting a forged or replayed HTTP message trigger an unwanted live order.

FAQs

Frequently asked questions

How do I connect a TradingView alert to a webhook bot?

Paste the bot's webhook URL into the alert's 'Webhook URL' field and put your order details (symbol, side, size) in the alert message as JSON. When the alert fires, TradingView posts that message to the bot, which then places the order.

Is a webhook bot safe to run live?

It is as safe as its authentication and order rules. Always protect the endpoint with a secret token and set size and risk limits, since any message that passes validation can place a real trade and your capital is at risk.

How fast does a webhook bot execute a trade?

From alert to broker order is typically a few hundred milliseconds, dominated by network transit and broker routing rather than the bot itself. Actual fill speed and price still depend on your broker and market liquidity.

What happens if the webhook message is missed or malformed?

If the payload is invalid the bot should reject it and place no order; if the message never arrives, no trade fires at all. Good bots log every message so you can see exactly which alerts were acted on.

Do I need to keep my computer on for a webhook bot?

No — the bot runs on a server that is always listening, so it reacts to alerts even when your own machine is off. That is the main reason traders move webhook execution off their desktop.

Trading involves substantial risk of loss. Historical and backtested results do not guarantee future performance. Read the full risk warning.