TradingView alert message reference for Hyperliquid webhooks
Every action, field and placeholder of the TradingView alert message that trades Hyperliquid, how tickers map to markets, and what each error means.
9 min read
Free tool
A TradingView alert message is the text TradingView sends to a webhook URL each time an alert fires. For Webhooks for TradingView on a Hypr Markets terminal it is one JSON object with an action, a symbol and a size, such as a buy of $100 of {{ticker}}. The generator below writes messages for all 9 actions and both Pine Script strategy templates, and the checker runs any message through the same parser the webhook receiver uses.
Message to paste into TradingView
{
"id": "{{ticker}}-{{interval}}-{{timenow}}",
"ts": "{{timenow}}",
"action": "buy",
"symbol": "{{ticker}}",
"size_usd": 100,
"sl_pct": 2,
"tp_pct": 4
}In TradingView: paste it into the alert's Message box, then tick Webhook URL under Notifications and paste the URL from your terminal.
Paste any alert message. The receiver's own parser reads it here, in your browser.
Result
Valid message
Mapped against the main markets that have a page on Hypr Markets; load the live list for every market. Limits, positions and prices are checked only by the Test button in the terminal.
TradingView is a trademark of TradingView, Inc. Hypr Markets is not affiliated with, endorsed or sponsored by TradingView. Automated orders can lose money as fast as manual ones; nothing here is financial advice.
An action (buy, sell, close, close_long, close_short, flat, cancel_all, reverse or target), a symbol, usually {{ticker}} so the chart's own ticker arrives with the alert, and for buy and sell exactly one size: size_usd, size_pct or size_coins. Optional fields add a limit price, a stop-loss and take-profit as a price or a percentage, leverage from 1 to 50, a slippage cap, and a passphrase when the webhook has one.
Two more lines are worth keeping in every message: id, which makes a repeated alert with the same id do nothing, and ts set to {{timenow}}, which lets the webhook refuse an alert that arrives too late. The generator adds both unless you switch them off.
Match the position is the safer choice for a strategy. The message carries {{strategy.market_position}} and {{strategy.position_size}}, and each alert moves the account to that position, so a missed alert is put right by the next one. Follow each order carries {{strategy.order.action}} and {{strategy.order.contracts}} and copies every order, which reads simply in a log but leaves the account out of step if one alert never arrives.
Either way, a TradingView backtest leaves out Hyperliquid's fees, the terminal's trading fee, funding and slippage unless the strategy adds them. Start with small limits on the webhook.
The checker runs the message through the receiver's own parser in your browser. It reports unknown fields, missing or conflicting sizes, a limit order without a price, a stop or target on a reduce-only order, and placeholders TradingView would not fill. It then maps the ticker to a Hyperliquid market with the receiver's rules and says in plain words what the alert would do.
It cannot see a webhook's limits, the client's position or the live price, so it never says an order would be accepted. The Test button on the TradingView page of the terminal runs that full dry run against the real webhook, and signs nothing.
TradingView replaces each placeholder with text before it sends the alert. Quoted placeholders keep the message valid JSON before and after that replacement, and the receiver reads a number written as text, such as "0.25", as a number. A placeholder TradingView cannot fill arrives unchanged and is refused, so a wrong variable can never place an order with a made-up size.
Every action, field and placeholder of the TradingView alert message that trades Hyperliquid, how tickers map to markets, and what each error means.
9 min read
Step by step: turn a TradingView alert into an order on your own Hyperliquid account with a webhook, a trade-only key, your own limits and a dry run first.
9 min read
Follow each order or match the position: how a Pine Script strategy becomes Hyperliquid orders through a webhook, with worked examples, costs and caps.
8 min read