bnm-exchange-rate 1.3.9 → 1.3.13

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 +32 -32
  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-14** by Bank Negara Malaysia — 27 rates. Updated 2026-10-14.
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 |
49
+ | AED | MYR | middle | 1.111444 |
50
+ | AUD | MYR | middle | 2.8558 |
51
+ | BND | MYR | middle | 3.1878 |
52
+ | CAD | MYR | middle | 2.8742 |
53
+ | CHF | MYR | middle | 4.906 |
54
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 |
55
+ | EGP | MYR | middle | 0.0773 |
56
+ | EUR | MYR | middle | 4.5749 |
57
+ | GBP | MYR | middle | 5.4172 |
58
+ | HKD | MYR | middle | 0.520123 |
59
59
  | IDR | MYR | middle | 0.000228 |
60
- | INR | MYR | middle | 0.042581 |
61
- | JPY | MYR | middle | 0.025799 |
60
+ | INR | MYR | middle | 0.042944 |
61
+ | JPY | MYR | middle | 0.025798 |
62
62
  | KHR | MYR | middle | 0.000999 |
63
- | KRW | MYR | middle | 0.003059 |
63
+ | KRW | MYR | middle | 0.003052 |
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.026839 |
66
+ | NZD | MYR | middle | 2.2949 |
67
+ | PHP | MYR | middle | 0.064994 |
68
+ | PKR | MYR | middle | 0.014738 |
69
+ | SAR | MYR | middle | 1.086881 |
70
+ | SGD | MYR | middle | 3.1878 |
71
+ | THB | MYR | middle | 0.121669 |
72
+ | TWD | MYR | middle | 0.126833 |
73
+ | USD | MYR | middle | 4.082 |
74
74
  | VND | MYR | middle | 0.000158 |
75
- | XDR | MYR | middle | 5.5243 |
75
+ | XDR | MYR | middle | 5.5214 |
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: '…'
@@ -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.13",
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
  ],