OilPriceAPI Docs
Quick Start
API Reference
  • SDKs and languages
  • Tutorials
  • Articles
  • Documentation directory
  • Quick reference
  • API explorer
  • FAQ
  • Changelog
  • Status
  • Dashboard
GitHub
Quick Start
API Reference
  • SDKs and languages
  • Tutorials
  • Articles
  • Documentation directory
  • Quick reference
  • API explorer
  • FAQ
  • Changelog
  • Status
  • Dashboard
GitHub
  • Documentation

    • OilPriceAPI Documentation
    • Data Sources & Methodology
    • Frequently Asked Questions
    • SLA Overview
    • Changelog

Frequently Asked Questions

Common questions about OilPriceAPI, organized by topic.


Data Freshness

How often does data update?

It differs by code, because each source publishes on its own schedule: some series are sampled through the trading day, some are published once per business day, some weekly or monthly. There is no single product-wide interval.

Publication schedules lists the publication cadence, typical lag and collection frequency for every commodity code, and each price response carries freshness.expected_max_age_seconds for that series.

What do the timestamps on a price mean?

Each price carries more than one timestamp, and they answer different questions:

  • as_of (and observed_at) is when the source last showed that value: the moment of the genuine reading.
  • created_at is when we stored the value.
  • collected_at is when we fetched and stored the row. On a fresh observation it is close to as_of; on a carried-forward row it is later.

The response field table is the reference. To detect a price change, compare consecutive price values or use webhooks.

Why is my data timestamp several hours old?

Common reasons:

  1. Markets closed: Futures don't update outside trading hours or on weekends
  2. Data source delay: Some sources have inherent reporting delays
  3. Weekly/monthly data: Some commodities only update weekly (diesel) or monthly (OPEC production)
  4. Holiday: Exchange holidays affect data availability

Check the Data Freshness Guide for each commodity's expected update schedule.

How do I know if data is stale?

Read the staleness fields on the response instead of applying your own threshold to created_at:

  • stale is true when the point is outside its series' expected cadence, and stale_reason says why.
  • data_status and freshness.status label the point, and freshness.age_seconds against freshness.expected_max_age_seconds shows how far inside or outside its cadence it is.
  • age_days counts whole days since as_of, the last genuine source reading.

See Stale prices. During weekends and market holidays, older timestamps are expected.


Historical Data

How far back does historical data go?

It varies by commodity. Examples:

CommodityHistorical Data From
WTI Crude1986
Brent Crude1988
UK Natural Gas2018
ICE Gasoil2020
Rig Counts2000

GET /v1/commodities/{code} returns history_available_from, the earliest date the API serves for that code. It is the dataset start, not a promise of an unbroken daily series from that date. How far back your account can read depends on your plan: see the next question.

Which plans include historical data?

History needs a paid plan or an active trial. On the Free plan, /v1/prices/past_day, past_week, past_month and past_year return 402 with error_code: "UPGRADE_REQUIRED", and so do /v1/prices/historical and its alias /v1/prices/history (since 2026-11-16). Developer reads the last 365 days, Starter the last 5 years, and Professional and Scale the full archive.

A credit pack bought on or after 2026-11-12 pays for requests but does not unlock history. A pack bought before that date keeps history access while its credits last. A refused history request does not use up a credit. Details and the full 402 body: Plan requirement.

When is yesterday's closing price available?

/v1/prices/latest does not serve official exchange settlements. Futures-based benchmarks such as WTI_USD and BRENT_CRUDE_USD are indicative last prices captured from published market sources (benchmark.quote_type: "indicative_last_price"), and the stored value trails the source observation. Compare observed_at with created_at on the response to see the gap; on 2026-11-13 a WTI_USD reading observed at 17:26:04 UTC was stored at 17:36:10 UTC.

For the previous session, use the daily rows of the history and futures endpoints. On the futures history endpoints each row has a close with its capture time and a separate settlement field, which is null when no settlement value was captured and is never derived from close. Our data is informational and is not a settlement price or official record; see Data Sources.

Can I get tick-by-tick or minute-level data?

No tick data. Intraday series are sampled at an interval that differs by code, listed in publication schedules; interval=raw on the history endpoints returns every stored point. For higher-frequency needs, contact sales@oilpriceapi.com.


Timestamps & Timezones

What timezone are timestamps in?

All timestamps are UTC in ISO 8601 format:

2026-02-02T14:35:00Z

The Z suffix indicates UTC (Zulu time). Convert to your local timezone in your application.

