Oil Price API Documentation - Quick Start in 5 Minutes | REST API
GitHub
GitHub
  • Interactive Explorer

    • Interactive API Explorer
  • Price Data

    • API Reference
    • Get Latest Prices
    • Historical Prices
  • Commodities

    • List Commodities
    • Get Commodity Details
  • Marine Fuels

    • List Marine Fuel Ports
    • Get Port Details with Prices
  • Premium Endpoints

    • All Prices API - One Call, All Commodities
    • Cushing Oil Storage Intelligence API
    • Drilling Intelligence API
    • Marine Fuels API
    • ICE Brent Futures API
  • Futures

    • Futures API
    • ICE Brent Futures
    • ICE WTI Futures
    • ICE Gas Oil Futures
    • NYMEX Natural Gas Futures
  • Dark Data (Premium)

    • Dark Data API
    • Rig Counts
    • Oil Inventories
    • OPEC Production
    • Drilling Productivity
    • Forecasts (STEO)
  • Analytics

    • Analytics API
  • Account & Billing

    • Account API

ICE Brent Futures

Real-time and historical Brent crude oil futures data from the Intercontinental Exchange (ICE).

Endpoints

MethodEndpointDescription
GET/v1/futures/ice-brentCurrent contract prices
GET/v1/futures/ice-brent/historicalHistorical data
GET/v1/futures/ice-brent/ohlcDaily OHLC
GET/v1/futures/ice-brent/intraday5-minute intervals
GET/v1/futures/ice-brent/spreadsCalendar spreads
GET/v1/futures/ice-brent/curveFutures curve
GET/v1/futures/ice-brent/spread-historySpread history

Current Prices

Get current futures prices for all Brent contracts.

GET /v1/futures/ice-brent

Response

{
  "commodity": "BRENT_FUTURES",
  "source": "ICE",
  "updated_at": "2025-12-29T14:30:00.000Z",
  "trading_hours": "01:00-23:00 GMT",
  "contracts": [
    {
      "contract_month": "2026-02",
      "last_price": 74.52,
      "currency": "USD",
      "open": 74.15,
      "close": 74.45,
      "high": 74.85,
      "low": 74.00,
      "volume": 125432,
      "change_percent": 0.47,
      "updated_at": "2025-12-29T14:30:00.000Z"
    }
  ],
  "metadata": {
    "total_contracts": 12,
    "data_source": "ice",
    "retention_period": "30_days"
  }
}

Historical Data

Query historical futures data for a date range.

GET /v1/futures/ice-brent/historical

Parameters

ParameterTypeRequiredDefaultDescription
fromdateNo30 days agoStart date (ISO 8601)
todateNotodayEnd date (ISO 8601)
contractsstringNoallComma-separated contracts (e.g., 2026-02,2026-03)
formatstringNojsonResponse format: json or csv

Example

curl "https://api.oilpriceapi.com/v1/futures/ice-brent/historical?from=2025-12-01&to=2025-12-29&contracts=2026-02" \
  -H "Authorization: Token YOUR_API_KEY"

Response

{
  "commodity": "BRENT_FUTURES",
  "date_range": {
    "from": "2025-12-01",
    "to": "2025-12-29"
  },
  "total_records": 20,
  "contracts": [
    {
      "contract_month": "2026-02",
      "contract_code": "BRENT_FUTURES_2026_02",
      "total_days": 20,
      "daily_data": [
        {
          "trading_date": "2025-12-29",
          "open": 74.15,
          "close": 74.45,
          "high": 74.85,
          "low": 74.00,
          "volume": 125432,
          "change_percent": 0.47,
          "settlement": 74.42
        }
      ]
    }
  ]
}

OHLC Data

Get daily OHLC (Open, High, Low, Close) summaries.

GET /v1/futures/ice-brent/ohlc

Parameters

ParameterTypeRequiredDefaultDescription
daysintegerNo30Number of days (1-365)
contractstringNofront monthContract month (e.g., 2026-02)

Response

{
  "period": "30d",
  "date_range": {
    "from": "2025-11-29",
    "to": "2025-12-29"
  },
  "contracts": [
    {
      "contract_month": "2026-02",
      "contract_code": "BRENT_FUTURES_2026_02",
      "total_days": 20,
      "daily_data": [
        {
          "trading_date": "2025-12-29",
          "open": 74.15,
          "high": 74.85,
          "low": 74.00,
          "close": 74.45,
          "volume": 125432,
          "change_percent": 0.47
        }
      ]
    }
  ]
}

Intraday Data

Get 5-minute interval data for a specific trading day.

GET /v1/futures/ice-brent/intraday

Parameters

ParameterTypeRequiredDefaultDescription
datedateNotodayTrading date (ISO 8601)
contractstringNofront monthContract month

Response

