Charts

Draft API - Use at Own Risk: These /web endpoints 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 MethodEndpoint
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

ParameterNotes
begin_timeStart time for data range, see Time for more details
end_timeEnd 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.

export interface PriceDataPoint {
  date: string;              // Date in YYYY-MM-DD format
  time: string;              // ISO 8601 timestamp of the settlement
  ohlc: {
    open: string;            // Opening price in USD (decimal string)
    high: string;            // High price in USD (decimal string)
    low: string;             // Low price in USD (decimal string)
    close: string;           // Closing price in USD (decimal string)
    volume: number;          // Trading volume in contracts
  };
  settlementPrice: string;   // Settlement price in USD (decimal string)
}

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

[
  {
    "date": "2025-12-14",
    "time": "2025-12-14T21:30:00.000000Z",
    "ohlc": {
      "open": "87500.0000000000",
      "high": "88200.0000000000",
      "low": "86800.0000000000",
      "close": "87100.0000000000",
      "volume": 45
    },
    "settlementPrice": "87150.0000000000"
  },
  {
    "date": "2025-12-15",
    "time": "2025-12-15T22:05:31.664146Z",
    "ohlc": {
      "open": "89160.0000000000",
      "high": "89160.0000000000",
      "low": "86030.0000000000",
      "close": "86030.0000000000",
      "volume": 27
    },
    "settlementPrice": "86240.0000000000"
  }
]

Get Volume and Open Interest History

HTTP MethodEndpoint
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

ParameterNotes
product_idFilter by specific product ID (can specify multiple, e.g., product_id=1&product_id=2)
begin_timeStart time for data range, see Time for more details
end_timeEnd 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.

export interface VOIDataPoint {
  date: string;                         // Date in YYYY-MM-DD format
  productId: number;                    // Product ID
  baseSymbol: string;                   // Base symbol (e.g., "BUS", "ETU")
  volume: number | null;                // Trading volume in contracts
  notionalVolume: number | null;        // Trading volume in cents (divide by 100 for USD)
  openInterest: number | null;          // Open interest in contracts
  notionalOpenInterest: number | null;  // Open interest in cents (divide by 100 for USD)
}

Important: The notionalVolume and notionalOpenInterest fields are expressed in cents. To convert to USD:

notional_volume_usd = notionalVolume / 100

Example Response

[
  {
    "date": "2025-12-01",
    "productId": 1547,
    "baseSymbol": "PBU",
    "volume": 27,
    "notionalVolume": 2365870,
    "openInterest": 392,
    "notionalOpenInterest": 33806080
  },
  {
    "date": "2025-12-02",
    "productId": 1547,
    "baseSymbol": "PBU",
    "volume": 35,
    "notionalVolume": 3067500,
    "openInterest": 400,
    "notionalOpenInterest": 35000000
  }
]

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 null if 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_id parameters 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.