Skip to Content
Public

Order Book

GET
/v1/order-book/{instrument_code}

Get the specified instrument's order book. At most the top 16 price levels per side are returned. When depth is supplied it takes precedence over level; level is still validated. Snapshots are cached for 1 second, so consecutive requests within a second can return the same book. Only markets in state ACTIVE or POST_ONLY have an order book.

Path Parameters

instrument_code*string

The instrument code, e.g. BTC_USDC.

Query Parameters

level?stringDeprecated

Deprecated; use depth. Level 1 = best bid and ask Level 2 and Level 3 = top 16 price levels per side

Default"3"
Value in"1""2""3"
depth?string

The number of price levels per side to return (maximum 16). Depth of 1 will return top of book.

Default"16"
Value in"1""2""4""8""16"

Response Body

OK

application/json
  1. response
asks*array<>

Ask price levels, best (lowest) first.

bids*array<>

Bid price levels, best (highest) first.

instrument_code*string

The instrument code.

time*integer

Nanosecond timestamp of the order-book snapshot. The value exceeds 2^53 and the server reads it as an IEEE-754 double, so it reaches you already rounded (the last few digits are not exact).

unum_bids?integer

Count of bids in the full book.

unum_asks?integer

Count of asks in the full book.

Example Request
curl -X GET 'https://api.onetrading.com/fast/v1/order-book/BTC_USDC?level=1&depth=16'
Example Response
{  "instrument_code": "BTC_USDC",  "time": 1730900885466242800,  "asks": [    {      "price": "100000",      "amount": "6"    }  ],  "bids": [    {      "price": "10000",      "amount": "6"    }  ],  "unum_bids": 1,  "unum_asks": 1}