Skip to main content

RPI Orderbook

Subscribe to the orderbook stream including RPI quote

Depths

Spot:
Level 50 data, push frequency: 100ms

Topic:
orderbook.rpi.{symbol} e.g., orderbook.rpi.BTCUSDT

Response Parameters

ParameterTypeComments
topicstringTopic name
typestringData type. snapshot,delta
tsnumberThe timestamp (ms) that the system generates the data
datamapObject
> sstringSymbol name
> barrayBids. For snapshot stream. Sorted by price in descending order
>> b[0]stringBid price
>> b[1]stringNone RPI bid size
  • The delta data has size=0, which means that all quotations for this price have been filled or cancelled
  • >> b[2]stringRPI bid size
  • When a bid RPI order crosses with a non-RPI ask price, the quantity of the bid RPI becomes invalid and is hidden
  • > aarrayAsks. For snapshot stream. Sorted by price in ascending order
    >> a[0]stringAsk price
    >> a[1]stringNone RPI ask size
  • The delta data has size=0, which means that all quotations for this price have been filled or cancelled
  • >> a[2]stringRPI ask size
  • When an ask RPI order crosses with a non-RPI bid price, the quantity of the ask RPI becomes invalid and is hidden
  • > uintegerUpdate ID
  • Occasionally, you'll receive "u"=1, which is a snapshot data due to the restart of the service. So please overwrite your local orderbook
  • > seqintegerCross sequence
  • You can use this field to compare different levels orderbook data, and for the smaller seq, then it means the data is generated earlier.
  • ctsnumberThe timestamp from the matching engine when this orderbook data is produced. It can be correlated with T from public trade channel

    Subscribe Example

    {
    "op": "subscribe",
    "args": [
    "orderbook.rpi.BTCUSDT"
    ]
    }

    Subscribe Success Response

    {
    "success": true,
    "ret_msg": "subscribe",
    "conn_id": "f6b17b77-48b6-4c5c-b5ec-4a1c733f5763",
    "op": "subscribe"
    }

    Response Example

    {
    "topic": "orderbook.rpi.BTCUSDT",
    "ts": 1752472188075,
    "type": "delta",
    "data": {
    "s": "BTCUSDT",
    "b": [
    [
    "121975.1",
    "0.114259",
    "0"
    ],
    [
    "121969.9",
    "0",
    "0"
    ],
    [
    "121960.5",
    "0",
    "0.163986"
    ]
    ],
    "a": [
    [
    "121990.8",
    "0.441585",
    "0.78821"
    ],
    [
    "121996.1",
    "0.016393",
    "0"
    ],
    [
    "122018.5",
    "0",
    "0"
    ]
    ],
    "u": 2258980,
    "seq": 79683241099
    },
    "cts": 1752472188067
    }