Public
RPI Depth Channel
Description
Push RPI (Retail Price Improvement) depth data. rpi-books is the full depth channel, rpi-books1 is the 1-level channel, rpi-books5 is the 5-level channel, and rpi-books50 is the 50-level channel:
-
rpi-bookscorresponds to full-depth data, the first push is the full datasnapshot, subsequent pushes are incremental updates:update -
rpi-books1corresponds to 1-level depth data, every push:snapshot -
rpi-books5corresponds to 5-level depth data, every push:snapshot -
rpi-books50corresponds to 50-level depth data, every push:snapshot -
rpi-books1push frequency: 10ms -
rpi-books5push frequency: 100ms -
rpi-books50push frequency: 100ms -
rpi-bookspush frequency: 100ms
Sequence Number (seq)
- The standard orderbook and the RPI orderbook maintain independent seq rules, each calculated separately.
Code
Request Parameters
| Parameters | Type | Required | Description |
|---|---|---|---|
| op | String | Yes | Operation subscribe Subscribe unsubscribe Unsubscribe |
| args | List<Object> | Yes | Subscribed channel |
| > instType | String | Yes | Product typespot Spot tradingusdt-futures USDT futures coin-futures Coin-M futures usdc-futures USDC futures |
| > topic | String | Yes | Topic rpi-books All levels rpi-books1 1 level rpi-books5 5 levels rpi-books50 50 levels |
| > symbol | String | Yes | Symbol name e.g., BTCUSDT |
Code
Response Parameters
| Parameters | Type | Description |
|---|---|---|
| event | String | Event |
| arg | Object | Subscribed channel |
| > instType | String | Product typespot Spot tradingusdt-futures USDT futures coin-futures Coin-M futures usdc-futures USDC futures |
| > topic | String | Topic |
| > symbol | String | Symbol name |
| code | String | Error code |
| msg | String | Error message |
| connId | String | Connection ID |
Code
Push Parameters
| Return Field | Parameter Type | Description |
|---|---|---|
| arg | Object | Subscribed channel |
| > instType | String | Product typespot Spot tradingusdt-futures USDT futures coin-futures Coin-M futures usdc-futures USDC futures |
| > topic | String | Topic |
| > symbol | String | Symbol name |
| action | String | Data push action snapshot Full push update Incremental push |
| ts | String | Data push timestamp |
| data | List<Object> | Subscribed data |
| > a | List<String> | Sell Asks. Sort by price in ascending order |
| > > a[0] | String | Ask price |
| > > a[1] | String | Ask non-RPI quantity |
| > > a[2] | String | Ask RPI quantity |
| > b | List<String> | Buy bids. Sort by price in descending order |
| > > b[0] | String | Bid price |
| > > b[1] | String | Bid non-RPI quantity |
| > > b[2] | String | Bid RPI quantity |
| > > seq | String | Serial number. It increments when the order book is updated and can be used to determine whether there are out-of-order packets. |
| > > pseq | String | The serial number of the previous push. Can be used to determine if there has been packet loss. This field only has a value for the rpi-books channel. |
| > > ts | String | The timestamp that the system generated data A Unix timestamp in milliseconds |
