GET /commodities/:commodity
Hent den aktuelle pris for en specifik råvare (guld, sølv, platin, palladium, olie, naturgas eller kobber) i en af de 30 understøttede valutaer. Returnerer både USD-basisprisen og den konverterede pris. Nyttigt når du kun har brug for én råvares pris frem for den fulde liste, f.eks. visning af guldprisen i NOK på en nordisk investeringsside.
commodity
påkrævet
Commodity name in URL
currency
valgfri
standard: USD
Price currency
| Navn | Påkrævet | Standard | Beskrivelse |
|---|---|---|---|
commodity |
Ja | - | Commodity name in URL |
currency |
Nej | 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}