cbb-exchange-rate 1.3.13 โ 1.3.16
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 +41 -37
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
> **Official rate, not mid-market:** every value here is a number Central Bank of Bahrain itself published, fixed once printed and carrying the central bank's own `rate_date` โ what filings and audits require. Need the live mid-market rate for pricing or display instead? Use the [mid-market API](https://allratestoday.com/docs/) or [`@allratestoday/sdk`](https://www.npmjs.com/package/@allratestoday/sdk). The two can diverge by several percent.
|
|
22
22
|
|
|
23
|
+
## ๐ Get your API key
|
|
24
|
+
|
|
25
|
+
Get a free API key at [allratestoday.com/register](https://allratestoday.com/register) โ no credit card required. Latest rates are on every plan, including free.
|
|
26
|
+
|
|
23
27
|
## โก Try it without a key
|
|
24
28
|
|
|
25
29
|
The latest Central Bank of Bahrain table is also served keyless, CORS-open and edge-cached, for evaluation, embeds and AI agents:
|
|
@@ -33,60 +37,59 @@ const r = await fetch('https://allratestoday.com/api/open/central-bank/cbb').the
|
|
|
33
37
|
console.log(r.rate_date, r.rates.length); // the central bank's latest published table, no key
|
|
34
38
|
```
|
|
35
39
|
|
|
36
|
-
The open endpoint serves the *latest* table only and asks for a visible attribution link. The client below uses the keyed API, which adds point-in-time tables
|
|
40
|
+
The open endpoint serves the *latest* table only (JSON by default; add `?format=csv`, `xml` or `xlsx` for a file) and asks for a visible attribution link. The client below uses the keyed API, which adds point-in-time tables and history.
|
|
37
41
|
|
|
38
42
|
## ๐ Latest published table
|
|
39
43
|
|
|
40
44
|
[](https://allratestoday.com/central-bank-rates-api/cbb/)
|
|
41
45
|
|
|
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
|
|
46
|
+
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 same table as text is folded below 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
47
|
|
|
44
48
|
<!-- daily-table:start -->
|
|
45
|
-
|
|
49
|
+
<details>
|
|
50
|
+
<summary>Table as text: published 2026-10-20 by Central Bank of Bahrain โ 33 rates. Updated 2026-10-20.</summary>
|
|
46
51
|
|
|
47
52
|
| Base | Quote | Type | Rate |
|
|
48
53
|
| --- | --- | --- | ---: |
|
|
49
|
-
| AED | BHD | reference | 0.
|
|
54
|
+
| AED | BHD | reference | 0.102392 |
|
|
50
55
|
| ANG | BHD | reference | 0.210101 |
|
|
51
|
-
| AUD | BHD | reference | 0.
|
|
52
|
-
| BDT | BHD | reference | 0.
|
|
53
|
-
| CAD | BHD | reference | 0.
|
|
54
|
-
| CHF | BHD | reference | 0.
|
|
55
|
-
| CNY | BHD | reference | 0.
|
|
56
|
-
| EGP | BHD | reference | 0.
|
|
57
|
-
| EUR | BHD | reference | 0.
|
|
58
|
-
| GBP | BHD | reference | 0.
|
|
59
|
-
| HKD | BHD | reference | 0.
|
|
56
|
+
| AUD | BHD | reference | 0.262599 |
|
|
57
|
+
| BDT | BHD | reference | 0.003049 |
|
|
58
|
+
| CAD | BHD | reference | 0.266639 |
|
|
59
|
+
| CHF | BHD | reference | 0.454836 |
|
|
60
|
+
| CNY | BHD | reference | 0.056274 |
|
|
61
|
+
| EGP | BHD | reference | 0.006972 |
|
|
62
|
+
| EUR | BHD | reference | 0.421737 |
|
|
63
|
+
| GBP | BHD | reference | 0.500545 |
|
|
64
|
+
| HKD | BHD | reference | 0.047922 |
|
|
60
65
|
| IDR | BHD | reference | 0.000021 |
|
|
61
|
-
| ILS | BHD | reference | 0.
|
|
62
|
-
| INR | BHD | reference | 0.
|
|
63
|
-
| JOD | BHD | reference | 0.
|
|
64
|
-
| JPY | BHD | reference | 0.
|
|
65
|
-
| KWD | BHD | reference | 1.
|
|
66
|
+
| ILS | BHD | reference | 0.121201 |
|
|
67
|
+
| INR | BHD | reference | 0.003962 |
|
|
68
|
+
| JOD | BHD | reference | 0.530514 |
|
|
69
|
+
| JPY | BHD | reference | 0.002372 |
|
|
70
|
+
| KWD | BHD | reference | 1.209089 |
|
|
66
71
|
| LBP | BHD | reference | 0.000004 |
|
|
67
|
-
| LKR | BHD | reference | 0.
|
|
68
|
-
| MAD | BHD | reference | 0.
|
|
69
|
-
| NOK | BHD | reference | 0.
|
|
70
|
-
| NPR | BHD | reference | 0.
|
|
71
|
-
| NZD | BHD | reference | 0.
|
|
72
|
-
| OMR | BHD | reference | 0.
|
|
73
|
-
| PHP | BHD | reference | 0.
|
|
72
|
+
| LKR | BHD | reference | 0.001136 |
|
|
73
|
+
| MAD | BHD | reference | 0.038429 |
|
|
74
|
+
| NOK | BHD | reference | 0.039912 |
|
|
75
|
+
| NPR | BHD | reference | 0.002477 |
|
|
76
|
+
| NZD | BHD | reference | 0.213088 |
|
|
77
|
+
| OMR | BHD | reference | 0.976784 |
|
|
78
|
+
| PHP | BHD | reference | 0.005962 |
|
|
74
79
|
| PKR | BHD | reference | 0.001357 |
|
|
75
|
-
| QAR | BHD | reference | 0.
|
|
76
|
-
| SAR | BHD | reference | 0.
|
|
77
|
-
| SGD | BHD | reference | 0.
|
|
78
|
-
| THB | BHD | reference | 0.
|
|
79
|
-
| TND | BHD | reference | 0.
|
|
80
|
-
| TRY | BHD | reference | 0.
|
|
80
|
+
| QAR | BHD | reference | 0.103174 |
|
|
81
|
+
| SAR | BHD | reference | 0.100231 |
|
|
82
|
+
| SGD | BHD | reference | 0.293859 |
|
|
83
|
+
| THB | BHD | reference | 0.011197 |
|
|
84
|
+
| TND | BHD | reference | 0.125501 |
|
|
85
|
+
| TRY | BHD | reference | 0.007586 |
|
|
81
86
|
| USD | BHD | reference | 0.376081 |
|
|
82
87
|
|
|
88
|
+
</details>
|
|
89
|
+
|
|
83
90
|
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.
|
|
84
91
|
<!-- daily-table:end -->
|
|
85
92
|
|
|
86
|
-
## ๐ Get your API key
|
|
87
|
-
|
|
88
|
-
Get a free API key at [allratestoday.com/register](https://allratestoday.com/register) โ no credit card required. Latest rates are on every plan, including free.
|
|
89
|
-
|
|
90
93
|
## ๐ฆ Installation
|
|
91
94
|
|
|
92
95
|
```bash
|
|
@@ -272,7 +275,7 @@ curl "https://allratestoday.com/api/v1/central-bank/cbb/latest?format=xml&api_ke
|
|
|
272
275
|
- 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
276
|
- 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
277
|
- 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
|
-
-
|
|
278
|
+
- 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
279
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) ยท [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
277
280
|
|
|
278
281
|
## โ๏ธ Published vs derived rates
|
|
@@ -351,7 +354,8 @@ Need the whole archive rather than an API call? The same published tables are mi
|
|
|
351
354
|
- [All central bank sources](https://allratestoday.com/central-bank-rates-api/)
|
|
352
355
|
- [Package docs on the site](https://allratestoday.com/docs/sdk/cbb-exchange-rate/) ยท [ERP integration guides](https://allratestoday.com/docs/integrations/)
|
|
353
356
|
- [API documentation](https://allratestoday.com/docs/#central-bank) ยท [Interactive reference](https://allratestoday.com/api-reference/) ยท [Methodology](https://allratestoday.com/official-rates-methodology/)
|
|
354
|
-
- [Register (
|
|
357
|
+
- [Register (Free)](https://allratestoday.com/register) ยท [Dashboard](https://allratestoday.com/profile) ยท [Pricing](https://allratestoday.com/pricing/)
|
|
358
|
+
- [Status](https://allratestoday.com/status)
|
|
355
359
|
- [GitHub](https://github.com/AllRates-Today/cbb-exchange-rate)
|
|
356
360
|
|
|
357
361
|
## ๐ License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cbb-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.16",
|
|
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",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"exchange-rates",
|
|
13
13
|
"exchangerate",
|
|
14
14
|
"exchange rate",
|
|
15
|
+
"exchange rates",
|
|
15
16
|
"bhd-exchange-rate",
|
|
16
17
|
"currency",
|
|
17
18
|
"forex",
|