Skip to main content

Core Parameters

The fields you touch on every single trade. Master these and you can place a market order; everything else in this section is optional refinement.

TL;DR
  • Core fields for a normal webhook trade: exchange, pair, one direction flag (isBuy, isSell, or isClose), sizing, apiKey, and token.
  • Use isBuy: true for long/buy entries and isSell: true for sell/short entries. Reserve orderType for TradingView strategy alerts such as {{strategy.order.action}}.
  • pair is exchange-native (BTCUSDT for Binance, BTC-USDT-SWAP for OKX). TVH does not normalise.
  • token is your TVH user GUID and apiKey is the name you gave the key in the dashboard, not the exchange-issued secret.
TradingView placeholders

Most string and number-typed core fields accept Pine placeholders. The Pine alert template substitutes them before TradingView fires the webhook. See Anatomy → Dynamic values via TradingView placeholders for the list, or Pine Placeholders for the canonical reference.

Quick reference table​

PropertyTypeRequiredDefaultDescription
exchangestringyes—Target exchange identifier. Determines which exchange receives the trade. Lowercase, hyphenated. Webhook routing: Binance markets (binance / binance-futures / binance-futures-coin) must use the dedicated endpoint https://binance.tv-hub.org; every other exchange uses the standard endpoint https://alerts.tv-hub.org. Bitget: bitget for USDT-margined futures, bitget-spot for spot.
pairstringyes—Trading pair in exchange-native format. Each exchange has its own naming rules (e.g. BTCUSDT for Binance, BTC-USDT-SWAP for OKX).
isBuyboolconditionalfalseMarks the signal as a long entry. Use this for normal webhook/manual TradeCommands. Mutually exclusive with isSell and isClose.
isSellboolconditionalfalseMarks the signal as a short/ sell entry. Use this for normal webhook/manual TradeCommands. Mutually exclusive with isBuy and isClose.
isMarketboolnofalseSends a market order. When false (and isLimit is true) TVH uses the price field as a limit price.
isCloseboolconditionalfalseMarks the signal as a close-only action. Combined with closeLong / closeShort for hedge-mode flat commands.
isLimitboolnofalseSends a limit order at price. Ignored when isMarket is true.
isStopLossboolnofalseMarks the signal as a standalone stop-loss order (not an entry with attached SL). Used to add an SL to an existing position.
pricedecimalconditional0Limit price for non-market orders. Also the reference price for absolute stop-loss / take-profit calculations. On an OKX SL-only payload with useTrailingStopLoss it is the trailing activation price (activePx); omit or 0 = trailing active immediately.
tokenstringyes—Your TVH User Token, a GUID that authenticates the webhook caller (who you are). Treat as a password. Always required, and distinct from apiKey: token says who you are, apiKey says which exchange account to trade on. Every payload needs both.
orderTypestringconditional—TradingView strategy-alert direction field. Use orderType when mapping {{strategy.order.action}}; for normal webhook/manual TradeCommands use isBuy: true, isSell: true, or isClose: true.
strategyCommentstringno—Mirrors TradingView's strategy.entry/exit(..., comment=...). TVH inspects the string for close tokens (close, exit, flat) to auto-trigger an exit, or for custom tokens listed in strategyCloseValue.
broadcastSignalstringno—Name of the signal source to broadcast this trade to. Copy-trade followers of this source mirror the trade. Empty = no broadcast.
apiKeystringyes—Name of the exchange API key registered in your TVH dashboard. Always required, and distinct from token: token authenticates you, apiKey selects which exchange account/credentials the order runs on. Routes the order to the correct credentials. Do not omit it even when token is present.
strategyCloseValuestringno—Additional close token (or pipe-separated list) matched as a substring inside strategyComment, on top of the built-in close/exit/flat scan. It adds triggers, it does not replace the built-in ones. Example: "TP|SL|FLATTEN".

Minimal working payload​

The smallest possible trade command — a 0.01 BTC market buy on Binance Spot:

{
"exchange": "binance",
"pair": "BTCUSDT",
"apiKey": "binance-main",
"isBuy": true,
"units": 0.01,
"token": "YOUR_TOKEN"
}

isMarket is omitted but the trade still goes through as market because no limit flag is set and price is zero — TVH falls through to market.

Detail per property​

exchange​

AttributeValue
Typestring
Requiredyes
Default—
Auto-mappedno
TV placeholder compatibleno

Selects which exchange adapter receives the trade. Lowercase, hyphenated. Spot vs derivatives are separate identifiers — picking the wrong slug routes to the wrong adapter and the trade silently lands in the wrong market.

Allowed values (May 2026):

