Historical Rate Endpoint
The Ipforensics API provides accurate historical exchange rate data for every past day all the way back to the year of 2020.
Each request to the currency endpoint consumes 1 token.
Code Snippet
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://ipforensics.net/api/v1/currency/historical?apikey=IPF-36ae36a6-4a32-4fae-a422-e45e70b0a515-X&source=NGN&date=2021-11-10',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("https://ipforensics.net/api/v1/currency/historical?apikey=IPF-36ae36a6-4a32-4fae-a422-e45e70b0a515-X&source=NGN&date=2021-11-10", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));Sample Response
Endpoint
Returns list of all historical rate currencies based on the source currency.
GET https://ipforensics.net/api/v1/currency/historical?apikey=...&source=NGN&date=2021-11-10
Returns response object and a metadata of the request
Query Parameters
Name
Type
Description
apikey*
String
Your API key
source*
String
Specify a Source Currency
date
date
Specify a date for which to request historical rates. (Format: YYYY-MM-DD)
Last updated
Was this helpful?