Naar de inhoud
GET /v1/currency

One currency mid + bid/ask + history

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/nbp-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

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_..."}
)

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste 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
}