Commodity price history
Historical closing prices for a single commodity. Use the id slug returned
by the list endpoint (e.g. gold, wti-crude).
Authorizations
Your HayInsights API key (prefixed apk_). Create and manage keys in the
HayInsights dashboard (Account → API keys).
Send it in the X-API-Key header on every request to /openapi/v1/*.
Which data domains you may access and your request quota are both governed by
the subscription plan attached to the key — see the Plans & features and
Rate limits guides.
Path Parameters
Commodity slug.
"gold"
Query Parameters
History window.
| Value | Description |
|---|---|
7d | Last 7 days |
1m | Last 1 month |
3m | Last 3 months |
ytd | Year-to-date |
1y | Last 1 year |
7d, 1m, 3m, ytd, 1y Sampling interval.
| Value | Description |
|---|---|
daily | One data point per day |
weekly | One data point per week |
daily, weekly Response
Closing-price history series.
Standard success envelope shared by every endpoint. Each operation's response
wrapper extends this (via allOf) and adds a typed data property.