Skip to main content
The order book and trade history methods on client.markets give you the depth and execution data you need to price orders accurately and monitor market activity. Use markets.book() or markets.orderbook() for a snapshot of a single venue instrument, markets.generic_asset_orderbook() for a consolidated view across all venues carrying the same underlying asset, and markets.trades(), markets.prints(), and markets.stats() to access fill history and summary statistics.

markets.book

Fetch a lightweight Level 2 order book snapshot for a specific venue instrument. Returns the current resting bids and asks with price and size at each level.
Endpoint: GET /v1/markets/{id}/book
integer | string
required
The venue-specific instrument ID to retrieve the order book for.

markets.orderbook

Retrieve the full order book for a venue instrument from the /v1/orderbooks endpoint. Returns bids and asks with price and quantity at each level.
Endpoint: GET /v1/orderbooks/{id}
integer | string
required
The venue-specific instrument ID.
markets.book() and markets.orderbook() both return order book data for a single venue instrument but hit different endpoints. Use markets.book() for a lightweight snapshot and markets.orderbook() when you need the full depth from the /v1/orderbooks service.

markets.generic_asset_orderbook

Retrieve an aggregated order book that consolidates depth across all venues carrying the same underlying generic asset. This is the correct endpoint to use when you intend to route using BEST_PRICE or SPLIT mode, since those routing modes operate on the generic asset level rather than on a specific venue instrument.
Endpoint: GET /v1/orderbooks/generic-asset/{id}
integer
required
The generic asset ID shared across venue-specific instruments that represent the same underlying market.
string
Your subaccount identifier. Include this to receive fee-adjusted pricing relevant to your account tier.
markets.generic_asset_orderbook() is also accessible as markets.aggregated_book() — both names call the same method and endpoint. Use whichever is clearer at your call site.

markets.trades

Retrieve the most recent exchange-confirmed trades for a specific venue instrument. Each record represents a completed fill at a given price and size.
Endpoint: GET /v1/markets/{id}/trades
integer | string
required
The venue-specific instrument ID.
integer
default:"100"
Maximum number of trade records to return.

markets.prints

Query the public trade-print stream for recent fills across all instruments or for a specific instrument. This endpoint serves the same data available over the /v1/ws/tradeprints WebSocket stream.
Endpoint: GET /v1/tradeprints
integer | string
Filter trade prints to a specific instrument. Omit to retrieve prints across all instruments.
integer
default:"100"
Maximum number of trade prints to return.
Use markets.prints() for a historical snapshot of recent public fills. For a continuous real-time feed, subscribe to the /v1/ws/tradeprints WebSocket stream using client.iter_ws("/v1/ws/tradeprints").

markets.stats

Fetch summary statistics for a venue instrument, including 24-hour volume, last traded price, and open interest.
Endpoint: GET /v1/markets/{id}/stats
integer | string
required
The venue-specific instrument ID to retrieve statistics for.