How do I convert UTC to my local timezone?

from datetime import datetime
import pytz

utc_time = datetime.fromisoformat("2026-02-02T14:35:00Z".replace('Z', '+00:00'))
local_tz = pytz.timezone('America/New_York')
local_time = utc_time.astimezone(local_tz)
# Result: 2026-02-02 09:35:00-05:00 (EST)

API & Technical

What happens if a data source fails?

We use multiple sources per commodity with automatic failover. If the primary source fails, backup sources activate within 5 minutes. You'll still receive data, and we monitor source health 24/7.

Why am I getting cached responses?

Responses are cached for performance. Check the X-Cache header:

  • HIT = served from cache
  • MISS = fresh data fetch

Cache duration is typically 30-60 seconds for frequently-accessed data.

How do I get real-time price updates?

Two options:

  1. Webhooks: Configure webhooks to receive push notifications when prices change. See Webhooks Documentation.
  2. WebSocket: Connect to our WebSocket feed for streaming updates (Professional plan and above). See WebSocket Documentation.

What's the difference between price and value_units?

  • price: Human-readable price (e.g., 76.42)
  • value_units: Internal storage format (price × multiplier for precision)

Always use the price field for display and calculations.


Pricing & Plans

Do API requests count against my limit even if they return cached data?

A 200 response counts toward your quota whether or not it was served from cache. A 304 Not Modified returned to a conditional request (If-None-Match with the ETag from your previous response) does not count against your quota; it still uses one slot in the 60-requests-per-60-second-window rate limit. See Conditional requests.

What happens when I reach my API limit?

The Free plan includes 50 requests per day. New accounts start with a 7-day free trial of 10,000 requests; paid plans carry quotas from 10,000 / month (Developer) to 1,000,000 / month (Scale).

It depends on the plan. On the Free tier, exhausting the daily quota returns 402 Payment Required with error_code: "PAYMENT_REQUIRED". On a paid plan, exhausting the monthly quota also returns 402 Payment Required, with error_code: "MONTHLY_QUOTA_EXCEEDED". During the trial, using up the trial allowance returns 429 Too Many Requests with error_code: "TRIAL_LIMIT_EXCEEDED". Exceeding the 60-requests-per-60-second-window rate limit on any plan also returns 429, with error_code: "RATE_LIMIT_EXCEEDED". Watch the X-RateLimit-Remaining header to monitor usage before you reach the quota; see Rate Limiting.

Can I upgrade mid-month?

Yes. When you upgrade, your new limit takes effect immediately. The additional requests are prorated.

Is there a refund guarantee?

30-day money-back guarantee: if your first payment on any plan isn't a fit, email support@oilpriceapi.com within 30 days and we'll refund it in full. No questions asked. See the refund terms.


Data Coverage

Which commodities do you cover?

The available catalog spans:

  • Crude Oil: WTI, Brent, Dubai, Urals, etc.
  • Refined Products: Diesel, gasoline, jet fuel, heating oil
  • Natural Gas: Henry Hub, UK NBP, Dutch TTF, JKM LNG
  • Coal: Newcastle, CAPP, PRB, Illinois Basin
  • Precious Metals: Gold, silver, platinum, palladium
  • Carbon Credits: EU ETS, California
  • Forex: Major currency pairs

See the Commodity Catalog for the complete list.

Do you cover marine bunker fuel prices?

Yes. We provide prices for major bunkering ports including Singapore, Rotterdam, Fujairah, and more. See Marine Fuel for details.

Do you have drilling and production data?

Yes. Our Energy Intelligence endpoints provide:

  • Rig counts (Baker Hughes)
  • Well permits (state agencies)
  • DUC wells (EIA)
  • Oil inventories (EIA WPSR)
  • OPEC production (MOMR)

See Energy Intelligence for available endpoints.


Support

How do I report a data issue?

Email support@oilpriceapi.com with:

  • Commodity code
  • Timestamp of the issue
  • Expected vs. observed value
  • Screenshot if applicable

We respond within 1 business day.

Where can I get help with integration?

  • Documentation: Start with our Quick Start Guide
  • Examples: See Code Examples in multiple languages
  • Email: support@oilpriceapi.com for specific questions
  • Status: Check @oilpricehourly for service status

Still have questions?

Contact us at support@oilpriceapi.com - we typically respond within 1 business day.

Last Updated: 11/27/26, 6:48 PM
Prev
Data Sources & Methodology
Next
SLA Overview