/v1/currency
One currency CHF rate + history
Pruébalo en vivo
10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.
Funciona. Consigue una clave API y úsala en tu proyecto.
Obtener una clave APIFragmentos de código
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_..."}
)
Respuesta de ejemplo
Una respuesta real de este endpoint, capturada en la última comprobación de estado.
{
"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
}