Roxom.com

Order Book Depth

Copy page

Stream full order book snapshots and incremental delta updates for efficient book reconstruction.

Overview

The depth stream provides order book snapshots and incremental updates (deltas) for efficient reconstruction of the full book.

Channel information

PropertyValue
Channel Namedepth
AuthenticationRequired
Update FrequencyReal-time
Data TypeSnapshot and delta

Subscribe

Request

Subscribe
{
  "op": "subscribe",
  "args": [
    { "channel": "depth", "symbol": "US500-BTC" },
    { "channel": "depth", "symbol": "GOLD-BTC" },
    { "channel": "depth", "symbol": "USDT-BTC" }
  ]
}

Snapshot example

Response

Orderbook Snapshot
{
  "topic": "depth.GOLD-BTC",
  "type": "snapshot",
  "createdTime": 1640995200000000000,
  "data": {
    "symbol": "GOLD-BTC",
    "bid": [["0.00089410", "89.25"], ["0.00089400", "50.00"]],
    "ask": [["0.00089430", "156.75"], ["0.00089440", "203.00"]],
    "timestamp": 1640995200000000000
  }
}

Delta example

Response

Orderbook Delta
{
  "topic": "depth.GOLD-BTC",
  "type": "delta",
  "createdTime": 1640995200000000000,
  "data": {
    "symbol": "GOLD-BTC",
    "bid": [["0.00089415", "10.00"]],
    "ask": [["0.00089435", "-5.00"]],
    "timestamp": 1640995200000000000
  }
}

Last modified on