chart.exchange#
The chart's active exchange (binance, bybit, okx, hyperliquid, coinbase, ...).
SYNTAX#
ctx.exchange: stringRETURNS#
string — venue identifier, or "" when unset.
REMARKS#
Use to branch on venue-specific behavior (e.g. funding-rate cadence, tick-size rounding rules).
EXAMPLE#
function onBar(i, ctx) {
// Hyperliquid uses a 5-significant-figures rule above the tick size.
if (ctx.exchange === 'hyperliquid') {
// ... custom rounding ...
}
}