Charts
Draft API - Use at Own Risk: These
/webendpoints are non-stable draft endpoints subject to change without notice. They are provided for convenience but are not covered by API stability guarantees.
The charts API provides historical market data optimized for charting and visualization. This includes price history, volume, and open interest data.
Charts API Endpoints
Get Price History
| HTTP Method | Endpoint |
|---|---|
GET | /web/charts/price/:id |
Returns historical price data for a specific product, suitable for rendering price charts. The :id parameter is the product ID.
Query Parameters
| Parameter | Notes |
|---|---|
begin_time | Start time for data range, see Time for more details |
end_time | End time for data range, see Time for more details |
Example Request
GET /exchange/api/web/charts/price/123?begin_time=2025-01-01T00:00:00Z&end_time=now
Response
Returns an array of price data points.
Note: All price fields in this endpoint are expressed in USD (already converted from ticks). Prices are returned as decimal strings for precision.
Example Response
Get Volume and Open Interest History
| HTTP Method | Endpoint |
|---|---|
GET | /web/charts/voi |
Returns historical volume and open interest data. Can return data for a single product or aggregated across multiple products.
Query Parameters
| Parameter | Notes |
|---|---|
product_id | Filter by specific product ID (can specify multiple, e.g., product_id=1&product_id=2) |
begin_time | Start time for data range, see Time for more details |
end_time | End time for data range, see Time for more details |
Example Requests
Single product:
GET /exchange/api/web/charts/voi?product_id=123&begin_time=2025-01-01T00:00:00Z&end_time=now
Multiple products (aggregated):
GET /exchange/api/web/charts/voi?product_id=123&product_id=124&product_id=125&begin_time=2025-01-01T00:00:00Z&end_time=now
Response
Returns an array of volume and open interest data points.
Important: The notionalVolume and notionalOpenInterest fields are expressed in cents. To convert to USD:
notional_volume_usd = notionalVolume / 100
Example Response
In the example above, the first entry shows:
- Volume: 27 contracts
- Notional Volume: 2,365,870 cents = $23,658.70 USD
- Open Interest: 392 contracts
- Notional Open Interest: 33,806,080 cents = $338,060.80 USD
Notes
- Time Range: If no time range is specified, the API returns data for a default period (typically the past 30 days).
- Data Frequency: Price history data is provided at daily granularity, with one data point per trading day.
- Null Values: Some fields may be
nullif data is not available for that time period (e.g., no trades occurred, or open interest hasn't been published yet). - Aggregation: When multiple
product_idparameters are provided to the VOI endpoint, the response contains aggregated totals across all specified products. This is useful for viewing combined volume/OI for all contract months of a product series.
Start Trading
Leveraged spot, perpetuals, futures, options, and prediction markets, all on one CFTC-regulated exchange with crypto margin and settlement.