Skip to main content
GET
/
trading
/
books
/
{marketId}
/
depth
Get order book depth
curl --request GET \
  --url https://api.n2.market/api/v1/trading/books/{marketId}/depth \
  --header 'X-API-Key: <api-key>'
{
  "marketId": "0336c14f-5a39-47c1-a88d-beee2e38163a",
  "outcomeId": "yes",
  "bids": [
    {
      "price": "0.58",
      "quantity": "150.00",
      "orders": 3
    },
    {
      "price": "0.57",
      "quantity": "200.00",
      "orders": 5
    },
    {
      "price": "0.56",
      "quantity": "350.00",
      "orders": 8
    }
  ],
  "asks": [
    {
      "price": "0.60",
      "quantity": "100.00",
      "orders": 2
    },
    {
      "price": "0.61",
      "quantity": "175.00",
      "orders": 4
    },
    {
      "price": "0.62",
      "quantity": "250.00",
      "orders": 6
    }
  ],
  "bestBid": "0.58",
  "bestAsk": "0.60",
  "spread": "0.02",
  "timestamp": "2026-03-30T15:45:30.123Z"
}

Authorizations

X-API-Key
string
header
required

API Key for authentication. Get your key from the dashboard.

Path Parameters

marketId
string<uuid>
required

Market UUID

Query Parameters

outcome
enum<string>
required

Outcome ID to get the order book for

Available options:
yes,
no
levels
integer
default:10

Number of price levels to return on each side

Required range: 1 <= x <= 50

Response

Order book depth retrieved successfully

marketId
string<uuid>
outcomeId
string
bids
object[]

Buy orders, sorted by price descending

asks
object[]

Sell orders, sorted by price ascending

bestBid
string

Highest bid price

bestAsk
string

Lowest ask price

spread
string

Difference between best ask and best bid

timestamp
string<date-time>

Timestamp of the snapshot