Zum Inhalt springen
GET /v1/history

A currency rate over recent days

Live testen

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

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

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

API-Key holen

Code-Snippets

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

Beispiel-Response

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

{
    "data": {
        "base": "CZK",
        "code": "USD",
        "count": 4,
        "source": "Česká národní banka",
        "history": [
            {
                "date": "2026-06-03",
                "unit_rate": 20.829
            },
            {
                "date": "2026-06-04",
                "unit_rate": 20.81
            },
            {
                "date": "2026-06-05",
                "unit_rate": 20.759
            },
            {
                "date": "2026-06-08",
                "unit_rate": 21.01
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:20.388Z",
        "request_id": "0f4b171d-0795-4f15-bc97-6e191fedc1db"
    },
    "status": "ok",
    "message": "History retrieved successfully",
    "success": true
}