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
Note: API key required for historical ranges. Set
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 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
- 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