Skip to main content

Order Book Depth

Description

Returns a price-aggregated snapshot of the live in-memory order book. Use last_update_id to sequence diffs received over a future WebSocket depth channel.

HTTP Request

GET /spot/depth (public — no auth required)

Weight

0 — public market-data endpoints have no per-IP weight limit today (MVP).

Request Parameters

NameTypeRequiredDescription
symbolSTRINGYESMarket id (e.g. DFUSDT). Case-sensitive. See GET /spot/markets.
limitNUMBERNONumber of price levels per side. Default 50, range 1–1000. Clamped server-side; no error on out-of-range values.

Response Example

200 OK

{
"symbol": "DFUSDT",
"last_update_id": 12345,
"bids": [
["0.5000", "100"],
["0.4999", "200"]
],
"asks": [
["0.5001", "150"],
["0.5002", "180"]
]
}
FieldNotes
last_update_idMonotonic engine counter, bumped on every book mutation (place / cancel / fill). Use this to detect gaps when stitching WebSocket depth diffs.
bidsDescending by price (best bid first). Each entry is [price, total_qty_at_level] — both strings.
asksAscending by price (best ask first). Same [price, qty] format.

Quantity at each level is the sum of all resting orders at that price — individual order ids are not exposed.

Error Responses

HTTPerror
503spot trading disabled (server has SPOT_TRADING_ENABLED=false)
503ENGINE_BUSY
503ENGINE_RESTARTING

Full list: Error Codes.

Code Examples

cURL

curl -s "https://api-sepolia.p99.world/api/v1/spot/depth?symbol=DFUSDT&limit=10"

Python

import requests

BASE = "https://api-sepolia.p99.world/api/v1"

book = requests.get(f"{BASE}/spot/depth", params={"symbol": "DFUSDT", "limit": 10}).json()
print("update_id:", book["last_update_id"])
print("best bid:", book["bids"][0] if book["bids"] else "empty")
print("best ask:", book["asks"][0] if book["asks"] else "empty")