client.volume() when you need bucketed trade volume data for volume profiling and participation analysis. This method aggregates traded volume over fixed time intervals.
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_) |
| interval | str | Yes | Duration token such as 1m, 5m, 1h |
| limit | int | No | Page size (default: 1000) |
POLARIS_API_KEY environment variable or pass api_key to PolarisClient().
Return value
List of bucketed volume series rows.Example response
Fields
Volume records include:timestamp: bucket start time in UTC microseconds since the Unix epochvenue: exchange identifiersymbol: normalized instrument symbolvolume: total traded base volume for the intervalinterval: duration token such as1m,5m, or1h
Example
How it works
client.volume() aggregates volume from standardized trade data using snapshot-first replay. The SDK queries the /snapshots endpoint for historical data, reads from local cached files when available, and derives bucketed volumes from the underlying trade events.
For more details on snapshot-based queries, see Snapshots.
Related documentation
- OHLCV if you need volume alongside OHLC price data
- Trades if you need execution-level data instead of buckets
- Authentication