FamilyIdentifiers
Binancebinance (spot), binance-futures (USDT-M), binance-futures-testnet, binance-futures-coin (COIN-M), binance-futures-coin-testnet
Bybitbybit (derivatives, UTA), bybit-testnet, bybit-spot, bybit-spot-testnet
OKXokx (derivatives + spot via instrumentType)
KuCoinkucoin (futures), kucoin-spot
Coinbasecoinbase (perps), coinbase-spot

Spot vs derivatives is always a separate slug.

Example:

{ "exchange": "binance-futures" }

Gotchas:

  • Lowercase only. Binance-Futures is not accepted.
  • Testnet variants are separate exchange identifiers for Binance (e.g. binance-futures-testnet). For Bybit and OKX, demo trading is enabled per-API-key via the Demo Account checkbox — same bybit / okx slug, different flag on the key. See Account & API Keys → Demo Account checkbox.
  • New exchange identifiers are added behind a flag — if a slug isn't in the list above, check /docs/exchanges/ for the latest catalogue.

See also: pair, apiKey, instrumentType.


pair​

AttributeValue
Typestring
Requiredyes
Default—
TV placeholder compatibleyes — typically {{ticker}}

Trading pair in exchange-native format. TVH passes the value through to the exchange without normalisation. Each exchange has its own naming rule.

ExchangeSymbol formatExample
Binance SpotBASEQUOTE (no separator)BTCUSDT
Binance Futures USDT-MBASEQUOTEBTCUSDT
Binance Futures COIN-MBASEUSD_PERPBTCUSD_PERP
BybitBASEQUOTEBTCUSDT
OKXBASE-QUOTE-SWAP (perps) / BASE-QUOTE (spot)BTC-USDT-SWAP
KuCoin FuturesXBTUSDTM (lots of suffixes)XBTUSDTM
Coinbase PerpsBASE-USD-PERPBTC-USD-PERP

Example with placeholder:

{ "pair": "{{ticker}}" }

