cbb-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 +37 -37
  2. package/package.json +11 -3
package/README.md CHANGED
@@ -42,42 +42,42 @@ 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 Bahrain — 33 rates. Updated 2026-10-12.
45
+ Published **2026-10-16** by Central Bank of Bahrain — 33 rates. Updated 2026-10-17.
46
46
 
47
47
  | Base | Quote | Type | Rate |
48
48
  | --- | --- | --- | ---: |
49
- | AED | BHD | reference | 0.102391 |
49
+ | AED | BHD | reference | 0.102389 |
50
50
  | ANG | BHD | reference | 0.210101 |
51
- | AUD | BHD | reference | 0.262674 |
52
- | BDT | BHD | reference | 0.003065 |
53
- | CAD | BHD | reference | 0.263769 |
54
- | CHF | BHD | reference | 0.453137 |
55
- | CNY | BHD | reference | 0.056193 |
56
- | EGP | BHD | reference | 0.007182 |
57
- | EUR | BHD | reference | 0.421399 |
58
- | GBP | BHD | reference | 0.497913 |
59
- | HKD | BHD | reference | 0.047924 |
51
+ | AUD | BHD | reference | 0.262505 |
52
+ | BDT | BHD | reference | 0.003054 |
53
+ | CAD | BHD | reference | 0.264622 |
54
+ | CHF | BHD | reference | 0.452238 |
55
+ | CNY | BHD | reference | 0.056163 |
56
+ | EGP | BHD | reference | 0.007084 |
57
+ | EUR | BHD | reference | 0.421079 |
58
+ | GBP | BHD | reference | 0.497687 |
59
+ | HKD | BHD | reference | 0.047922 |
60
60
  | IDR | BHD | reference | 0.000021 |
61
- | ILS | BHD | reference | 0.122786 |
62
- | INR | BHD | reference | 0.003888 |
63
- | JOD | BHD | reference | 0.531113 |
64
- | JPY | BHD | reference | 0.002378 |
65
- | KWD | BHD | reference | 1.209439 |
61
+ | ILS | BHD | reference | 0.121285 |
62
+ | INR | BHD | reference | 0.003952 |
63
+ | JOD | BHD | reference | 0.530514 |
64
+ | JPY | BHD | reference | 0.002381 |
65
+ | KWD | BHD | reference | 1.206742 |
66
66
  | LBP | BHD | reference | 0.000004 |
67
67
  | LKR | BHD | reference | 0.001137 |
68
- | MAD | BHD | reference | 0.038547 |
69
- | NOK | BHD | reference | 0.039342 |
70
- | NPR | BHD | reference | 0.00243 |
71
- | NZD | BHD | reference | 0.211132 |
72
- | OMR | BHD | reference | 0.976809 |
73
- | PHP | BHD | reference | 0.005987 |
74
- | PKR | BHD | reference | 0.001357 |
75
- | QAR | BHD | reference | 0.103172 |
76
- | SAR | BHD | reference | 0.10014 |
77
- | SGD | BHD | reference | 0.293699 |
78
- | THB | BHD | reference | 0.011217 |
79
- | TND | BHD | reference | 0.125152 |
80
- | TRY | BHD | reference | 0.007622 |
68
+ | MAD | BHD | reference | 0.038207 |
69
+ | NOK | BHD | reference | 0.03961 |
70
+ | NPR | BHD | reference | 0.002471 |
71
+ | NZD | BHD | reference | 0.210982 |
72
+ | OMR | BHD | reference | 0.976796 |
73
+ | PHP | BHD | reference | 0.005981 |
74
+ | PKR | BHD | reference | 0.001356 |
75
+ | QAR | BHD | reference | 0.103157 |
76
+ | SAR | BHD | reference | 0.100177 |
77
+ | SGD | BHD | reference | 0.292978 |
78
+ | THB | BHD | reference | 0.011188 |
79
+ | TND | BHD | reference | 0.124898 |
80
+ | TRY | BHD | reference | 0.007611 |
81
81
  | USD | BHD | reference | 0.376081 |
82
82
 
