cbn-exchange-rate 1.3.7 โ 1.3.9
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 +53 -50
- package/package.json +1 -1
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-12** by Central Bank of Nigeria โ 39 rates. Updated 2026-10-12.
|
|
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 | 198.
|
|
55
|
-
| CNY | NGN | sell |
|
|
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 | 1331.
|
|
73
|
-
| USD | NGN | sell | 1332.
|
|
74
|
-
| XDR | NGN | buy |
|
|
75
|
-
| XDR | NGN | middle |
|
|
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 | 1800.
|
|
83
|
-
| ZAR | NGN | buy |
|
|
84
|
-
| ZAR | NGN | middle |
|
|
85
|
-
| ZAR | NGN | sell | 80.
|
|
49
|
+
| AED | NGN | buy | 362.3805 |
|
|
50
|
+
| AED | NGN | middle | 362.5166 |
|
|
51
|
+
| AED | NGN | sell | 362.6527 |
|
|
52
|
+
| CHF | NGN | buy | 1597.3791 |
|
|
53
|
+
| CHF | NGN | middle | 1597.9791 |
|
|
54
|
+
| CHF | NGN | sell | 1598.5791 |
|
|
55
|
+
| CNY | NGN | buy | 198.8759 |
|
|
56
|
+
| CNY | NGN | middle | 198.9506 |
|
|
57
|
+
| CNY | NGN | sell | 199.0253 |
|
|
58
|
+
| DKK | NGN | buy | 199.0364 |
|
|
59
|
+
| DKK | NGN | middle | 199.1112 |
|
|
60
|
+
| DKK | NGN | sell | 199.186 |
|
|
61
|
+
| EUR | NGN | buy | 1488.0322 |
|
|
62
|
+
| EUR | NGN | middle | 1488.5912 |
|
|
63
|
+
| EUR | NGN | sell | 1489.1501 |
|
|
64
|
+
| GBP | NGN | buy | 1761.3062 |
|
|
65
|
+
| GBP | NGN | middle | 1761.9678 |
|
|
66
|
+
| GBP | NGN | sell | 1762.6294 |
|
|
67
|
+
| JPY | NGN | buy | 8.3912 |
|
|
68
|
+
| JPY | NGN | middle | 8.3944 |
|
|
69
|
+
| JPY | NGN | sell | 8.3975 |
|
|
70
|
+
| SAR | NGN | buy | 354.4013 |
|
|
71
|
+
| SAR | NGN | middle | 354.5345 |
|
|
72
|
+
| SAR | NGN | sell | 354.6676 |
|
|
73
|
+
| USD | NGN | buy | 1331.096 |
|
|
74
|
+
| USD | NGN | middle | 1331.596 |
|
|
75
|
+
| USD | NGN | sell | 1332.096 |
|
|
76
|
+
| XDR | NGN | buy | 1801.3722 |
|
|
77
|
+
| XDR | NGN | middle | 1802.0489 |
|
|
78
|
+
| XDR | NGN | sell | 1802.7255 |
|
|
79
|
+
| XOF | NGN | buy | 2.2533 |
|
|
80
|
+
| XOF | NGN | middle | 2.2633 |
|
|
81
|
+
| XOF | NGN | sell | 2.2733 |
|
|
82
|
+
| XUA | NGN | buy | 1799.4123 |
|
|
83
|
+
| XUA | NGN | middle | 1800.0882 |
|
|
84
|
+
| XUA | NGN | sell | 1800.7641 |
|
|
85
|
+
| ZAR | NGN | buy | 80.5193 |
|
|
86
|
+
| ZAR | NGN | middle | 80.5495 |
|
|
87
|
+
| ZAR | NGN | sell | 80.5797 |
|
|
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-12', // Central Bank of Nigeria's own publication date
|
|
143
145
|
source: 'USD',
|
|
144
146
|
target: 'NGN',
|
|
145
|
-
rate: 1331.
|
|
147
|
+
rate: 1331.596,
|
|
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-12',
|
|
171
173
|
rates: [
|
|
172
|
-
{ "base": "USD", "quote": "NGN", "type": "middle", "value": 1331.
|
|
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": 1331.596 },
|
|
175
|
+
{ "base": "USD", "quote": "NGN", "type": "sell", "value": 1332.096 },
|
|
176
|
+
{ "base": "USD", "quote": "NGN", "type": "buy", "value": 1331.096 },
|
|
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-12' },
|
|
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-12',
|
|
228
230
|
count: 152,
|
|
229
231
|
rates: [
|
|
230
232
|
// one entry per publication date
|
|
231
|
-
{ date: '2026-10-
|
|
233
|
+
{ date: '2026-10-12', rate: 1331.596, rate_type: 'middle', derived: false, method: 'published' },
|
|
232
234
|
// โฆ
|
|
233
235
|
],
|
|
234
236
|
disclaimer: 'โฆ'
|
|
@@ -278,6 +280,7 @@ curl "https://allratestoday.com/api/v1/central-bank/cbn/latest?format=xml&api_ke
|
|
|
278
280
|
- MCP server: `npx -y @allratestoday/central-bank-mcp` (stdio) or the hosted endpoint `https://allratestoday.com/api/mcp` โ tools for official rates, history, cross-bank comparison and publication calendars
|
|
279
281
|
- Already using the general SDK or MCP server? Since 2026-10-01 [`@allratestoday/sdk`](https://www.npmjs.com/package/@allratestoday/sdk) 1.4+ has `officialRates('cbn')` and [`@allratestoday/mcp-server`](https://www.npmjs.com/package/@allratestoday/mcp-server) 0.6+ has a `get_official_rates` tool โ both return this source's latest table with no key, so you can add it without a second dependency
|
|
280
282
|
- Claude Code plugin (no key): `/plugin marketplace add AllRates-Today/claude-code-plugin` then `/plugin install allratestoday@allratestoday` โ bundles both MCP servers plus an `/official-rate cbn ...` command
|
|
283
|
+
- Need dated tables or history for an evaluation? Agents can self-issue a trial key with no signup: `POST https://allratestoday.com/api/agent/keys` (send `Content-Type: application/json`) returns a 100-call key valid 7 days; the MCP servers expose it as `request_trial_key`
|
|
281
284
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) ยท [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
282
285
|
|
|
283
286
|
## โ๏ธ Published vs derived rates
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cbn-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
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",
|