cbn-exchange-rate 1.3.9 → 1.3.14

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.
Files changed (2) hide show
  1. package/README.md +52 -52
  2. 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-12** by Central Bank of Nigeria — 39 rates. Updated 2026-10-12.
45
+ Published **2026-10-16** by Central Bank of Nigeria — 39 rates. Updated 2026-10-16.
46
46
 
47
47
  | Base | Quote | Type | Rate |
48
48
  | --- | --- | --- | ---: |
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 |
49
+ | AED | NGN | buy | 362.4641 |
50
+ | AED | NGN | middle | 362.6003 |
51
+ | AED | NGN | sell | 362.7364 |
52
+ | CHF | NGN | buy | 1614.0376 |
53
+ | CHF | NGN | middle | 1614.6438 |
54
+ | CHF | NGN | sell | 1615.25 |
55
+ | CNY | NGN | buy | 199.0994 |
56
+ | CNY | NGN | middle | 199.1742 |
57
+ | CNY | NGN | sell | 199.249 |
58
+ | DKK | NGN | buy | 200.2344 |
59
+ | DKK | NGN | middle | 200.3096 |
60
+ | DKK | NGN | sell | 200.3848 |
61
+ | EUR | NGN | buy | 1490.0773 |
62
+ | EUR | NGN | middle | 1490.637 |
63
+ | EUR | NGN | sell | 1491.1966 |
64
+ | GBP | NGN | buy | 1763.784 |
65
+ | GBP | NGN | middle | 1764.4464 |
66
+ | GBP | NGN | sell | 1765.1089 |
67
+ | JPY | NGN | buy | 8.423 |
68
+ | JPY | NGN | middle | 8.4262 |
69
+ | JPY | NGN | sell | 8.4293 |
70
+ | SAR | NGN | buy | 354.7184 |
71
+ | SAR | NGN | middle | 354.8516 |
72
+ | SAR | NGN | sell | 354.9849 |
73
+ | USD | NGN | buy | 1331.2582 |
74
+ | USD | NGN | middle | 1331.7582 |
75
+ | USD | NGN | sell | 1332.2582 |
76
+ | XDR | NGN | buy | 1805.7985 |
77
+ | XDR | NGN | middle | 1806.4767 |
78
+ | XDR | NGN | sell | 1807.155 |
79
+ | XOF | NGN | buy | 2.2544 |
80
+ | XOF | NGN | middle | 2.2644 |
81
+ | XOF | NGN | sell | 2.2744 |
82
+ | XUA | NGN | buy | 1800.9754 |
83
+ | XUA | NGN | middle | 1801.6518 |
84
+ | XUA | NGN | sell | 1802.3282 |
85
+ | ZAR | NGN | buy | 80.9674 |
86
+ | ZAR | NGN | middle | 80.9978 |
87
+ | ZAR | NGN | sell | 81.0282 |
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-12', // Central Bank of Nigeria's own publication date
144
+ rate_date: '2026-10-13', // Central Bank of Nigeria's own publication date
145
145
  source: 'USD',
146
146
  target: 'NGN',
147
- rate: 1331.596,
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-12',
172
+ rate_date: '2026-10-13',
173
173
  rates: [
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 },
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-12' },
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-12',
229
+ to: '2026-10-13',
230
230
  count: 152,
231
231
  rates: [
232
232
  // one entry per publication date
233
- { date: '2026-10-12', rate: 1331.596, rate_type: 'middle', derived: false, method: 'published' },
233
+ { date: '2026-10-13', rate: 1332.4728, rate_type: 'middle', derived: false, method: 'published' },
234
234
  // …
235
235
  ],
236
236
  disclaimer: '…'
@@ -280,7 +280,7 @@ curl "https://allratestoday.com/api/v1/central-bank/cbn/latest?format=xml&api_ke
280
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
281
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
282
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`
283
+ - Evaluating? 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 that covers the free-plan methods (latest table, pairs); dated tables and history need a [paid plan](https://allratestoday.com/pricing/). The MCP servers expose it as `request_trial_key`
284
284
  - Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) · [for-ai-agents](https://allratestoday.com/for-ai-agents/)
285
285
 
286
286
  ## ⚖️ Published vs derived rates
@@ -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: [AllRates/central-bank-exchange-rates](https://huggingface.co/datasets/AllRates/central-bank-exchange-rates) — one CSV per institution (`rates/cbn.csv`)
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
- - CDN JSON: `https://cdn.jsdelivr.net/gh/AllRates-Today/central-bank-exchange-rates@main/data/cbn/latest.json`
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.9",
3
+ "version": "1.3.14",
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
  ],