Live Candles
index_candles
OHLC candle updates for index prices. Sent on every price update within the candle period. Subscribe to a specific pair and resolution, e.g. index_candles:BTC_USDC:60 for 1-hour candles.
Channel: index_candles:{pair}:{resolution}
Example: index_candles:BTC_USDC:60
Available resolutions: 1S, 1 (1m), 3, 5, 15, 30, 60 (1h), 120, 240, 360, 480, 720, D, 1D, 3D, W, M
Payload
{
"pair": "BTC_USDC",
"timeframe": "60",
"time": 1764043200,
"open": 2910.50,
"high": 2920.00,
"low": 2900.00,
"close": 2915.00,
"is_closed": false
}| Field | Type | Description |
|---|---|---|
pair | string | Trading pair (e.g. BTC_USDC) |
timeframe | string | Resolution matching the channel (e.g. 60) |
time | integer | Candle open timestamp — bucket start in Unix seconds |
open | number | Opening price (first price in the period) |
high | number | Highest price in the period |
low | number | Lowest price in the period |
close | number | Closing price (most recent price) |
is_closed | boolean | true when the candle period has ended |
sub.on("publication", (ctx) => {
const { pair, timeframe, time, open, high, low, close, is_closed } = ctx.data;
});Updated 1 day ago
