Payload grammar reference
For webhook setup, working payload examples, and first-test guidance, go to TradingView webhook format. This page is grammar-only.
Base payload grammar
Section titled “Base payload grammar”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”| Part | Meaning |
|---|---|
BOTNAME | saved connection name used inside the payload |
SYMBOL | user-facing market symbol |
{ ... } | one command or a semicolon-separated sequence |
Supported command types
Section titled “Supported command types”marketlimittrailingLimitwaitcanceladjust
Common fields
Section titled “Common fields”typesideamountpositionpriceoffsettptakeProfitslststopLossreduceOnlypostOnlybackgroundtag
Sequences
Section titled “Sequences”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 forms
Section titled “Price forms”price=@68000offset=1%offset=-1%offset=e1%offset=e-0.5%Wait syntax
Section titled “Wait syntax”wait(500ms)wait(3s)wait(1m)wait(1h)Boolean values
Section titled “Boolean values”truefalse10yesnoynonoffRead this after the webhook format guide
Section titled “Read this after the webhook format guide”Use this page when you already know the accepted transport shape and only need the exact grammar details.
Common syntax mistakes
Section titled “Common syntax mistakes”Missing braces
Section titled “Missing braces”The command block must be inside { ... }.
Missing command type
Section titled “Missing command type”Every command needs a type.
Broken separators
Section titled “Broken separators”Multi-command payloads need semicolons between commands.
Wrong wrapper
Section titled “Wrong wrapper”This is invalid:
ALPHA BTCUSDT type=market side=buy amount=0.001This 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.