Historical-data contract

Point-in-time price data

Request the stored view for a past instant, before later covered source revisions entered your backtest. The as_ofparameter filters normally ingested rows by their stored timestamps and rolls covered corrections back to their earlier values. See the backfill exception below.

Production proof

Verified August 10, 2026

Supported scope

4 raw history endpoints

Correction coverage

From July 28, 2026

Observed revision

One row, two defensible answers

On August 7, 2026, a U.S. diesel observation was available at 3.88 before being revised to 3.90 at 22:10 UTC. A decision made at 22:00 must use the earlier value. A current report should use the corrected value.

As of 22:00 UTC

$3.88

For this verified, normally ingested row, the later covered correction is excluded from the earlier stored view.

Same row as known today

$3.90

The corrected value for current analysis. The source timestamp remains the same; the revision ledger explains the difference.

Request contract

Add one timestamp to a raw history request

Use an ISO-8601 UTC instant. The server echoes the accepted vintage and correction-coverage boundary in response headers.

/v1/prices/past_day
/v1/prices/past_week
/v1/prices/past_month
/v1/prices/past_year
Vintage requestinterval=raw
curl -i -H "Authorization: Token YOUR_API_KEY" \
  "https://api.oilpriceapi.com/v1/prices/past_week?by_code=DIESEL_USD&interval=raw&as_of=2026-08-07T22:00:00Z"

X-Vintage-As-Of: 2026-08-07T22:00:00Z

X-Vintage-Revision-Coverage-Since: 2026-07-28

Honest limits

A vintage view is only as deep as the evidence

The API reports its boundary instead of inventing historical versions that were never observed.

Nothing before collection

A series has no true point-in-time history before OilPriceAPI began collecting its observations.

Correction coverage has a start

Revision rollback currently starts on July 28, 2026. ReadX-Vintage-Revision-Coverage-Sincerather than assuming older corrections are captured.

Bulk-backfilled ranges do not gain true vintages

Observation-dated bulk backfills may appear in an earlieras_of view because their stored timestamp reflects observation time, not actual load time. The API cannot reconstruct when those rows first became available.

Well data is measured separately

Well permits and well production have separate measurement and source-truth programs. Those routes are not point-in-time query surfaces and do not currently accept as_of. Do not infer their revision coverage from this price-history feature.

Use it where you work

REST, MCP, and a runnable backtest

REST API

Send as_of directly on one of the four supported raw history routes and inspect both vintage headers.

MCP 3.2

opa_get_history exposes the same parameter for agent workflows.

Release evidence

Cookbook

Run the production-checked Python comparison and adapt it to your own decision timestamp.

Open recipe 02
Before production use

Keep vintage semantics and data permissions separate

Point-in-time reconstruction changes which stored value is returned. It does not change display, redistribution, or commercial-use rights.

Review data usage