Order Book Depth
Retrieve the current REST snapshot of order book depth for a market.
For live order book updates, use the WebSocket order book stream.
Get Order Book Depth
Retrieve current order book depth (bids and asks) for a market.
GET /v1/depth
Query Parameters
curl -X GET \
"https://api.o2.app/v1/depth" \
-H "Accept: application/json"Response Structure (source):
action: Action type ("depth")orders.buys: Array of buy orders (sorted by price descending)orders.sells: Array of sell orders (sorted by price ascending)market_id: Market identifier
Source: packages/api/src/domain/depth.rs:13-17
Turbo depth views
Add turbo=true to select the market's paired House book. The optional view parameter selects which liquidity to show:
| Request | Liquidity |
|---|---|
?market_id=…&precision=1 | All canonical resting orders |
?market_id=…&precision=1&turbo=true | Canonical shared orders available to Turbo takers |
?market_id=…&precision=1&turbo=true&view=demand | Resting Turbo orders that House can execute against |
view=executable is the Turbo default. view=demand requires turbo=true. Turbo responses add turbo and depth_view (executable or demand). Canonical responses retain their existing shape.
Both views use the existing live depth lifecycle, including preconfirmations, rollback and price aggregation. Quantities remain visible while either book is paused or the sidecar is disconnected; a depth response does not guarantee that trading is enabled. The Turbo market ticker uses the best executable price levels and their aggregate quantities for its bid/ask fields.
The same selectors apply to WebSocket subscribe_depth and subscribe_depth_view, and to their corresponding unsubscribe requests:
{"action":"subscribe_depth","market_id":"…","precision":"10","turbo":true,"view":"demand"}Canonical, executable and demand subscriptions can coexist for the same market. Send the same turbo and view selectors when unsubscribing. Turbo WebSocket responses carry depth_view alongside the existing view snapshot or changes payload.