OilPriceAPI Docs
GitHub
GitHub
  • Interactive Explorer

    • Interactive API Explorer
  • Price Data

    • API Reference
    • Get Latest Prices
    • Historical Prices
    • Batch Prices
    • Excel Latest Price Gateway
    • Price Widget Endpoints
    • Price Utility Endpoints
    • Natural Gas Intelligence
  • Commodities

    • List Commodities
    • Get Commodity Details
  • AI Agents (MCP)

    • Get Market Brief
    • Subscriptions / Watches
    • Agent Subscriptions with MCP
  • Marine Fuels

    • Marine Fuel API
    • List Marine Fuel Ports
    • Get Port Details with Prices
    • Bunker Fuels
    • Maritime Fuels
  • Premium Endpoints

    • All Prices API - One Call, All Commodities
    • Cushing Oil Storage Intelligence API
    • Drilling Intelligence API
    • Marine Fuels API
    • ICE Brent Futures API
    • Benchmark Close
    • Aviation Fuel Pilot
  • Spreads & Margins

    • Spreads & Margins
    • Crack Spreads
    • Basis Spreads
    • Refining Margins
    • Curve Structure
    • Physical Premiums
  • Market Indicators

    • Market Indicators
    • Fuel Switching
    • Price Context
    • Storage Analytics
    • CFTC Positioning
    • Congressional Trades
    • Market Annotations
  • Futures

    • Futures API
    • ICE Brent Futures
    • ICE WTI Futures
    • ICE Gas Oil Futures
    • NYMEX Natural Gas Futures
    • ICE EUA Carbon Futures
    • EU Carbon Futures
    • TTF Gas Futures
    • LNG JKM Futures
    • UK Carbon Futures
  • Dark Data (Premium)

    • Energy Intelligence API
    • Rig Counts
    • Well Permits
    • Well Production Beta
    • Oil Inventories
    • OPEC Production
    • Drilling Productivity
    • Forecasts (STEO)
  • Well Production (Beta)

    • Well Production Data
    • Well Production API Reference
  • Analytics

    • Analytics API
  • Webhooks API

    • Webhooks API Reference
    • Webhook Endpoint Reference
  • Alerts

    • Price Alerts API
  • Account & Billing

    • Account API
    • API Keys
    • Subscriptions
    • Organizations

Spreads & Margins

Premium analytics endpoints for crack spreads, basis, refinery margin, curve structure, and physical premiums.

Entitlement Caveat

The live issue list records a backend entitlement bug for /v1/spreads/*: some enterprise keys can receive 403 because the gate reads a stale plan field. This page documents the intended customer surface; verify your production key before launch.

Endpoints

FamilyEndpoints
Crack spreads/v1/spreads/crack, /historical, /all
Basis/v1/spreads/basis, /historical, /all
Margins/v1/spreads/margin, /historical, /all
Curve structure/v1/spreads/curve-structure, /all
Physical premium/v1/spreads/physical-premium, /historical, /all

Common Parameters

ParameterTypeDescription
codestringSpread or market code where supported
datedateSnapshot date
from, todateHistorical range
limitintegerMaximum records

Common Response Shape

{
  "status": "success",
  "data": [
    {
      "code": "WTI_321_CRACK",
      "value": 24.15,
      "currency": "USD",
      "unit": "barrel",
      "period": "2026-07-15",
      "updated_at": "2026-07-15T14:30:00.000Z"
    }
  ]
}

Error Cases

StatusWhen
400Missing or invalid query parameter
401Missing or invalid API key
403Premium analytics entitlement missing
402Plan/quota issue

Data Rights

Spreads are derived analytics. Public display, redistribution, or downstream resale requires review under the Data Usage Policy.

Last Updated: 7/16/26, 1:53 PM
Next
Crack Spreads