cbn-exchange-rate 1.3.9 → 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 +51 -51
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -42,49 +42,49 @@ The open endpoint serves the *latest* table only and asks for a visible attribut
|
|
|
42
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.
|
|
43
43
|
|
|
44
44
|
<!-- daily-table:start -->
|
|
45
|
-
Published **2026-10-
|
|
45
|
+
Published **2026-10-13** by Central Bank of Nigeria — 39 rates. Updated 2026-10-14.
|
|
46
46
|
|
|
47
47
|
| Base | Quote | Type | Rate |
|
|
48
48
|
| --- | --- | --- | ---: |
|
|
49
|
-
| AED | NGN | buy | 362.
|
|
50
|
-
| AED | NGN | middle | 362.
|
|
51
|
-
| AED | NGN | sell | 362.
|
|
52
|
-
| CHF | NGN | buy |
|
|
53
|
-
| CHF | NGN | middle |
|
|
54
|
-
| CHF | NGN | sell |
|
|
55
|
-
| CNY | NGN | buy | 198.
|
|
56
|
-
| CNY | NGN | middle |
|
|
57
|
-
| CNY | NGN | sell | 199.
|
|
58
|
-
| DKK | NGN | buy | 199.
|
|
59
|
-
| DKK | NGN | middle | 199.
|
|
60
|
-
| DKK | NGN | sell | 199.
|
|
61
|
-
| EUR | NGN | buy |
|
|
62
|
-
| EUR | NGN | middle |
|
|
63
|
-
| EUR | NGN | sell |
|
|
64
|
-
| GBP | NGN | buy |
|
|
65
|
-
| GBP | NGN | middle |
|
|
66
|
-
| GBP | NGN | sell |
|
|
67
|
-
| JPY | NGN | buy | 8.
|
|
68
|
-
| JPY | NGN | middle | 8.
|
|
69
|
-
| JPY | NGN | sell | 8.
|
|
70
|
-
| SAR | NGN | buy | 354.
|
|
71
|
-
| SAR | NGN | middle | 354.
|
|
72
|
-
| SAR | NGN | sell | 354.
|
|
73
|
-
| USD | NGN | buy | 1331.
|
|
74
|
-
| USD | NGN | middle |
|
|
75
|
-
| USD | NGN | sell | 1332.
|
|
76
|
-
| XDR | NGN | buy | 1801.
|
|
77
|
-
| XDR | NGN | middle | 1802.
|
|
78
|
-
| XDR | NGN | sell |
|
|
79
|
-
| XOF | NGN | buy | 2.
|
|
80
|
-
| XOF | NGN | middle | 2.
|
|
81
|
-
| XOF | NGN | sell | 2.
|
|
82
|
-
| XUA | NGN | buy |
|
|
83
|
-
| XUA | NGN | middle |
|
|
84
|
-
| XUA | NGN | sell |
|
|
85
|
-
| ZAR | NGN | buy | 80.
|
|
86
|
-
| ZAR | NGN | middle | 80.
|
|
87
|
-
| 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 |
|
|
88
88
|
|
|
89
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.
|
|
90
90
|
<!-- daily-table:end -->
|
|
@@ -141,10 +141,10 @@ const pair = await getRate('USD', 'NGN', { apiKey: 'art_live_...' });
|
|
|
141
141
|
{
|
|
142
142
|
bank: 'cbn',
|
|
143
143
|
name: 'Central Bank of Nigeria',
|
|
144
|
-
rate_date: '2026-10-
|
|
144
|
+
rate_date: '2026-10-13', // Central Bank of Nigeria's own publication date
|
|
145
145
|
source: 'USD',
|
|
146
146
|
target: 'NGN',
|
|
147
|
-
rate:
|
|
147
|
+
rate: 1332.4728,
|
|
148
148
|
rate_type: 'middle',
|
|
149
149
|
derived: false,
|
|
150
150
|
method: 'published',
|
|
@@ -169,11 +169,11 @@ console.log(table.rate_date, table.rates.length);
|
|
|
169
169
|
{
|
|
170
170
|
bank: 'cbn',
|
|
171
171
|
name: 'Central Bank of Nigeria',
|
|
172
|
-
rate_date: '2026-10-
|
|
172
|
+
rate_date: '2026-10-13',
|
|
173
173
|
rates: [
|
|
174
|
-
{ "base": "USD", "quote": "NGN", "type": "middle", "value":
|
|
175
|
-
{ "base": "USD", "quote": "NGN", "type": "sell", "value": 1332.
|
|
176
|
-
{ "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 },
|
|
177
177
|
// … the rest of the published table (13 currencies vs NGN)
|
|
178
178
|
],
|
|
179
179
|
disclaimer: '…'
|
|
@@ -213,7 +213,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
|
|
|
213
213
|
import { getHistory } from 'cbn-exchange-rate';
|
|
214
214
|
|
|
215
215
|
const series = await getHistory(
|
|
216
|
-
{ source: 'USD', target: 'NGN', from: '2026-01-01', to: '2026-10-
|
|
216
|
+
{ source: 'USD', target: 'NGN', from: '2026-01-01', to: '2026-10-13' },
|
|
217
217
|
{ apiKey: 'art_live_...' }
|
|
218
218
|
);
|
|
219
219
|
```
|
|
@@ -226,11 +226,11 @@ const series = await getHistory(
|
|
|
226
226
|
source: 'USD',
|
|
227
227
|
target: 'NGN',
|
|
228
228
|
from: '2026-01-01',
|
|
229
|
-
to: '2026-10-
|
|
229
|
+
to: '2026-10-13',
|
|
230
230
|
count: 152,
|
|
231
231
|
rates: [
|
|
232
232
|
// one entry per publication date
|
|
233
|
-
{ date: '2026-10-
|
|
233
|
+
{ date: '2026-10-13', rate: 1332.4728, rate_type: 'middle', derived: false, method: 'published' },
|
|
234
234
|
// …
|
|
235
235
|
],
|
|
236
236
|
disclaimer: '…'
|
|
@@ -349,9 +349,9 @@ getRate('USD', 'NGN', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
|
|
|
349
349
|
|
|
350
350
|
Need the whole archive rather than an API call? The same published tables are mirrored daily as open data:
|
|
351
351
|
|
|
352
|
-
- 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`)
|
|
353
353
|
- Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
|
|
354
|
-
-
|
|
354
|
+
- Raw JSON on GitHub: `https://raw.githubusercontent.com/AllRates-Today/central-bank-exchange-rates/main/data/cbn/latest.json`
|
|
355
355
|
|
|
356
356
|
## 🔗 Links
|
|
357
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
|
],
|