/v1/history
Daily interbank USD/PEN rate over a date range
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/bcrp-api/v1/history" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bcrp-api/v1/history", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bcrp-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/bcrp-api/v1/history",
headers={"x-oanor-key": "oanor_test_..."}
)
Respuesta de ejemplo
Una respuesta real de este endpoint, capturada en la última comprobación de estado.
{
"data": {
"to": "2026-06-08",
"from": "2026-06-01",
"pair": "USD/PEN",
"count": 6,
"source": "Banco Central de Reserva del Perú",
"history": [
{
"buy": 3.4166,
"mid": 3.4177,
"date": "2026-06-01",
"sell": 3.4188
},
{
"buy": 3.4081,
"mid": 3.4091,
"date": "2026-06-02",
"sell": 3.4101
},
{
"buy": 3.4179,
"mid": 3.4188,
"date": "2026-06-03",
"sell": 3.4198
},
{
"buy": 3.4127,
"mid": 3.4137,
"date": "2026-06-04",
"sell": 3.4147
},
{
"buy": 3.4509,
"mid": 3.4529,
"date": "2026-06-05",
"sell": 3.4549
},
{
"buy": 3.4731,
"mid": 3.4787,
"date": "2026-06-08",
"sell": 3.4842
}
]
},
"meta": {
"timestamp": "2026-06-10T13:59:16.349Z",
"request_id": "b64cd908-2db3-4e21-837d-ed1a5eeeeee5"
},
"status": "ok",
"message": "History retrieved successfully",
"success": true
}