Aller au contenu
GET /v1/meta

Spec

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/snb-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

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

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "source": "Schweizerische Nationalbank data portal (live)",
        "service": "snb-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/rates": "SNB FX fixing — all currencies in CHF (monthly average).",
            "GET /v1/saron": "SARON overnight benchmark + history.",
            "GET /v1/currency": "One currency's CHF rate + history (code=EUR).",
            "GET /v1/policy_rate": "SNB policy rate + history."
        },
        "description": "Live official Swiss monetary data from the Swiss National Bank's open data portal: the SNB foreign-exchange fixing (monthly-average franc value of ~25 world currencies, normalised to the franc value of a single unit); one currency's franc rate with history; the SNB policy rate with history; and SARON, the Swiss franc overnight benchmark that replaced CHF LIBOR, with its recent path. Live, no key, nothing stored; figures are monthly. Distinct from the ECB, Fed, Bank of Canada, Norges Bank, Bank of England, Brazil, Poland and Czech central-bank APIs — this is the franc, the SNB policy rate and SARON.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:16.015Z",
        "request_id": "cf5011a2-6bea-446c-a704-b1813aa5b22f"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}