Zum Inhalt springen
GET /v1/currency

One currency mid + bid/ask + history

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/currency" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/nbp-api/v1/currency", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/nbp-api/v1/currency");
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/currency",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

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

{
    "data": {
        "ask": 3.7138,
        "bid": 3.6402,
        "mid": 3.6671,
        "base": "PLN",
        "code": "USD",
        "note": "mid/bid/ask = PLN per 1 USD",
        "source": "Narodowy Bank Polski",
        "spread": 0.0736,
        "history": [
            {
                "mid": 3.6358,
                "date": "2026-06-02"
            },
            {
                "mid": 3.6553,
                "date": "2026-06-03"
            },
            {
                "mid": 3.6392,
                "date": "2026-06-05"
            },
            {
                "mid": 3.6898,
                "date": "2026-06-08"
            },
            {
                "mid": 3.6671,
                "date": "2026-06-09"
            }
        ],
        "currency": "dolar amerykański",
        "bulletin_no": "109/A/NBP/2026",
        "effective_date": "2026-06-09"
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:24.529Z",
        "request_id": "1adf6512-cbd7-4b23-a39f-1a86a42dea4a"
    },
    "status": "ok",
    "message": "Currency retrieved successfully",
    "success": true
}