Commodity Prices

Historical and current annual average prices for 16 major commodities — precious metals, energy, and agricultural goods. Prices are annual averages sourced from FRED (Federal Reserve Economic Data).

Get API Key

Vue d'ensemble

Cas d'utilisation

  • Financial dashboards and portfolio trackers
  • Commodity price trend analysis
  • Inflation-adjusted cost modelling
  • Economic research and education
  • Supply chain cost forecasting

Fonctionnalités

16 commodities covered (metals, energy, agricultural)
Annual average prices sourced from FRED (Federal Reserve)
Up to 10 years of historical data per commodity
Year-over-year change percentage included
Data going back to the 1960s for major commodities

Points de terminaison de l'API

Get Commodity Price

Returns the latest annual average price and up to 10 years of historical data for the requested commodity slug.

GET
https://requiems.xyz/v1/finance/commodities/{commodity}

Paramètres

Nom Type Requis Description
commodity string Requis Commodity slug (e.g. gold, silver, oil). See supported slugs below.

Essayez-le

Démo en direct
Requête

Commodity slug (e.g. gold, silver, oil). See supported slugs below.

Champs de réponse

Champ Type Description
commodity string The commodity slug as provided in the request path
name string Human-readable commodity name
price number Latest annual average price in the commodity's display unit
unit string Price unit (oz, barrel, mmbtu, lb, or metric_ton)
currency string Currency code — always USD
change_24h number Year-over-year percentage change from the prior year's annual average (positive = price increased)
historical array<object> Up to 10 prior years of annual average prices, ordered newest to oldest
historical[].period string Year of the historical data point
historical[].price number Annual average price for that year

Exemples de code

curl "https://requiems.xyz/v1/finance/commodities/gold" \
  -H "requiems-api-key: YOUR_API_KEY"

Réponses d'erreur

not_found

No data found for the given commodity slug. Check the supported slugs list.

internal_error

Unexpected server error.

Foire aux questions