v1

latestOpenAPI 3.0.32026-07-2664108290.0 KB
Commodities & Trade

Commodity Price History

Retrieves historical price data for a commodity by year range. Data is monthly (bi-weekly for recent Coal entries). Maximum range: 3 years.

<Note>Use List Commodities to discover all available commodity names.</Note>

<Warning>Requesting more than 3 years will return a 400 error.</Warning>

<Info>Costs 1 API credit.</Info>

get/v2/mining/commodities/{commodity_name}/price/

Path parameters

commodity_namestring required

The commodity name (e.g., Gold, Coal). Get valid names from the List Commodities endpoint.

Query parameters

start_yearinteger

Start year (e.g., 2022). Defaults to current year − 2.

end_yearinteger

End year inclusive (e.g., 2024). Defaults to current year. Maximum 3-year range from start_year.

Response

List of monthly price records ordered by date ascending.

namestring required

Commodity name.

datestring date required

Price date (monthly).

price_usd_per_tonnumber double required

Price in USD per metric ton.