Get historical prices with pagination
Changed onRetrieve historical price data with filtering and pagination
Request
- Base URLhttps://api.oilpriceapi.com
- AuthAPI key in header Authorization
Query parameters
Commodity code
Price type
Page number for pagination
Number of items per page
Aggregation interval. When set, returns one price per interval period instead of raw tick data.
Response
Historical price data
Example response
{
"prices": [
{
"benchmark": {
"id": "nymex_wti_front_month",
"instrument_type": "front_month_futures",
"quote_type": "indicative_last_price",
"unit": "barrel",
"contract_month": "2026-12",
"roll_method": "explicit_contract_curve",
"roll_signal": "volume"
},
"price": 75.42,
"formatted": "$75.42",
"currency": "USD",
"code": "BRENT_CRUDE_USD",
"contract_month": "2026-12",
"created_at": "2025-01-20T10:30:00.000Z",
"updated_at": "2025-01-20T10:30:00.000Z",
"type": "spot_price",
"change_24h": 0.74,
"change_24h_percent": 1.25
}
],
"meta": {
"current_page": 1,
"total_pages": 10,
"total_count": 250,
"per_page": 25
}
}Changes
- breaking
removed the enum value
ALUMINUM_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
AMMONIA_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
ASPHALT_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
AZERI_LIGHT_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
BAKKEN_DUC_WELLSfrom thequeryrequest parameterby_code - breaking
removed the enum value
BAKKEN_FRAC_SPREADSfrom thequeryrequest parameterby_code - breaking
removed the enum value
BIODIESEL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
BRENT_CRUDE_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
CANADA_RIG_COUNTfrom thequeryrequest parameterby_code - breaking
removed the enum value
CAPP_COAL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
CME_COAL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
COAL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
COKING_COAL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
COPPER_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
CUSHING_STORAGEfrom thequeryrequest parameterby_code - breaking
removed the enum value
DIESEL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
DUBAI_CRUDE_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
DUTCH_TTF_EURfrom thequeryrequest parameterby_code - breaking
removed the enum value
DUTCH_TTF_NATURAL_GAS_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
EAGLEFORD_DUC_WELLSfrom thequeryrequest parameterby_code - breaking
removed the enum value
EAGLEFORD_FRAC_SPREADSfrom thequeryrequest parameterby_code - breaking
removed the enum value
ETHANOL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
ETHYLENE_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
EUR_NOKfrom thequeryrequest parameterby_code - breaking
removed the enum value
EUR_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
EU_CARBON_EURfrom thequeryrequest parameterby_code - breaking
removed the enum value
GASOLINE_RBOB_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
GASOLINE_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
GBP_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
GOLD_AM_EURfrom thequeryrequest parameterby_code - breaking
removed the enum value
GOLD_AM_GBPfrom thequeryrequest parameterby_code - breaking
removed the enum value
GOLD_AM_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
GOLD_PM_EURfrom thequeryrequest parameterby_code - breaking
removed the enum value
GOLD_PM_GBPfrom thequeryrequest parameterby_code - breaking
removed the enum value
GOLD_PM_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
GOLD_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
HEATING_OIL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
HFO_380_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
ILLINOIS_COAL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
INTERNATIONAL_RIG_COUNTfrom thequeryrequest parameterby_code - breaking
removed the enum value
IRON_ORE_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
JET_A1_NWE_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
JET_FUEL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
JKM_LNG_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
LEAD_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
METHANOL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
MGO_05S_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
NAPHTHA_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
NATURAL_GAS_GBPfrom thequeryrequest parameterby_code - breaking
removed the enum value
NATURAL_GAS_STORAGEfrom thequeryrequest parameterby_code - breaking
removed the enum value
NATURAL_GAS_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
NEWCASTLE_COAL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
NICKEL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
NORTH_DAKOTA_WELL_PERMITSfrom thequeryrequest parameterby_code - breaking
removed the enum value
NYMEX_APPALACHIAN_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
NYMEX_WESTERN_RAIL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
OKLAHOMA_WELL_PERMITSfrom thequeryrequest parameterby_code - breaking
removed the enum value
PALLADIUM_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
PERMIAN_DUC_WELLSfrom thequeryrequest parameterby_code - breaking
removed the enum value
PERMIAN_FRAC_SPREADSfrom thequeryrequest parameterby_code - breaking
removed the enum value
PLATINUM_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
POLYETHYLENE_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
POLYPROPYLENE_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
PRB_COAL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
SILVER_FIX_EURfrom thequeryrequest parameterby_code - breaking
removed the enum value
SILVER_FIX_GBPfrom thequeryrequest parameterby_code - breaking
removed the enum value
SILVER_FIX_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
SILVER_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
TAPIS_CRUDE_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
TEXAS_WELL_PERMITSfrom thequeryrequest parameterby_code - breaking
removed the enum value
TIN_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
UK_CARBON_GBPfrom thequeryrequest parameterby_code - breaking
removed the enum value
ULSD_DIESEL_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
URALS_CRUDE_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
URANIUM_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
UREA_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
USD_NOKfrom thequeryrequest parameterby_code - breaking
removed the enum value
US_RIG_COUNTfrom thequeryrequest parameterby_code - breaking
removed the enum value
VLSFO_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
WCS_CRUDE_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
WTI_USDfrom thequeryrequest parameterby_code - breaking
removed the enum value
ZINC_USDfrom thequeryrequest parameterby_code
- breaking
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info