83
83
  Source: [Official rates published by CBB, served by AllRatesToday](https://allratestoday.com/central-bank-rates-api/cbb/). Rates are as printed by the central bank; AllRatesToday is not affiliated with it.
@@ -135,7 +135,7 @@ const pair = await getRate('USD', 'BHD', { apiKey: 'art_live_...' });
135
135
  {
136
136
  bank: 'cbb',
137
137
  name: 'Central Bank of Bahrain',
138
- rate_date: '2026-10-12', // Central Bank of Bahrain's own publication date
138
+ rate_date: '2026-10-14', // Central Bank of Bahrain's own publication date
139
139
  source: 'USD',
140
140
  target: 'BHD',
141
141
  rate: 0.376081,
@@ -163,7 +163,7 @@ console.log(table.rate_date, table.rates.length);
163
163
  {
164
164
  bank: 'cbb',
165
165
  name: 'Central Bank of Bahrain',
166
- rate_date: '2026-10-12',
166
+ rate_date: '2026-10-14',
167
167
  rates: [
168
168
  { "base": "USD", "quote": "BHD", "type": "reference", "value": 0.376081 },
169
169
  // … the rest of the published table (33 currencies vs BHD)
@@ -205,7 +205,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
205
205
  import { getHistory } from 'cbb-exchange-rate';
206
206
 
207
207
  const series = await getHistory(
208
- { source: 'USD', target: 'BHD', from: '2026-01-01', to: '2026-10-12' },
208
+ { source: 'USD', target: 'BHD', from: '2026-01-01', to: '2026-10-14' },
209
209
  { apiKey: 'art_live_...' }
210
210
  );
211
211
  ```
@@ -218,11 +218,11 @@ const series = await getHistory(
218
218
  source: 'USD',
219
219
  target: 'BHD',
220
220
  from: '2026-01-01',
221
- to: '2026-10-12',
221
+ to: '2026-10-14',
222
222
  count: 152,
223
223
  rates: [
224
224
  // one entry per publication date
225
- { date: '2026-10-12', rate: 0.376081, rate_type: 'reference', derived: false, method: 'published' },
225
+ { date: '2026-10-14', rate: 0.376081, rate_type: 'reference', derived: false, method: 'published' },
226
226
  // …
227
227
  ],
228
228
  disclaimer: '…'
@@ -272,7 +272,7 @@ curl "https://allratestoday.com/api/v1/central-bank/cbb/latest?format=xml&api_ke
272
272
  - 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
273
273
  - 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('cbb')` 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
274
274
  - 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 cbb ...` command
275
- - 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`
275
+ - 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`
276
276
  - Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) · [for-ai-agents](https://allratestoday.com/for-ai-agents/)
277
277
 
278
278
  ## ⚖️ Published vs derived rates
@@ -341,9 +341,9 @@ getRate('USD', 'BHD', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
341
341
 
342
342
  Need the whole archive rather than an API call? The same published tables are mirrored daily as open data:
343
343
 
344
- - Hugging Face: [AllRates/central-bank-exchange-rates](https://huggingface.co/datasets/AllRates/central-bank-exchange-rates) — one CSV per institution (`rates/cbb.csv`)
344
+ - Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) — one CSV per institution (`rates/cbb.csv`)
345
345
  - Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
346
- - CDN JSON: `https://cdn.jsdelivr.net/gh/AllRates-Today/central-bank-exchange-rates@main/data/cbb/latest.json`
346
+ - Raw JSON on GitHub: `https://raw.githubusercontent.com/AllRates-Today/central-bank-exchange-rates/main/data/cbb/latest.json`
347
347
 
348
348
  ## 🔗 Links
349
349
 
package/package.json CHANGED
@@ -1,22 +1,30 @@
1
1
  {
2
2
  "name": "cbb-exchange-rate",
3
- "version": "1.3.9",
3
+ "version": "1.3.14",
4
4
  "description": "Official Central Bank of Bahrain (Bahrain) daily exchange rates — 33 currencies vs BHD, history since 2016. Zero-dependency Node.js/TypeScript client.",
5
5
  "keywords": [
6
6
  "cbb",
7
+ "central-bank-of-bahrain",
7
8
  "central",
8
9
  "bank",
9
- "of",
10
10
  "bahrain",
11
11
  "exchange-rate",
12
12
  "exchange-rates",
13
+ "exchangerate",
14
+ "exchange rate",
15
+ "bhd-exchange-rate",
13
16
  "currency",
14
17
  "forex",
15
18
  "fx",
16
19
  "bhd",
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
- "bahrain",
20
28
  "api",
21
29
  "typescript"
22
30
  ],