Skip to main content

Get RPI Orderbook

Query for orderbook depth data.

Covers: Spot / USDT contract / USDC contract / Inverse contract /

  • Contract: 50-level of RPI orderbook data
  • Spot: 50-level of RPI orderbook data
info
  • The response is in the snapshot format.

HTTP Request

GET /v5/market/rpi_orderbook

Request Parameters

ParameterRequiredTypeComments
categoryfalsestringProduct type. spot, linear, inverse
symboltruestringSymbol name, like BTCUSDT, uppercase only
limittrueintegerLimit size for each bid and ask: [1, 50]

Response Parameters

ParameterTypeComments
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
  • tsintegerThe timestamp (ms) that the system generates the data
    uintegerUpdate ID, is always in sequence corresponds to u in the 50-level WebSocket RPI orderbook stream
    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.
  • ctsintegerThe timestamp from the matching engine when this orderbook data is produced. It can be correlated with T from public trade channel

    Request Example

    GET /v5/market/rpi_orderbook?category=spot&symbol=BTCUSDT HTTP/1.1
    Host: api-testnet.bybit.com

    Response Example

    {
    "retCode": 0,
    "retMsg": "OK",
    "result": {
    "s": "BTCUSDT",
    "a": [
    [
    "116600.00",
    "4.428",
    "0.000"
    ]
    ],
    "b": [
    [
    "116599.90",
    "3.721",
    "0.000"
    ]
    ],
    "ts": 1758078286128,
    "u": 28419362,
    "seq": 454803359210,
    "cts": 1758078286118
    },
    "retExtInfo": {},
    "time": 1758078286162
    }