Get historical WTI futures data
Changed onCanonical instrument-generic path (#4170). Legacy alias: /v1/futures/ice-wti/historical (identical response).
Request
- Base URLhttps://api.oilpriceapi.com
- AuthAPI key in header Authorization
Query parameters
Specific contract month (e.g., "2026-03")
Start of the window (ISO date). Omit both from and to for the last 30 days. from/to are the only window parameters this operation honours; period and days are discarded silently and were previously documented here in error. Verified against production 2026-10-09 (website-clean#2305).
End of the window (ISO date). Defaults to today.
Server-side aggregation. weekly and monthly replace trading_date with period_start/period_end and add avg_close and trading_days. hourly is rejected with 400 on this operation.
Response
Historical WTI futures data
Example response
{
"status": "success",
"data": [
{
"contract_month": "M1",
"price": 82.45
}
]
}Changes
- breaking
removed the enum value
hourlyfrom thequeryrequest parameterinterval - warning
deleted the
queryrequest parameterperiod - info
added the new optional
queryrequest parameterfrom - info
added the new optional
queryrequest parameterto - info
added the non-success response with the status
- breaking