/v1/history
Daily interbank USD/PEN rate over a date range
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
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_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"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
}