Skip to main content

Depth Information

Description

Real-time order book data is delivered as a subscription stream, not a request/response call. Connect to wss://api.prex.world/ws and subscribe to the orderbook:{symbol} channel.

Upon subscribing, the server immediately pushes a snapshot of the current book, then pushes a full update every 500 ms. Each push contains the top 30 levels on each side.

Subscribe

{
"type": "subscribe",
"channel": "orderbook:BTCUSDT"
}

The server confirms with:

{
"type": "subscribed",
"channel": "orderbook:BTCUSDT"
}

Push Example

{
"type": "orderbook",
"symbol": "BTCUSDT",
"bids": [
{ "price": "65430.00", "size": "1.2" },
{ "price": "65429.50", "size": "0.8" }
],
"asks": [
{ "price": "65431.00", "size": "0.5" },
{ "price": "65431.50", "size": "1.0" }
],
"timestamp": 1711000000000
}

See WebSocket API General Info for connection, authentication, and the full channel list. For a point-in-time REST snapshot, use GET /fapi/v1/depth.