client.bbo() when you need top-of-book quote data for spread tracking and quote monitoring. This method returns the best bid and best offer prices and quantities.
Method signature
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
| source | str | Yes | Source ID |
| market | str | Yes | Normalized market or instrument ID |
| from_ | str/datetime/date/int | Yes | Inclusive start time (ISO 8601, datetime, date, or epoch microseconds) |
| to | str/datetime/date/int | Yes | Exclusive end time (same formats as from_) |
| limit | int | No | Page size (default: 1000) |
POLARIS_API_KEY environment variable or pass api_key to PolarisClient().
Return value
List of best bid/offer quote series rows.Example response
Fields
BBO records include:timestamp: quote time in UTC microseconds since the Unix epochvenue: exchange identifiersymbol: normalized instrument symbolbid_price: best bid pricebid_quantity: quantity available at best bidask_price: best offer priceask_quantity: quantity available at best offer
ask_price - bid_price.
Example
How it works
client.bbo() uses snapshot-first replay: it queries the /snapshots endpoint for historical data and reads from local cached files when available. The SDK extracts the top levels from order book snapshots to provide best bid/offer data.
For more details on snapshot-based queries, see Snapshots.
Related documentation
- L2 snapshots if you need full order book depth
- Depth metrics for derived liquidity metrics
- Events if you need BBO updates mixed with other event types
- Authentication