client.funding_rates() when you need historical funding rate data for perpetual contracts. This method returns a time series of funding rates used for carry modeling and perpetual trading analysis.
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 funding rate point series rows.Example response
Fields
Funding rate records include:timestamp: observation time in UTC microseconds since the Unix epochvenue: exchange identifiersymbol: normalized instrument symbolfunding_rate: the funding rate (decimal, e.g., 0.00017 = 0.017%)funding_interval: funding period in seconds (typically 1h, 4h, or 8h)
Example
How it works
client.funding_rates() uses snapshot-first replay: it queries the /snapshots endpoint for historical data and reads from local cached files when available. Funding rates are extracted from standardized datapoint events with the funding_rate label.
For more details on snapshot-based queries, see Snapshots.
Related documentation
- Mark prices for related perpetual contract metrics
- Events if you need funding rates mixed with other datapoints
- Authentication