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

Excel Latest Price Gateway

The Excel gateway returns latest-price data shaped for spreadsheet add-ins and formulas.

GET/v1/prices/excel-latest

Correct Path

Use /v1/prices/excel-latest. The shorter /v1/excel-latest path is not the supported endpoint.

Request

curl "https://api.oilpriceapi.com/v1/prices/excel-latest?by_code=WTI_USD" \
  -H "Authorization: Token YOUR_API_KEY"
ParameterTypeRequiredDescription
by_codestringNoSingle code or comma-separated commodity codes
fieldsstringNoComma-separated response fields
currencystringNoOptional output currency where enabled

Response

{
  "status": "success",
  "data": {
    "code": "WTI_USD",
    "price": 74.52,
    "formatted": "$74.52",
    "currency": "USD",
    "created_at": "2026-07-15T14:30:00.000Z"
  }
}

Error Cases

StatusWhen
400Invalid commodity code or parameter
401Missing or invalid API key
402Quota exhausted
429Rate limit exceeded

Related

  • Latest Prices
  • Google Sheets Integration
  • SDK Examples
Last Updated: 7/16/26, 1:53 PM
Prev
Batch Prices
Next
Price Widget Endpoints