{
  "commodity": "BRENT_FUTURES",
  "trading_date": "2025-12-29",
  "contract_month": "2026-02",
  "interval": "5min",
  "data_points": [
    {
      "timestamp": "2025-12-29T01:00:00.000Z",
      "price": 74.15,
      "volume": 1234
    },
    {
      "timestamp": "2025-12-29T01:05:00.000Z",
      "price": 74.18,
      "volume": 987
    }
  ]
}

Calendar Spreads

Analyze price differences between contract months.

GET /v1/futures/ice-brent/spreads

Parameters

ParameterTypeRequiredDefaultDescription
pairsstringNoconsecutiveSpread pairs (e.g., 2026-02,2026-03;2026-03,2026-04)
daysintegerNo30Analysis period (1-365)
datedateNotodaySpecific date for snapshot

Response

{
  "analysis_period": "30d",
  "date_range": {
    "from": "2025-11-29",
    "to": "2025-12-29"
  },
  "total_pairs": 2,
  "spreads": [
    {
      "front_contract": "2026-02",
      "back_contract": "2026-03",
      "spread_type": "calendar_spread_1m",
      "data_points": 20,
      "current_spread": -0.27,
      "statistics": {
        "mean": -0.26,
        "median": -0.27,
        "min": -0.35,
        "max": -0.20,
        "standard_deviation": 0.05,
        "range": 0.15
      },
      "daily_data": [
        {
          "trading_date": "2025-12-29",
          "front_price": 74.45,
          "back_price": 74.18,
          "spread_value": -0.27,
          "spread_percentage": -0.36
        }
      ]
    }
  ]
}

Futures Curve

Analyze the term structure across all contracts.

GET /v1/futures/ice-brent/curve

Parameters

ParameterTypeRequiredDefaultDescription
datedateNotodayAnalysis date

Response

{
  "analysis_date": "2025-12-29",
  "curve_type": "backwardation",
  "total_contracts": 12,
  "front_month": {
    "contract_month": "2026-02",
    "settlement_price": 74.45,
    "months_to_expiry": 2
  },
  "back_month": {
    "contract_month": "2027-01",
    "settlement_price": 72.15,
    "months_to_expiry": 13
  },
  "contracts": [
    {
      "contract_month": "2026-02",
      "settlement_price": 74.45,
      "months_to_expiry": 2
    }
  ],
  "curve_metrics": {
    "front_month_price": 74.45,
    "back_month_price": 72.15,
    "total_slope": -2.30,
    "slope_percentage": -3.09,
    "average_price": 73.30,
    "price_range": 2.30,
    "steepness": -0.21
  }
}

Curve Types:

  • backwardation - Front month higher than back (negative slope)
  • contango - Front month lower than back (positive slope)
  • flat - Minimal price difference

Spread History

Get historical spread data between two specific contracts.

GET /v1/futures/ice-brent/spread-history

Parameters

ParameterTypeRequiredDefaultDescription
front_contractstringYes-Front contract (e.g., 2026-02)
back_contractstringYes-Back contract (e.g., 2026-03)
daysintegerNo30History period (1-365)

Example

curl "https://api.oilpriceapi.com/v1/futures/ice-brent/spread-history?front_contract=2026-02&back_contract=2026-03&days=30" \
  -H "Authorization: Token YOUR_API_KEY"

Response

{
  "front_contract": "2026-02",
  "back_contract": "2026-03",
  "period_days": 30,
  "data_points": 20,
  "spread_data": [
    {
      "trading_date": "2025-12-29",
      "front_contract": {
        "contract_month": "2026-02",
        "price": 74.45
      },
      "back_contract": {
        "contract_month": "2026-03",
        "price": 74.18
      },
      "spread_value": -0.27,
      "spread_percentage": -0.36
    }
  ],
  "spread_statistics": {
    "mean": -0.26,
    "median": -0.27,
    "min": -0.35,
    "max": -0.20,
    "standard_deviation": 0.05
  }
}

Error Responses

StatusErrorDescription
400Invalid contract formatUse YYYY-MM format
400Date range exceeds maximumMax 730 days
401Authentication requiredMissing or invalid API key
503No data availableData being refreshed, retry shortly

Code Examples

Python

import requests

api_key = "YOUR_API_KEY"
headers = {"Authorization": f"Token {api_key}"}

# Get current prices
response = requests.get(
    "https://api.oilpriceapi.com/v1/futures/ice-brent",
    headers=headers
)
data = response.json()

for contract in data["contracts"]:
    print(f"{contract['contract_month']}: ${contract['last_price']}")

JavaScript

const response = await fetch(
  "https://api.oilpriceapi.com/v1/futures/ice-brent",
  {
    headers: { "Authorization": "Token YOUR_API_KEY" }
  }
);
const data = await response.json();

data.contracts.forEach(contract => {
  console.log(`${contract.contract_month}: $${contract.last_price}`);
});

Related

  • ICE WTI Futures
  • ICE Gas Oil Futures
  • NYMEX Natural Gas Futures
Last Updated: 12/30/25, 11:36 AM
Prev
Futures API
Next
ICE WTI Futures