Gotchas:

  • BTCUSDT, not BTC/USDT. The slash is a UI nicety from the exchange site, not a real symbol.
  • Coinbase perps use the -PERP suffix (or TradingView's .P, e.g. BTCUSD.P). Coinbase spot does not.
  • Wrong symbol returns "Invalid symbol" from the exchange and the trade is logged as failed in the Activity Log.

See also: exchange, instrumentType.


orderType​

AttributeValue
Typestring
Requiredconditional — only for TradingView strategy-alert templates
Allowed values"buy", "sell", "close"
Default—
Auto-mappedstrategy-alert helper that can set isBuy/isSell/isClose/isMarket/chaseLimitOrder — see Anatomy
TV placeholder compatibleyes — typically {{strategy.order.action}}

orderType is for TradingView strategy alerts, especially when mapping {{strategy.order.action}}. For normal webhook/manual TradeCommands, use isBuy: true, isSell: true, or isClose: true directly.

Example with Pine placeholder (reusable for buy and sell):

{
"orderType": "{{strategy.order.action}}"
}

When TradingView fires the alert, {{strategy.order.action}} is replaced with the literal string "buy" or "sell" based on which side the Pine strategy ordered. No conditional Pine logic needed.

Gotchas:

See also: isBuy / isSell / isClose, strategyComment.


isBuy / isSell / isClose​

AttributeValue
Typebool
Requiredconditional — choose one direction flag for normal webhook/manual commands
Defaultfalse
Auto-mappedcan be derived from orderType in TradingView strategy-alert mode

Mutually-exclusive booleans for direction. These are the normal fields for webhook/manual TradeCommands:

{ "isBuy": true }

Use isSell: true for sell/short entries and isClose: true for close commands. Avoid sending both orderType and direction booleans in basic examples; orderType belongs to strategy-alert templates.

See also: orderType, isMarket / isLimit.


isMarket / isLimit​

AttributeValue
Typebool
Requiredno
Defaultfalse

Selects the order type. Mutually exclusive, but set neither and the default is market because price=0 falls through to market dispatch in most adapters.

Limit order:

{
"isLimit": true,
"price": 65000.0
}

Market order (explicit):

{ "isMarket": true }

isLimit is ignored when isMarket=true. For a limit close, see useLimitClose — that bypasses the auto-mapping that would otherwise force a market exit.

See also: price, limitPriceType, chaseLimitOrder.


isStopLoss​

AttributeValue
Typebool
Requiredno
Defaultfalse

Marks the entire payload as a standalone stop-loss order, not an entry with attached SL. TVH skips the entry path and just places (or replaces) an SL on the existing position.

Use case: a follow-up TradingView alert that adjusts the stop on an already-open position.

{
"exchange": "binance-futures",
"pair": "BTCUSDT",
"apiKey": "binance-futures-main",
"isStopLoss": true,
"cancelSlOrders": true,
"stopLossType": "absolute",
"stopLoss": 64200,
"stopLossSizeType": "currentPosition",
"token": "YOUR_TOKEN"
}

See also: stopLoss, stopLossType, updateStopLossToBreakEven.


price​

AttributeValue
Typedecimal
Requiredconditional (when isLimit=true)
Default0
TV placeholder compatibleyes — typically {{close}} or {{strategy.order.price}}

Limit price for non-market orders. Also the reference price for absolute-mode stop-loss and take-profit calculations on adapters that need an explicit price (e.g. when stopLossType="absolute" and stopLossExpression is empty).

{
"isLimit": true,
"price": "{{close}}"
}

Gotchas:

  • For market orders, price is irrelevant — leave at 0.
  • When limitPriceType is "bestPrice", the price field is overridden by TVH at submission time with the current best bid (buys) or best ask (sells).

See also: isMarket / isLimit, limitPriceType, stopLoss.


token​

AttributeValue
Typestring (GUID)
Requiredyes
Default—
TV placeholder compatibleno

Your TVH user token — the GUID that identifies which TVH account the webhook belongs to. Treat it like a password.

{ "token": "YOUR_TOKEN" }

Where to find it: Account → Settings. The token is also embedded in your personal webhook URL (the path segment after /api/trade/). TVH renders the URL with the token pre-filled — copy from there.

Gotchas:

  • Never log the token. Never check it into a public Pine script.
  • Rotate immediately if leaked — every account inherits trading authority through this single value.
  • Sharing a Pine script publicly? Use the webhook URL with the token in the path (TVH still validates it), and tell users to paste their own token.

See also: apiKey, Webhook URLs and IP.


apiKey​

AttributeValue
Typestring
Requiredyes
Default—
TV placeholder compatibleno

The name you gave the exchange API key when you added it in Account → Settings → API Keys. Not the exchange-issued key itself.

{ "apiKey": "binance-futures-main" }

apiKey is how TVH knows which credentials to dispatch the trade with. One TVH account can have many API keys across many exchanges — apiKey disambiguates.

Gotchas:

  • Case-sensitive. Binance-Main is not binance-main.
  • The exchange-issued API key and secret are stored encrypted in TVH and never appear in the JSON.

See also: token, Sub-accounts, Account & API Keys.


Routing helpers (also "core")​

These three fields live in the routing group but are conventionally set alongside the core fields. They're optional.

Sub-accounts use a named API key, not a field

There is no working subAccount payload field. To route to an exchange sub-account, register one TVH API key per sub-account and select it with apiKey. See Sub-accounts.

broadcastSignal​

AttributeValue
Typestring
Requiredno
Default""

Name of the signal source to broadcast this trade to. Copy-trade followers of this source mirror the trade. Empty = no broadcast.

{ "broadcastSignal": "alpha-scalper" }

See also: Copy Trading overview.

strategyComment​

AttributeValue
Typestring
Requiredno
Default""
Auto-mappedyes — triggers close path if string contains close / exit / flat
TV placeholder compatibleyes — typically {{strategy.order.comment}}

Mirrors TradingView's strategy.entry(..., comment=...) and strategy.exit(..., comment=...). TVH scans the string for close tokens. This is one of the most surprising auto-mappings — read Anatomy → strategyComment auto-close before using.

{ "strategyComment": "{{strategy.order.comment}}" }

To bypass the default close|exit|flat substrings, set strategyCloseValue to your own token.

strategyCloseValue​

AttributeValue
Typestring (pipe-separated list)
Requiredno
Default""

Custom token (or pipe-separated list) used to detect close intent inside strategyComment. Example: "close|exit|flat|stop" — any substring match triggers a close.

When set, only your tokens trigger close — the default close|exit|flat substrings are no longer scanned.


Putting it together​

A realistic core block before adding sizing or risk parameters:

{
"exchange": "binance-futures",
"pair": "{{ticker}}",
"apiKey": "binance-futures-main",
"orderType": "{{strategy.order.action}}",
"isMarket": true,
"strategyComment": "{{strategy.order.comment}}",
"alertTimestamp": "{{ticker}}-{{timenow}}",
"token": "YOUR_TOKEN"
}

That payload works for both long and short entries (via {{strategy.order.action}}) and automatically closes on Pine strategy.exit(...) calls (via {{strategy.order.comment}}).

Next​

Now that you have the routing and direction down, move to Sizing to control how big the trade is.