Skip to main content

Kline and Ticker Streams

Status: Implemented.

Both streams are aggregated in the gateway from the fill feed and throttled to one frame per second per symbol.

Kline stream​

Stream: <symbol>@kline_1m · Update speed: 1 s while a bar is open; immediately on bar close

Only the 1m interval exists on the WebSocket surface; other intervals are served by GET /api/v3/klines.

Frame (values illustrative)

{
"e": "kline",
"E": 1756600050000,
"s": "CBTC-USDCB",
"k": {
"t": 1756600020000,
"T": 1756600079999,
"s": "CBTC-USDCB",
"i": "1m",
"f": -1,
"L": -1,
"o": "59990.00",
"c": "60001.50",
"h": "60020.00",
"l": "59980.00",
"v": "1.2345",
"n": 17,
"x": false,
"q": "74061.123456",
"V": "0",
"Q": "0",
"B": "0"
}
}
FieldTypeNotes
EnumberEvent time, Unix ms.
k.t, k.TnumberBar open time and close time (t + 59999).
k.istringAlways "1m".
k.f, k.LnumberAlways -1 (first/last trade id; trade ids are UUIDs, so no honest integer exists).
k.o, k.h, k.l, k.c, k.v, k.qstringOHLC, base volume, quote volume (18 dp).
k.nnumberTrades in the bar.
k.xbooleantrue on the final frame for the bar.
k.V, k.Q, k.BstringAlways "0" (no taker-side split).

Semantics

  • While a bar is open, the current bar is re-sent every second, including seconds with no new trades.
  • When the minute rolls the closed bar is sent once with x: true, immediately (on the next fill or on the 1 s clock tick, whichever comes first).
  • No frames for empty minutes. If no trade occurs in a minute, no bar is opened and nothing is sent; Binance would send a flat bar. Expect gaps and carry the previous close yourself.
  • On connect you receive the bar in progress, if any. Earlier bars are not replayed; fetch them from GET /api/v3/klines?interval=1m.
  • A fill that arrives after its minute has already been closed is dropped from the kline aggregate rather than reopening a published bar (it still appears on @trade and in the ticker window).

24h ticker stream​

Stream: <symbol>@ticker · Update speed: 1 s

Rolling 24-hour statistics for one symbol, the same window as GET /api/v3/ticker/24hr. The window is seeded from the last 24 hours of fills at gateway start, so a fresh subscriber immediately receives a full-window figure.

Frame (values illustrative)

{
"e": "24hrTicker",
"E": 1756600050000,
"s": "CBTC-USDCB",
"p": "150.50",
"P": "0.251",
"w": "59995.123456789012345678",
"x": "59850.00",
"c": "60000.50",
"Q": "0.0100",
"b": "0",
"B": "0",
"a": "0",
"A": "0",
"o": "59850.00",
"h": "60120.00",
"l": "59700.00",
"v": "12.3456",
"q": "740610.123456",
"O": 1756513600000,
"C": 1756599998000,
"F": 0,
"L": 0,
"n": 421
}
FieldTypeNotes
p, PstringPrice change and percent change (3 dp; "0" when open is 0).
wstringVWAP over the window (18 dp; "0" when volume is 0).
xstringPrevious close — equals o (first trade in the window).
c, QstringLast price and last quantity.
b, B, a, AstringAlways "0" — best bid/ask is not part of this aggregate; use @depth5.
o, h, l, v, qstringOpen, high, low, base volume, quote volume.
O, CnumberFirst and last trade time in the window, Unix ms.
F, LnumberAlways 0 (trade ids are UUIDs).
nnumberTrade count in the window.

Semantics

  • Sent every second while the 24 h window contains at least one trade. A market with no fills in the last 24 hours sends nothing (the REST endpoint returns a zero-statistics object instead).
  • The window slides trade-by-trade; h/l fall when the trade that set them ages out.
  • Windows are retained per symbol up to 100 000 trades; beyond that the window is truncated to the most recent 100 000 (narrower than 24 h, never wider).

Differences from Binance

  • Kline: 1m only; f/L are -1; no flat bars for empty minutes.
  • Ticker: b/B/a/A are "0"; F/L are 0; no !ticker@arr all-market stream and no @miniTicker.