Get Price History
opa_get_historyGet historical commodity prices for any period—day, week, month, or year—to analyze trends and performance. Returns high, low, average, change, and data point count.
Instructions
Get historical price data for a commodity over a time period. Use when the user asks about price trends, historical prices, or how a commodity has performed over time. Returns high, low, average, change, and data point count. Periods: day (24h), week (7d), month (30d), year (365d). Supports point-in-time filtering via stored observation and revision timestamps. Observation-dated bulk backfills may appear in an earlier as_of result because their actual load time cannot be reconstructed. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_of | No | Optional ISO8601 date/datetime for filtering by stored observation and covered revision timestamps, e.g. '2026-06-02'. Must not be in the future. Observation-dated bulk backfills may appear in an earlier as_of result because actual load time cannot be reconstructed. Revision-correction coverage since 2026-07-28. | |
| period | No | Time period: day, week, month, or year (default: month) | month |
| commodity | Yes | Commodity name or code (e.g., 'brent', 'WTI_USD') |