Order Book
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.
instrument_code*stringThe instrument code, e.g. BTC_USDC.
level?stringDeprecatedDeprecated; use depth.
Level 1 = best bid and ask
Level 2 and Level 3 = top 16 price levels per side
"3""1""2""3"depth?stringThe number of price levels per side to return (maximum 16). Depth of 1 will return top of book.
"16""1""2""4""8""16"OK
application/json- response
asks*array<>Ask price levels, best (lowest) first.
bids*array<>Bid price levels, best (highest) first.
instrument_code*stringThe instrument code.
time*integerNanosecond 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?integerCount of bids in the full book.
unum_asks?integerCount of asks in the full book.
curl -X GET 'https://api.onetrading.com/fast/v1/order-book/BTC_USDC?level=1&depth=16'{ "instrument_code": "BTC_USDC", "time": 1730900885466242800, "asks": [ { "price": "100000", "amount": "6" } ], "bids": [ { "price": "10000", "amount": "6" } ], "unum_bids": 1, "unum_asks": 1}