GET /commodities/:commodity
Hae nykyinen hinta tietylle hyödykkeelle (kulta, hopea, platina, palladium, öljy, natural_gas tai kupari) missä tahansa 30 tuetusta valuutasta. Palauttaa sekä USD-perushinnan että muunnetun hinnan. Hyödyllinen, kun tarvitset vain yhden hyödykkeen hinnan koko luettelon sijaan, kuten kullan hinnan näyttäminen NOK-valuutassa pohjoismaisella sijoitussivulla.Hae the current price for a specific commodity (gold, silver, platinum, palladium, oil, natural_gas, or copper) in any of the 30 supported currencies. Palauttaa both the USD base price and the converted price. Useful when you need just one commodity's price rather than the full list, such as displaying the gold price in NOK on a Nordic investment page.
commodity
pakollinen
Commodity name in URL
currency
valinnainen
oletus: USD
Price currency
| Nimi | Pakollinen | Oletus | Kuvaus |
|---|---|---|---|
commodity |
Kyllä | - | Commodity name in URL |
currency |
Ei | USD | Price currency |
curl "https://nordapi.ee/api/v1/commodities/gold?currency=NOK"
curl "https://nordapi.ee/api/v1/commodities/gold?currency=NOK"
curl "https://nordapi.ee/api/v1/commodities/oil"
curl "https://nordapi.ee/api/v1/commodities/silver?currency=EUR"
HTTP 404: {
"error": "Currency not found",
"message": "One or more of the specified currencies could not be found.",
"success": false
}
{"success":true,"commodity":"gold","price":29063.87,"currency":"NOK","price_usd":3045.0}