← Rahandus ja valuuta

Toorme ajalugu

GET /commodities/:commodity/history

Hankige historical daily prices for any commodity over a custom kuupäevavahemik. Tagastab an array of date-price pairs in USD. Kasulik charting commodity price trends, performing technical analysis on gold or oil, backtesting commodity trading strategies, and building historical comparison tools that show how commodity prices moved during specific economic events.

Parameetrid

commodity kohustuslik

Commodity name

start_date kohustuslik

Start date

end_date kohustuslik

End date

Näidispäringud

Põhikasutus
curl "https://nordapi.ee/api/v1/commodities/gold/history?start_date=2026-03-01&end_date=2026-03-24"
Gold price history for March 2026
curl "https://nordapi.ee/api/v1/commodities/gold/history?start_date=2026-03-01&end_date=2026-03-24"
Oil price history over a quarter
curl "https://nordapi.ee/api/v1/commodities/oil/history?start_date=2026-01-01&end_date=2026-03-24"
Silver price history for February
curl "https://nordapi.ee/api/v1/commodities/silver/history?start_date=2026-02-01&end_date=2026-02-28"

Reaalajas vastus

{
  "commodity": "gold",
  "count": 1,
  "data": [
    {
      "date": "2026-03-20",
      "price_usd": 3045.0
    }
  ],
  "end_date": "2026-03-24",
  "start_date": "2026-03-01",
  "success": true
}

Näidisvastus

{"success":true,"data":[{"date":"2026-03-20","price_usd":3045.0}]}