Skip to main content
The candle channel delivers live OHLCV updates for a contract at a specified interval. The current open bar is pushed on change, throttled to roughly every 100 ms (at most ten frames per second). When a bar closes at an interval boundary, the server pushes the finalized closed bar (with "closed": true) immediately followed by the first update for the new open bar — so your chart never misses a transition. The subscription opens with a snapshot frame of recent bars, so a chart can be drawn from the stream alone.

Subscribing

string
required
The numeric contract ID to receive candles for.
string
required
The candle interval. Accepts the same values as the candleSnapshot REST endpoint: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 3d, 1w, 1M.

Push message format

Field reference

number
Server send timestamp in Unix milliseconds.
string
Contract ID. Matches the asset value in your subscription.
string
Interval of this candle (e.g., "1m").
number
Bar open time — Unix milliseconds at the start of this interval bucket.
number
Bar close time — Unix milliseconds at the end of this interval bucket (exclusive).
string
Open price of the bar (raw string). This is the price of the first trade in the interval.
string
Highest trade price within the bar (raw string).
string
Lowest trade price within the bar (raw string).
string
Close price of the bar (raw string). For an open bar, this is the price of the most recent trade so far.
string
Total traded volume within the bar (raw string).
number
Number of individual trades that make up this bar.
boolean
false for an in-progress open bar. true for a finalized closed bar — this message is pushed exactly once at the interval boundary and will not be updated further.

Snapshot on subscribe

On a successful subscription the server first pushes a snapshot frame marked "isSnapshot": true. Its data is shaped differently from an incremental frame — an object containing roughly the last 300 closed bars plus the current open bar, in ascending time order:
Incremental frames that follow carry no isSnapshot and a single bar in data. When no data exists yet, the snapshot frame carries "data": {}.

Initialising a chart

1

Subscribe and render the snapshot

The first frame is the snapshot described above. Render its candles array as the initial chart state — no REST call is required for a standard chart window.
2

Merge increments on bar open time (t)

Subsequent frames carry one bar each. Key on data.t: update the bar with a matching t, or append a new one.
3

Handle closed-bar events

A message with "closed": true finalizes that bar. The next message carries the new open bar with a later t.
4

Fetch longer history via REST

For a window deeper than the snapshot, call candleSnapshot.
Do not rely on the incremental stream to fill a quiet period. While the exchange is running, an interval with no trades is backfilled with a flat bar (v of 0) so the axis stays continuous — but after a long gap with no trades, only the most recent flat bar is pushed, not each one in between. Those bars are still stored: re-subscribe to take a fresh snapshot, or call candleSnapshot.
Do not assume the time axis has no holes. Intervals that elapse while a node is restarting or stopped are not backfilled, leaving a permanent gap in history. Render missing ranges as “no data” — prices and volumes elsewhere remain correct.
An open bar is pushed only when it changes. If no trade has occurred since the last push, the same values are not re-sent.
You can subscribe to multiple intervals for the same asset simultaneously — for example, 1m and 1h — each as a separate subscription. They operate independently and do not interfere with each other.
All price and volume values are raw strings. Apply the contract’s decimal precision before rendering values on a chart.