client.trades() when you want execution-level records only. Trade events represent executed transactions only. They are normalized so you can compare fills across venues without translating symbol formats or side conventions.
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 normalized trade event dictionaries.Example response
Fields
Trade events use the standard event envelope (see Standardised formats) withtype: "trade" and the following trade-specific fields under data:
data.price: matched execution pricedata.quantity: executed size in base unitsdata.side: aggressor side, one ofbuy,sell, orunknown
timestamp is the execution time in UTC microseconds since the Unix epoch.
Example
How it works
client.trades() 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 full event envelope trades are nested in
- Events if you need more than just executions
- OHLCV if you want interval-based aggregations derived from trade flow
- Raw API if you need venue-native trade messages instead
- Authentication