client.mark_prices() when you need mark price data for perpetual contracts. This method returns a time series of mark prices used for basis analysis, mark tracking, and liquidation-related research.
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 mark price point series rows.Example response
Fields
Mark price records include:timestamp: observation time in UTC microseconds since the Unix epochvenue: exchange identifiersymbol: normalized instrument symbolmark_price: the mark price used for margin and liquidation calculations
Example
How it works
client.mark_prices() uses snapshot-first replay: it queries the /snapshots endpoint for historical data and reads from local cached files when available. Mark prices are extracted from standardized datapoint events with the index_price or mark price labels.
For more details on snapshot-based queries, see Snapshots.
Related documentation
- Funding rates for related perpetual contract metrics
- Events if you need mark prices mixed with other datapoints
- Authentication