Skip to content

Payload grammar reference

For webhook setup, working payload examples, and first-test guidance, go to TradingView webhook format. This page is grammar-only.

BOTNAME(SYMBOL){ command; command; command; }

Minimal example:

ALPHA(BTCUSDT){type=market,side=buy,amount=0.001}

Wrapper, symbol, and command sequence rules

Section titled “Wrapper, symbol, and command sequence rules”
PartMeaning
BOTNAMEsaved connection name used inside the payload
SYMBOLuser-facing market symbol
{ ... }one command or a semicolon-separated sequence
  • market
  • limit
  • trailingLimit
  • wait
  • cancel
  • adjust
  • type
  • side
  • amount
  • position
  • price
  • offset
  • tp
  • takeProfit
  • sl
  • st
  • stopLoss
  • reduceOnly
  • postOnly
  • background
  • tag

Commands are separated by semicolons.

ALPHA(BTCUSDT){
type=market,side=buy,amount=0.001;
wait(3s);
type=limit,position=0,offset=1%,reduceOnly=true
}
price=@68000
offset=1%
offset=-1%
offset=e1%
offset=e-0.5%
wait(500ms)
wait(3s)
wait(1m)
wait(1h)
true
false
1
0
yes
no
y
n
on
off

Use this page when you already know the accepted transport shape and only need the exact grammar details.

The command block must be inside { ... }.

Every command needs a type.

Multi-command payloads need semicolons between commands.

This is invalid:

ALPHA BTCUSDT type=market side=buy amount=0.001

This is valid:

ALPHA(BTCUSDT){type=market,side=buy,amount=0.001}

Need working examples instead? Start with TradingView webhook format, then open TradingView webhook examples if you want copy-ready patterns.