bnm-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 +36 -36
  2. package/package.json +11 -2
package/README.md CHANGED
@@ -42,37 +42,37 @@ 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 Bank Negara Malaysia — 27 rates. Updated 2026-10-12.
45
+ Published **2026-10-16** by Bank Negara Malaysia — 27 rates. Updated 2026-10-16.
46
46
 
47
47
  | Base | Quote | Type | Rate |
48
48
  | --- | --- | --- | ---: |
49
- | AED | MYR | middle | 1.111512 |
50
- | AUD | MYR | middle | 2.8504 |
51
- | BND | MYR | middle | 3.1906 |
52
- | CAD | MYR | middle | 2.8632 |
53
- | CHF | MYR | middle | 4.9181 |
54
- | CNY | MYR | middle | 0.61 |
55
- | EGP | MYR | middle | 0.0777 |
56
- | EUR | MYR | middle | 4.5762 |
57
- | GBP | MYR | middle | 5.4076 |
58
- | HKD | MYR | middle | 0.520184 |
59
- | IDR | MYR | middle | 0.000228 |
60
- | INR | MYR | middle | 0.042581 |
61
- | JPY | MYR | middle | 0.025799 |
62
- | KHR | MYR | middle | 0.000999 |
63
- | KRW | MYR | middle | 0.003059 |
49
+ | AED | MYR | middle | 1.111883 |
50
+ | AUD | MYR | middle | 2.8368 |
51
+ | BND | MYR | middle | 3.1874 |
52
+ | CAD | MYR | middle | 2.881 |
53
+ | CHF | MYR | middle | 4.9401 |
54
+ | CNY | MYR | middle | 0.6104 |
55
+ | EGP | MYR | middle | 0.0764 |
56
+ | EUR | MYR | middle | 4.5888 |
57
+ | GBP | MYR | middle | 5.4321 |
58
+ | HKD | MYR | middle | 0.52035 |
59
+ | IDR | MYR | middle | 0.000226 |
60
+ | INR | MYR | middle | 0.04311 |
61
+ | JPY | MYR | middle | 0.025863 |
62
+ | KHR | MYR | middle | 0.001001 |
63
+ | KRW | MYR | middle | 0.00304 |
64
64
  | MMK | MYR | middle | 0.00195 |
65
- | NPR | MYR | middle | 0.026612 |
66
- | NZD | MYR | middle | 2.2891 |
67
- | PHP | MYR | middle | 0.065072 |
68
- | PKR | MYR | middle | 0.014737 |
69
- | SAR | MYR | middle | 1.087194 |
70
- | SGD | MYR | middle | 3.1906 |
71
- | THB | MYR | middle | 0.121786 |
72
- | TWD | MYR | middle | 0.127882 |
73
- | USD | MYR | middle | 4.0823 |
65
+ | NPR | MYR | middle | 0.026943 |
66
+ | NZD | MYR | middle | 2.3086 |
67
+ | PHP | MYR | middle | 0.06481 |
68
+ | PKR | MYR | middle | 0.014742 |
69
+ | SAR | MYR | middle | 1.088106 |
70
+ | SGD | MYR | middle | 3.1874 |
71
+ | THB | MYR | middle | 0.122005 |
72
+ | TWD | MYR | middle | 0.125871 |
73
+ | USD | MYR | middle | 4.0835 |
74
74
  | VND | MYR | middle | 0.000158 |
75
- | XDR | MYR | middle | 5.5243 |
75
+ | XDR | MYR | middle | 5.5291 |
76
76
 
