TradingView webhook alerts: JSON format and examples
The JSON fields Copygram reads from TradingView alerts, the signal_id rule for modify and close, and ready-to-copy examples for every order type.
Updated Oct 26, 2026
AI-powered alerts, no schema
Copygram reads your TradingView alerts with AI: there is no strict JSON schema. Send the fields you have and Copygram works out the intent. The more context you include, the more reliable execution becomes.
{
"action": "sell",
"symbol": "GBPJPY",
"volume": 0.01
}Read by Copygram AI
- Action
- SELL
- Symbol
- GBPJPY
- Volume
- 0.01
- Type
- Market
Recommended fields
Field | Purpose | Example | Status |
|---|---|---|---|
| action | What to do: open, modify, close, close half, move SL to BE | "buy" | Recommended |
| order_type | Order direction and type | "BUY LIMIT" | Recommended |
| symbol | Instrument to trade | "GBPJPY" | Recommended |
| volume | Lot size of the order | 0.01 | Recommended |
| entry | Entry price (mostly for pending orders) | 185.250 | Optional |
| sl | Stop loss price | 184.800 | Optional |
| tp | Take profit price | 186.500 | Optional |
| signal_id | Unique trade ID, required to modify or close a specific trade later | "qt_102938" | If modifying |
Supported order types
Market buy, fills at the current ask
Pending buy below the current price
Pending buy above the current price
Market sell, fills at the current bid
Pending sell above the current price
Pending sell below the current price
The signal_id rule
You only need a signal_id when you plan to modify SL/TP, close a specific trade or manage a position from a later alert.
- The original open alert defines the
signal_id. - Every later modify or close alert for that trade must reuse the same id.
- Best practice: have your TradingView strategy generate a random or sequential id and reuse it.
Examples
The bare minimum: Copygram infers the rest.
{
"action": "sell",
"symbol": "GBPJPY",
"volume": 0.01
}Read by Copygram AI
- Action
- SELL
- Symbol
- GBPJPY
- Volume
- 0.01
- Type
- Market
Recommended for trades you'll modify or close later.
{
"action": "buy",
"order_type": "BUY",
"symbol": "GBPJPY",
"volume": 0.01,
"sl": 185.000,
"tp": 186.500,
"signal_id": "qt_102938"
}Read by Copygram AI
- Action
- BUY
- Symbol
- GBPJPY
- Volume
- 0.01
- SL
- 185.000
- TP
- 186.500
- Signal ID
- qt_102938
Reuses the signal_id of the open alert.
{
"action": "modify",
"symbol": "GBPJPY",
"sl": 185.400,
"signal_id": "qt_102938"
}Read by Copygram AI
- Action
- MODIFY
- Symbol
- GBPJPY
- New SL
- 185.400
- Signal ID
- qt_102938
Two actions on the same trade.
{
"action": "close half",
"signal_id": "qt_102938"
}{
"action": "move SL to BE",
"signal_id": "qt_102938"
}Use entry for the pending price.
{
"action": "open",
"order_type": "BUY LIMIT",
"symbol": "EURUSD",
"entry": 1.07500,
"volume": 0.05,
"sl": 1.07200,
"tp": 1.08100,
"signal_id": "qt_102939"
}Read by Copygram AI
- Type
- BUY LIMIT
- Symbol
- EURUSD
- Entry
- 1.07500
- Volume
- 0.05
- SL
- 1.07200
- TP
- 1.08100
Quick close by symbol, no JSON needed.
close EURUSD
Read by Copygram AI
- Action
- CLOSE
- Symbol
- EURUSD
- Scope
- All receivers
- Match
- All open EURUSD
"Close opposite positions" is not a webhook field
If a new BUY signal should close any open SELL on the same symbol (and the other way round), turn on Close opposite positions in the receiver's settings (Entries and exits), not in your alert payload.
Go to receiver settingsTips and best practices
- Include as many fields as you can: execution gets more reliable.
- Generate a random
signal_idper trade in your strategy. - Reuse the same
signal_idon later modify and close alerts. - Plain text commands like
close EURUSDwork for quick actions. - Create your webhook URL under Signal sources → TradingView.
- Test with a small volume before scaling up.
Want to copy TradingView alerts to your broker? See how Copygram does it.
TradingView trade copierNext steps
Telegram signals: the messages Copygram understands
How Copygram reads Telegram signal messages: entries, stop loss and take profit, closes, breakeven and partial closes, and when a reply is needed.
Connect MetaTrader 4 and 5 to Copygram
Connect an MT4 or MT5 account to Copygram’s hosted MetaTrader with your login, password and server. No VPS, no terminal left open.
Connect Tradovate to Copygram
Connect a Tradovate futures account to Copygram through Tradovate’s own sign-in, then copy trades to it or use it as a room’s signal source.
