Skip to main content

Push message format

Every push frame is a unified envelope {ch, event, data}:

  • ch — the channel family name. It is the dispatch key: the same ch always carries the same data shape. Dispatch your handlers on ch.
  • event — the normalized subscription string (<type>@<symbol>, e.g. deal@btc_usdt). Match a frame back to your subscription by event.
  • data — the payload. An object for single-symbol channels, an array for batch channels (tickers, pred_tickers). Field keys are short keys; only non-null fields are present.

Note the full-depth family carries ch depth_update (with a type = snapshot/delta field inside data), while fixed-level depth carries ch depth. K-line carries ch kline (the family name, without the interval — the interval is in event and data.i).

format

{
"ch": "deal", //channel family (dispatch key)
"event": "deal@btc_usdt", //normalized subscription string
"data": {
"s": "btc_usdt", //symbol
"p": "43000", //price
"a": "0.21", //quantity (base)
"m": "BID", //taker side: BID or ASK
"t": 1655992403617 //time
}
}

Example of transaction record (real-time push message)

{
"ch": "deal",
"event": "deal@btc_usdt",
"data": {
"s": "btc_usdt",
"p": "43000",
"a": "0.21",
"m": "BID",
"t": 1655992403617
}
}