SPX as the Polaris asset ID. Use Catalog to confirm the exact ID before you query data.
Install notebook dependencies
Run this in a notebook cell:Set your API key
These examples use explicitfrom_ and to ranges, so you need POLARIS_API_KEY.
If you want to stay on the public path, omit from_ and to and use the recent public window instead.
Use the same API key you use for REST requests.
Discover the exact market ID
Do not guess the asset name. Query catalog and inspect the returned asset IDs first.SPX.
Fetch trades and plot them
Usetrades(...) when you want execution-level analysis.
Use OHLCV when you want a fast price chart
Useohlcv(...) when you want a quick candle or line chart instead of individual trades.
trades(...) when you need execution detail.
What the SDK returns
catalog(...)returns a JSON object with exchanges and exact asset IDs.trades(...)returns a list of normalized trade events.ohlcv(...)returns a list of bars. Each bar includestimestamp,open,high,low,close,volume,trades, andinterval.timestampvalues are UTC microseconds. Convert them withpd.to_datetime(..., unit="us", utc=True).
Next steps
- Read Python SDK for the core client methods and method signatures.
- Read Catalog to understand market discovery and exact asset naming.
- Read Trades if you want the normalized trade schema behind
trades(...). - Read OHLCV if you want the bar schema behind
ohlcv(...).