Orderbook

The Orderbook API provides real-time access to market depth and order data for specific market outcomes.

Get Orderbook Data

Retrieve the orderbook for a specific market outcome.

Get orderbook list

get
Path parameters
outcomeIdstring · min: 1RequiredExample: 546eb1a1-b87d-49d4-a579-9c80c0601c72
Query parameters
pagestringOptionalDefault: 1Example: 1Pattern: ^\d+$
pageSizestringOptionalDefault: 20Example: 20Pattern: ^\d+$
sortstring · enumOptionalDefault: descExample: descPossible values:
Responses
200

Orderstable data

application/json
get
/api/v1/orderbook/{outcomeId}

Code Examples

Get Spread

Retrieve the orderbook spread for a specific market outcome.

Get orderbook spread

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
outcomeIdstring · min: 1RequiredExample: 546eb1a1-b87d-49d4-a579-9c80c0601c72
Responses
200

Orderbook spread data

application/json
get
/api/v1/orderbook/spread/{outcomeId}

Best Practices

  1. Polling Frequency: Don't poll too frequently; respect rate limits

  2. Data Caching: Cache orderbook data with appropriate TTL

  3. Error Handling: Handle network errors and invalid responses gracefully

  4. Price Validation: Validate prices are within valid range (0-1)

  5. Depth Analysis: Consider market depth when placing large orders

  6. Real-time Updates: For high-frequency updates, consider WebSocket connections when available

Performance Tips

  • Use pagination to limit response size

  • Cache orderbook data for recently viewed markets

  • Implement exponential backoff for retry logic

  • Consider aggregating multiple outcome orderbooks in parallel

  • Monitor rate limit headers to avoid throttling

Last updated

Was this helpful?