client.events() when you want more than just trade executions. This method returns mixed event types in a single normalized stream, including trades, bars, datapoints, and order book events.
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 mixed normalized event records.Common event types
The/events endpoint returns mixed event types:
trade: executed transactionsbar: OHLCV candlesdatapoint: market state updates such as funding rates or liquidationsorderbook: order book snapshots or updates
Common datapoint labels
datapoint events carry a market state update under data with a label and value:
funding_rate: perpetual funding rateopen_interest: open contracts or positionsliquidation: liquidation eventindex_price: mark or index price update
Example response
data.
Example
How it works
client.events() uses snapshot-first replay: it queries the /snapshots endpoint for historical data and reads from local cached files when available. The SDK handles pagination and data derivation automatically.
For more details on snapshot-based queries, see Snapshots.
Related documentation
- Standardised formats for the event envelope behind each record
- Trades if you only need executions
- OHLCV if you only need candles
- Authentication