Zum Inhalt springen
GET /v1/gold

NBP gold price (PLN per gram)

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/nbp-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/nbp-api/v1/gold" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/nbp-api/v1/gold", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/nbp-api/v1/gold");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/nbp-api/v1/gold",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "date": "2026-06-09",
        "unit": "1 gram of pure gold (1000 millesimal fineness)",
        "asset": "Gold",
        "price": 508.68,
        "source": "Narodowy Bank Polski",
        "history": [
            {
                "date": "2026-05-29",
                "price": 514.16
            },
            {
                "date": "2026-06-01",
                "price": 528.2
            },
            {
                "date": "2026-06-02",
                "price": 525.1
            },
            {
                "date": "2026-06-03",
                "price": 529.05
            },
            {
                "date": "2026-06-05",
                "price": 522.16
            },
            {
                "date": "2026-06-08",
                "price": 522.08
            },
            {
                "date": "2026-06-09",
                "price": 508.68
            }
        ],
        "currency": "PLN"
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:24.649Z",
        "request_id": "35cb623c-14bd-4fc9-a0c0-c5f68b611a28"
    },
    "status": "ok",
    "message": "Gold price retrieved successfully",
    "success": true
}