Vai al contenuto
GET /v1/currency

One currency CHF rate + history

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/snb-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

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

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "base": "CHF",
        "code": "EUR",
        "date": "2026-05",
        "label": "Europe - EUR 1",
        "amount": 1,
        "source": "Schweizerische Nationalbank",
        "history": [
            {
                "date": "2025-12",
                "value_chf": 0.93313,
                "unit_rate_chf": 0.93313
            },
            {
                "date": "2026-01",
                "value_chf": 0.92732,
                "unit_rate_chf": 0.92732
            },
            {
                "date": "2026-02",
                "value_chf": 0.91406,
                "unit_rate_chf": 0.91406
            },
            {
                "date": "2026-03",
                "value_chf": 0.90912,
                "unit_rate_chf": 0.90912
            },
            {
                "date": "2026-04",
                "value_chf": 0.92116,
                "unit_rate_chf": 0.92116
            },
            {
                "date": "2026-05",
                "value_chf": 0.91503,
                "unit_rate_chf": 0.91503
            }
        ],
        "frequency": "monthly average",
        "value_chf": 0.91503,
        "unit_rate_chf": 0.91503
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:14.793Z",
        "request_id": "bfda0658-392c-474a-a14e-f521cbcc9e93"
    },
    "status": "ok",
    "message": "Currency retrieved successfully",
    "success": true
}