curl --request GET \
--url https://api.ngnmarket.com/v1/forex/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ngnmarket.com/v1/forex/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ngnmarket.com/v1/forex/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ngnmarket.com/v1/forex/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ngnmarket.com/v1/forex/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ngnmarket.com/v1/forex/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ngnmarket.com/v1/forex/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"format": "detailed",
"source": "USD",
"target": "NGN",
"period": "30d",
"start_date": "2026-04-15",
"end_date": "2026-04-17",
"data": [
{
"source_currency": "USD",
"target_currency": "NGN",
"rate": 1603.5,
"rate_date": "2026-04-17",
"timestamp_unix": 1776384000000
},
{
"source_currency": "USD",
"target_currency": "NGN",
"rate": 1601,
"rate_date": "2026-04-16",
"timestamp_unix": 1776297600000
},
{
"source_currency": "USD",
"target_currency": "NGN",
"rate": 1598.75,
"rate_date": "2026-04-15",
"timestamp_unix": 1776211200000
}
],
"pagination": {
"page": 1,
"limit": 100,
"total": 3,
"pages": 1,
"has_next": false,
"has_prev": false
},
"statistics": {
"latest": 1603.5,
"oldest": 1598.75,
"change": 4.75,
"change_percent": 0.2971,
"min": 1598.75,
"max": 1603.5,
"average": 1601.083333
}
},
"meta": {
"plan": "starter",
"calls_used": 4821,
"calls_remaining": 95179,
"reset_at": "2026-05-15T23:57:00.000Z"
}
}Historical NGN forex rates
Returns historical exchange rates for a currency pair, most recent first. By default the pair is USD to NGN, so rate is the number of naira one US dollar buys (e.g. 1603.50). Narrow results by period or date range.
How far back you can query is capped by plan: Hobby gets 2 years of history, Starter gets 5 years, Pro and above get full history. A from date outside your plan’s allowance is clamped to the earliest date you’re entitled to rather than erroring, check start_date in the response to see what was actually returned.
Plan required: Hobby
curl --request GET \
--url https://api.ngnmarket.com/v1/forex/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ngnmarket.com/v1/forex/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ngnmarket.com/v1/forex/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ngnmarket.com/v1/forex/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ngnmarket.com/v1/forex/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ngnmarket.com/v1/forex/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ngnmarket.com/v1/forex/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"format": "detailed",
"source": "USD",
"target": "NGN",
"period": "30d",
"start_date": "2026-04-15",
"end_date": "2026-04-17",
"data": [
{
"source_currency": "USD",
"target_currency": "NGN",
"rate": 1603.5,
"rate_date": "2026-04-17",
"timestamp_unix": 1776384000000
},
{
"source_currency": "USD",
"target_currency": "NGN",
"rate": 1601,
"rate_date": "2026-04-16",
"timestamp_unix": 1776297600000
},
{
"source_currency": "USD",
"target_currency": "NGN",
"rate": 1598.75,
"rate_date": "2026-04-15",
"timestamp_unix": 1776211200000
}
],
"pagination": {
"page": 1,
"limit": 100,
"total": 3,
"pages": 1,
"has_next": false,
"has_prev": false
},
"statistics": {
"latest": 1603.5,
"oldest": 1598.75,
"change": 4.75,
"change_percent": 0.2971,
"min": 1598.75,
"max": 1603.5,
"average": 1601.083333
}
},
"meta": {
"plan": "starter",
"calls_used": 4821,
"calls_remaining": 95179,
"reset_at": "2026-05-15T23:57:00.000Z"
}
}/v1/forex/history, not /v1/forex/rates. For current rates, see Live NGN exchange rates.Authorizations
Pass your API key as a Bearer token: Authorization: Bearer ngm_live_YOUR_KEY.
Generate keys at ngnmarket.com/dashboard/developer.
Query Parameters
Source currency code (e.g. USD, EUR, GBP). Defaults to USD.
"USD"
Target currency code. Defaults to NGN.
"NGN"
Preset window when from/to are not given. Defaults to 30d.
7d, 30d, 90d, 1y, all detailed (default) returns full rows with pagination and summary statistics; simple returns every row in the window as {date, rate, timestamp}, unpaginated.
detailed, simple Start date in YYYY-MM-DD format (inclusive).
"2026-01-01"
End date in YYYY-MM-DD format (inclusive). Defaults to today.
"2026-04-17"
Page number for format=detailed.
Rows per page for format=detailed.