GET /commodities/:commodity
Rufen Sie den aktuellen Preis für einen bestimmten Rohstoff (Gold, Silber, Platin, Palladium, Öl, Erdgas oder Kupfer) in einer der 30 unterstützten Währungen ab. Liefert sowohl den USD-Basispreis als auch den umgerechneten Preis. Nützlich, wenn Sie nur den Preis eines Rohstoffs anstatt der vollständigen Liste benötigen, etwa zur Anzeige des Goldpreises in NOK auf einer nordischen Investmentseite.
commodity
erforderlich
Commodity name in URL
currency
optional
Standard: USD
Price currency
| Name | Erforderlich | Standard | Beschreibung |
|---|---|---|---|
commodity |
Ja | - | Commodity name in URL |
currency |
Nein | 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}