Skip to content

Order book

GET
/api/market-data/book
curl --request GET \
--url 'https://example.com/api/market-data/book?market_id=1&depth=5'

The top levels of one open market’s book, Up prices only. seq is the book’s sequence number on the market-data socket.

market_id
required
Market Id
integer

The market.

depth
Depth
integer
default: 5

Levels a side, up to 50. 5 if not given.

Successful Response

Media typeapplication/json
BookLevels
object
market_id
required
Market Id
integer
seq
required
Seq

The market’s book sequence number, as on the websocket.

integer
bids
required
Bids

Up bids as [price_bps, quantity], best first.

Array<array>
asks
required
Asks

Up asks as [price_bps, quantity], best first.

Array<array>
Examplegenerated
{
"market_id": 1,
"seq": 1,
"bids": [
[
"example"
]
],
"asks": [
[
"example"
]
]
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}