77
77
  Source: [Official rates published by BNM, served by AllRatesToday](https://allratestoday.com/central-bank-rates-api/bnm/). Rates are as printed by the central bank; AllRatesToday is not affiliated with it.
78
78
  <!-- daily-table:end -->
@@ -129,10 +129,10 @@ const pair = await getRate('USD', 'MYR', { apiKey: 'art_live_...' });
129
129
  {
130
130
  bank: 'bnm',
131
131
  name: 'Bank Negara Malaysia',
132
- rate_date: '2026-10-12', // Bank Negara Malaysia's own publication date
132
+ rate_date: '2026-10-14', // Bank Negara Malaysia's own publication date
133
133
  source: 'USD',
134
134
  target: 'MYR',
135
- rate: 4.0823,
135
+ rate: 4.082,
136
136
  rate_type: 'middle',
137
137
  derived: false,
138
138
  method: 'published',
@@ -157,9 +157,9 @@ console.log(table.rate_date, table.rates.length);
157
157
  {
158
158
  bank: 'bnm',
159
159
  name: 'Bank Negara Malaysia',
160
- rate_date: '2026-10-12',
160
+ rate_date: '2026-10-14',
161
161
  rates: [
162
- { "base": "USD", "quote": "MYR", "type": "middle", "value": 4.0823 },
162
+ { "base": "USD", "quote": "MYR", "type": "middle", "value": 4.082 },
163
163
  // … the rest of the published table (27 currencies vs MYR)
164
164
  ],
165
165
  disclaimer: '…'
@@ -199,7 +199,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
199
199
  import { getHistory } from 'bnm-exchange-rate';
200
200
 
201
201
  const series = await getHistory(
202
- { source: 'USD', target: 'MYR', from: '2026-01-01', to: '2026-10-12' },
202
+ { source: 'USD', target: 'MYR', from: '2026-01-01', to: '2026-10-14' },
203
203
  { apiKey: 'art_live_...' }
204
204
  );
205
205
  ```
@@ -212,11 +212,11 @@ const series = await getHistory(
212
212
  source: 'USD',
213
213
  target: 'MYR',
214
214
  from: '2026-01-01',
215
- to: '2026-10-12',
215
+ to: '2026-10-14',
216
216
  count: 152,
217
217
  rates: [
218
218
  // one entry per publication date
219
- { date: '2026-10-12', rate: 4.0823, rate_type: 'middle', derived: false, method: 'published' },
219
+ { date: '2026-10-14', rate: 4.082, rate_type: 'middle', derived: false, method: 'published' },
220
220
  // …
221
221
  ],
222
222
  disclaimer: '…'
@@ -266,7 +266,7 @@ curl "https://allratestoday.com/api/v1/central-bank/bnm/latest?format=xml&api_ke
266
266
  - 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
267
267
  - 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('bnm')` 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
268
268
  - 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 bnm ...` command
269
- - 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`
269
+ - 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`
270
270
  - Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) · [for-ai-agents](https://allratestoday.com/for-ai-agents/)
271
271
 
272
272
  ## ⚖️ Published vs derived rates
@@ -335,9 +335,9 @@ getRate('USD', 'MYR', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
335
335
 
336
336
  Need the whole archive rather than an API call? The same published tables are mirrored daily as open data:
337
337
 
338
- - Hugging Face: [AllRates/central-bank-exchange-rates](https://huggingface.co/datasets/AllRates/central-bank-exchange-rates) — one CSV per institution (`rates/bnm.csv`)
338
+ - Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) — one CSV per institution (`rates/bnm.csv`)
339
339
  - Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
340
- - CDN JSON: `https://cdn.jsdelivr.net/gh/AllRates-Today/central-bank-exchange-rates@main/data/bnm/latest.json`
340
+ - Raw JSON on GitHub: `https://raw.githubusercontent.com/AllRates-Today/central-bank-exchange-rates/main/data/bnm/latest.json`
341
341
 
342
342
  ## 🔗 Links
343
343
 
package/package.json CHANGED
@@ -1,21 +1,30 @@
1
1
  {
2
2
  "name": "bnm-exchange-rate",
3
- "version": "1.3.9",
3
+ "version": "1.3.14",
4
4
  "description": "Official Bank Negara Malaysia (Malaysia) daily exchange rates — 27 currencies vs MYR, history since 2020. Zero-dependency Node.js/TypeScript client.",
5
5
  "keywords": [
6
6
  "bnm",
7
+ "bank-negara-malaysia",
7
8
  "bank",
8
9
  "negara",
9
10
  "malaysia",
10
11
  "exchange-rate",
11
12
  "exchange-rates",
13
+ "exchangerate",
14
+ "exchange rate",
15
+ "myr-exchange-rate",
12
16
  "currency",
13
17
  "forex",
14
18
  "fx",
15
19
  "myr",
20
+ "currency-api",
21
+ "currency-exchange-rates",
22
+ "forex-api",
23
+ "currency-conversion",
24
+ "currency-exchange",
25
+ "currency-rates",
16
26
  "central-bank",
17
27
  "official-rates",
18
- "malaysia",
19
28
  "api",
20
29
  "typescript"
21
30
  ],