cbn-exchange-rate 1.3.8 → 1.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -52
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -37,52 +37,54 @@ The open endpoint serves the *latest* table only and asks for a visible attribut
|
|
|
37
37
|
|
|
38
38
|
## 📈 Latest published table
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
[](https://allratestoday.com/central-bank-rates-api/cbn/)
|
|
41
|
+
|
|
42
|
+
The image is rendered live from the keyless endpoint above, so it follows the central bank's publications on npm and on GitHub alike without a new release. The text copy below is there for search and copy-paste: on GitHub [a daily Action](.github/workflows/daily-table.yml) refreshes it whenever the central bank publishes a new table; on npm it is as of the package's publish date.
|
|
41
43
|
|
|
42
44
|
<!-- daily-table:start -->
|
|
43
|
-
Published **2026-10-
|
|
45
|
+
Published **2026-10-13** by Central Bank of Nigeria — 39 rates. Updated 2026-10-14.
|
|
44
46
|
|
|
45
47
|
| Base | Quote | Type | Rate |
|
|
46
48
|
| --- | --- | --- | ---: |
|
|
47
|
-
| AED | NGN | buy | 362.
|
|
48
|
-
| AED | NGN | middle | 362.
|
|
49
|
-
| AED | NGN | sell | 362.
|
|
50
|
-
| CHF | NGN | buy |
|
|
51
|
-
| CHF | NGN | middle |
|
|
52
|
-
| CHF | NGN | sell |
|
|
53
|
-
| CNY | NGN | buy | 198.
|
|
54
|
-
| CNY | NGN | middle |
|
|
55
|
-
| CNY | NGN | sell | 199.
|
|
56
|
-
| DKK | NGN | buy | 199.
|
|
57
|
-
| DKK | NGN | middle | 199.
|
|
58
|
-
| DKK | NGN | sell | 199.
|
|
59
|
-
| EUR | NGN | buy |
|
|
60
|
-
| EUR | NGN | middle |
|
|
61
|
-
| EUR | NGN | sell |
|
|
62
|
-
| GBP | NGN | buy |
|
|
63
|
-
| GBP | NGN | middle |
|
|
64
|
-
| GBP | NGN | sell |
|
|
65
|
-
| JPY | NGN | buy | 8.
|
|
66
|
-
| JPY | NGN | middle | 8.
|
|
67
|
-
| JPY | NGN | sell | 8.
|
|
68
|
-
| SAR | NGN | buy | 354.
|
|
69
|
-
| SAR | NGN | middle | 354.
|
|
70
|
-
| SAR | NGN | sell | 354.
|
|
71
|
-
| USD | NGN | buy | 1331.
|
|
72
|
-
| USD | NGN | middle |
|
|
73
|
-
| USD | NGN | sell | 1332.
|
|
74
|
-
| XDR | NGN | buy | 1801.
|
|
75
|
-
| XDR | NGN | middle | 1802.
|
|
76
|
-
| XDR | NGN | sell |
|
|
77
|
-
| XOF | NGN | buy | 2.
|
|
78
|
-
| XOF | NGN | middle | 2.
|
|
79
|
-
| XOF | NGN | sell | 2.
|
|
80
|
-
| XUA | NGN | buy |
|
|
81
|
-
| XUA | NGN | middle |
|
|
82
|
-
| XUA | NGN | sell |
|
|
83
|
-
| ZAR | NGN | buy | 80.
|
|
84
|
-
| ZAR | NGN | middle | 80.
|
|
85
|
-
| ZAR | NGN | sell | 80.
|
|
49
|
+
| AED | NGN | buy | 362.6192 |
|
|
50
|
+
| AED | NGN | middle | 362.7553 |
|
|
51
|
+
| AED | NGN | sell | 362.8914 |
|
|
52
|
+
| CHF | NGN | buy | 1600.3518 |
|
|
53
|
+
| CHF | NGN | middle | 1600.9525 |
|
|
54
|
+
| CHF | NGN | sell | 1601.5533 |
|
|
55
|
+
| CNY | NGN | buy | 198.9831 |
|
|
56
|
+
| CNY | NGN | middle | 199.0578 |
|
|
57
|
+
| CNY | NGN | sell | 199.1325 |
|
|
58
|
+
| DKK | NGN | buy | 199.4031 |
|
|
59
|
+
| DKK | NGN | middle | 199.4779 |
|
|
60
|
+
| DKK | NGN | sell | 199.5528 |
|
|
61
|
+
| EUR | NGN | buy | 1490.8772 |
|
|
62
|
+
| EUR | NGN | middle | 1491.4368 |
|
|
63
|
+
| EUR | NGN | sell | 1491.9965 |
|
|
64
|
+
| GBP | NGN | buy | 1764.7308 |
|
|
65
|
+
| GBP | NGN | middle | 1765.3932 |
|
|
66
|
+
| GBP | NGN | sell | 1766.0557 |
|
|
67
|
+
| JPY | NGN | buy | 8.4164 |
|
|
68
|
+
| JPY | NGN | middle | 8.4195 |
|
|
69
|
+
| JPY | NGN | sell | 8.4227 |
|
|
70
|
+
| SAR | NGN | buy | 354.6348 |
|
|
71
|
+
| SAR | NGN | middle | 354.7679 |
|
|
72
|
+
| SAR | NGN | sell | 354.901 |
|
|
73
|
+
| USD | NGN | buy | 1331.9728 |
|
|
74
|
+
| USD | NGN | middle | 1332.4728 |
|
|
75
|
+
| USD | NGN | sell | 1332.9728 |
|
|
76
|
+
| XDR | NGN | buy | 1801.653 |
|
|
77
|
+
| XDR | NGN | middle | 1802.3294 |
|
|
78
|
+
| XDR | NGN | sell | 1803.0057 |
|
|
79
|
+
| XOF | NGN | buy | 2.2548 |
|
|
80
|
+
| XOF | NGN | middle | 2.2648 |
|
|
81
|
+
| XOF | NGN | sell | 2.2748 |
|
|
82
|
+
| XUA | NGN | buy | 1800.6437 |
|
|
83
|
+
| XUA | NGN | middle | 1801.3197 |
|
|
84
|
+
| XUA | NGN | sell | 1801.9956 |
|
|
85
|
+
| ZAR | NGN | buy | 80.7467 |
|
|
86
|
+
| ZAR | NGN | middle | 80.777 |
|
|
87
|
+
| ZAR | NGN | sell | 80.8073 |
|
|
86
88
|
|
|
87
89
|
Source: [Official rates published by CBN, served by AllRatesToday](https://allratestoday.com/central-bank-rates-api/cbn/). Rates are as printed by the central bank; AllRatesToday is not affiliated with it.
|
|
88
90
|
<!-- daily-table:end -->
|
|
@@ -139,10 +141,10 @@ const pair = await getRate('USD', 'NGN', { apiKey: 'art_live_...' });
|
|
|
139
141
|
{
|
|
140
142
|
bank: 'cbn',
|
|
141
143
|
name: 'Central Bank of Nigeria',
|
|
142
|
-
rate_date: '2026-10-
|
|
144
|
+
rate_date: '2026-10-13', // Central Bank of Nigeria's own publication date
|
|
143
145
|
source: 'USD',
|
|
144
146
|
target: 'NGN',
|
|
145
|
-
rate:
|
|
147
|
+
rate: 1332.4728,
|
|
146
148
|
rate_type: 'middle',
|
|
147
149
|
derived: false,
|
|
148
150
|
method: 'published',
|
|
@@ -167,11 +169,11 @@ console.log(table.rate_date, table.rates.length);
|
|
|
167
169
|
{
|
|
168
170
|
bank: 'cbn',
|
|
169
171
|
name: 'Central Bank of Nigeria',
|
|
170
|
-
rate_date: '2026-10-
|
|
172
|
+
rate_date: '2026-10-13',
|
|
171
173
|
rates: [
|
|
172
|
-
{ "base": "USD", "quote": "NGN", "type": "middle", "value":
|
|
173
|
-
{ "base": "USD", "quote": "NGN", "type": "sell", "value": 1332.
|
|
174
|
-
{ "base": "USD", "quote": "NGN", "type": "buy", "value": 1331.
|
|
174
|
+
{ "base": "USD", "quote": "NGN", "type": "middle", "value": 1332.4728 },
|
|
175
|
+
{ "base": "USD", "quote": "NGN", "type": "sell", "value": 1332.9728 },
|
|
176
|
+
{ "base": "USD", "quote": "NGN", "type": "buy", "value": 1331.9728 },
|
|
175
177
|
// … the rest of the published table (13 currencies vs NGN)
|
|
176
178
|
],
|
|
177
179
|
disclaimer: '…'
|
|
@@ -211,7 +213,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
|
|
|
211
213
|
import { getHistory } from 'cbn-exchange-rate';
|
|
212
214
|
|
|
213
215
|
const series = await getHistory(
|
|
214
|
-
{ source: 'USD', target: 'NGN', from: '2026-01-01', to: '2026-10-
|
|
216
|
+
{ source: 'USD', target: 'NGN', from: '2026-01-01', to: '2026-10-13' },
|
|
215
217
|
{ apiKey: 'art_live_...' }
|
|
216
218
|
);
|
|
217
219
|
```
|
|
@@ -224,11 +226,11 @@ const series = await getHistory(
|
|
|
224
226
|
source: 'USD',
|
|
225
227
|
target: 'NGN',
|
|
226
228
|
from: '2026-01-01',
|
|
227
|
-
to: '2026-10-
|
|
229
|
+
to: '2026-10-13',
|
|
228
230
|
count: 152,
|
|
229
231
|
rates: [
|
|
230
232
|
// one entry per publication date
|
|
231
|
-
{ date: '2026-10-
|
|
233
|
+
{ date: '2026-10-13', rate: 1332.4728, rate_type: 'middle', derived: false, method: 'published' },
|
|
232
234
|
// …
|
|
233
235
|
],
|
|
234
236
|
disclaimer: '…'
|
|
@@ -347,9 +349,9 @@ getRate('USD', 'NGN', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
|
|
|
347
349
|
|
|
348
350
|
Need the whole archive rather than an API call? The same published tables are mirrored daily as open data:
|
|
349
351
|
|
|
350
|
-
- Hugging Face: [
|
|
352
|
+
- Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) — one CSV per institution (`rates/cbn.csv`)
|
|
351
353
|
- Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
|
|
352
|
-
-
|
|
354
|
+
- Raw JSON on GitHub: `https://raw.githubusercontent.com/AllRates-Today/central-bank-exchange-rates/main/data/cbn/latest.json`
|
|
353
355
|
|
|
354
356
|
## 🔗 Links
|
|
355
357
|
|
package/package.json
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cbn-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.13",
|
|
4
4
|
"description": "Official Central Bank of Nigeria (Nigeria) daily exchange rates — 13 currencies vs NGN, history since 2001. Zero-dependency Node.js/TypeScript client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cbn",
|
|
7
|
+
"central-bank-of-nigeria",
|
|
7
8
|
"central",
|
|
8
9
|
"bank",
|
|
9
|
-
"of",
|
|
10
10
|
"nigeria",
|
|
11
11
|
"exchange-rate",
|
|
12
12
|
"exchange-rates",
|
|
13
|
+
"exchangerate",
|
|
14
|
+
"exchange rate",
|
|
15
|
+
"ngn-exchange-rate",
|
|
13
16
|
"currency",
|
|
14
17
|
"forex",
|
|
15
18
|
"fx",
|
|
16
19
|
"ngn",
|
|
20
|
+
"currency-api",
|
|
21
|
+
"currency-exchange-rates",
|
|
22
|
+
"forex-api",
|
|
23
|
+
"currency-conversion",
|
|
24
|
+
"currency-exchange",
|
|
25
|
+
"currency-rates",
|
|
17
26
|
"central-bank",
|
|
18
27
|
"official-rates",
|
|
19
|
-
"nigeria",
|
|
20
28
|
"api",
|
|
21
29
|
"typescript"
|
|
22
30
|
],
|