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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"commodity": "<commodity>"
},
"name": "opa_get_history"
}
}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') |