boc-exchange-rate 1.3.8 → 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.
- package/README.md +36 -34
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -37,37 +37,39 @@ The open endpoint serves the *latest* table only and asks for a visible attribut
|
|
|
37
37
|
|
|
38
38
|
## 📈 Latest published table
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
[](https://allratestoday.com/central-bank-rates-api/boc/)
|
|
41
|
+
|
|
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.
|
|
41
43
|
|
|
42
44
|
<!-- daily-table:start -->
|
|
43
|
-
Published **2026-10-
|
|
45
|
+
Published **2026-10-13** by Bank of Canada — 24 rates. Updated 2026-10-14.
|
|
44
46
|
|
|
45
47
|
| Base | Quote | Type | Rate |
|
|
46
48
|
| --- | --- | --- | ---: |
|
|
47
|
-
| AUD | CAD | indicative | 0.
|
|
48
|
-
| BRL | CAD | indicative | 0.
|
|
49
|
-
| CHF | CAD | indicative | 1.
|
|
50
|
-
| CNY | CAD | indicative | 0.
|
|
51
|
-
| EUR | CAD | indicative | 1.
|
|
52
|
-
| GBP | CAD | indicative | 1.
|
|
53
|
-
| HKD | CAD | indicative | 0.
|
|
54
|
-
| IDR | CAD | indicative | 0.
|
|
55
|
-
| INR | CAD | indicative | 0.
|
|
56
|
-
| JPY | CAD | indicative | 0.
|
|
57
|
-
| KRW | CAD | indicative | 0.
|
|
58
|
-
| MXN | CAD | indicative | 0.
|
|
59
|
-
| MYR | CAD | indicative | 0.
|
|
60
|
-
| NOK | CAD | indicative | 0.
|
|
61
|
-
| NZD | CAD | indicative | 0.
|
|
62
|
-
| PEN | CAD | indicative | 0.
|
|
49
|
+
| AUD | CAD | indicative | 0.9928 |
|
|
50
|
+
| BRL | CAD | indicative | 0.2837 |
|
|
51
|
+
| CHF | CAD | indicative | 1.7079 |
|
|
52
|
+
| CNY | CAD | indicative | 0.2125 |
|
|
53
|
+
| EUR | CAD | indicative | 1.5919 |
|
|
54
|
+
| GBP | CAD | indicative | 1.8841 |
|
|
55
|
+
| HKD | CAD | indicative | 0.1812 |
|
|
56
|
+
| IDR | CAD | indicative | 0.000079 |
|
|
57
|
+
| INR | CAD | indicative | 0.01493 |
|
|
58
|
+
| JPY | CAD | indicative | 0.00898 |
|
|
59
|
+
| KRW | CAD | indicative | 0.00106 |
|
|
60
|
+
| MXN | CAD | indicative | 0.07746 |
|
|
61
|
+
| MYR | CAD | indicative | 0.3481 |
|
|
62
|
+
| NOK | CAD | indicative | 0.1493 |
|
|
63
|
+
| NZD | CAD | indicative | 0.7983 |
|
|
64
|
+
| PEN | CAD | indicative | 0.4138 |
|
|
63
65
|
| PLN | CAD | indicative | 0.3641 |
|
|
64
|
-
| SEK | CAD | indicative | 0.
|
|
65
|
-
| SGD | CAD | indicative | 1.
|
|
66
|
-
| THB | CAD | indicative | 0.
|
|
67
|
-
| TRY | CAD | indicative | 0.
|
|
68
|
-
| TWD | CAD | indicative | 0.
|
|
69
|
-
| USD | CAD | indicative | 1.
|
|
70
|
-
| ZAR | CAD | indicative | 0.
|
|
66
|
+
| SEK | CAD | indicative | 0.1426 |
|
|
67
|
+
| SGD | CAD | indicative | 1.1111 |
|
|
68
|
+
| THB | CAD | indicative | 0.04236 |
|
|
69
|
+
| TRY | CAD | indicative | 0.0288 |
|
|
70
|
+
| TWD | CAD | indicative | 0.0442 |
|
|
71
|
+
| USD | CAD | indicative | 1.4222 |
|
|
72
|
+
| ZAR | CAD | indicative | 0.0862 |
|
|
71
73
|
|
|
72
74
|
Source: [Official rates published by BOC, served by AllRatesToday](https://allratestoday.com/central-bank-rates-api/boc/). Rates are as printed by the central bank; AllRatesToday is not affiliated with it.
|
|
73
75
|
<!-- daily-table:end -->
|
|
@@ -124,10 +126,10 @@ const pair = await getRate('USD', 'CAD', { apiKey: 'art_live_...' });
|
|
|
124
126
|
{
|
|
125
127
|
bank: 'boc',
|
|
126
128
|
name: 'Bank of Canada',
|
|
127
|
-
rate_date: '2026-10-
|
|
129
|
+
rate_date: '2026-10-13', // Bank of Canada's own publication date
|
|
128
130
|
source: 'USD',
|
|
129
131
|
target: 'CAD',
|
|
130
|
-
rate: 1.
|
|
132
|
+
rate: 1.4222,
|
|
131
133
|
rate_type: 'indicative',
|
|
132
134
|
derived: false,
|
|
133
135
|
method: 'published',
|
|
@@ -152,9 +154,9 @@ console.log(table.rate_date, table.rates.length);
|
|
|
152
154
|
{
|
|
153
155
|
bank: 'boc',
|
|
154
156
|
name: 'Bank of Canada',
|
|
155
|
-
rate_date: '2026-10-
|
|
157
|
+
rate_date: '2026-10-13',
|
|
156
158
|
rates: [
|
|
157
|
-
{ "base": "USD", "quote": "CAD", "type": "indicative", "value": 1.
|
|
159
|
+
{ "base": "USD", "quote": "CAD", "type": "indicative", "value": 1.4222 },
|
|
158
160
|
// … the rest of the published table (24 currencies vs CAD)
|
|
159
161
|
],
|
|
160
162
|
disclaimer: '…'
|
|
@@ -194,7 +196,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
|
|
|
194
196
|
import { getHistory } from 'boc-exchange-rate';
|
|
195
197
|
|
|
196
198
|
const series = await getHistory(
|
|
197
|
-
{ source: 'USD', target: 'CAD', from: '2026-01-01', to: '2026-10-
|
|
199
|
+
{ source: 'USD', target: 'CAD', from: '2026-01-01', to: '2026-10-13' },
|
|
198
200
|
{ apiKey: 'art_live_...' }
|
|
199
201
|
);
|
|
200
202
|
```
|
|
@@ -207,11 +209,11 @@ const series = await getHistory(
|
|
|
207
209
|
source: 'USD',
|
|
208
210
|
target: 'CAD',
|
|
209
211
|
from: '2026-01-01',
|
|
210
|
-
to: '2026-10-
|
|
212
|
+
to: '2026-10-13',
|
|
211
213
|
count: 152,
|
|
212
214
|
rates: [
|
|
213
215
|
// one entry per publication date
|
|
214
|
-
{ date: '2026-10-
|
|
216
|
+
{ date: '2026-10-13', rate: 1.4222, rate_type: 'indicative', derived: false, method: 'published' },
|
|
215
217
|
// …
|
|
216
218
|
],
|
|
217
219
|
disclaimer: '…'
|
|
@@ -330,9 +332,9 @@ getRate('USD', 'CAD', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
|
|
|
330
332
|
|
|
331
333
|
Need the whole archive rather than an API call? The same published tables are mirrored daily as open data:
|
|
332
334
|
|
|
333
|
-
- Hugging Face: [
|
|
335
|
+
- Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) — one CSV per institution (`rates/boc.csv`)
|
|
334
336
|
- Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
|
|
335
|
-
-
|
|
337
|
+
- Raw JSON on GitHub: `https://raw.githubusercontent.com/AllRates-Today/central-bank-exchange-rates/main/data/boc/latest.json`
|
|
336
338
|
|
|
337
339
|
## 🔗 Links
|
|
338
340
|
|
package/package.json
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "boc-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.13",
|
|
4
4
|
"description": "Official Bank of Canada (Canada) daily exchange rates — 24 currencies vs CAD, history since 2017. Zero-dependency Node.js/TypeScript client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"boc",
|
|
7
|
+
"bank-of-canada",
|
|
7
8
|
"bank",
|
|
8
|
-
"of",
|
|
9
9
|
"canada",
|
|
10
10
|
"exchange-rate",
|
|
11
11
|
"exchange-rates",
|
|
12
|
+
"exchangerate",
|
|
13
|
+
"exchange rate",
|
|
14
|
+
"cad-exchange-rate",
|
|
12
15
|
"currency",
|
|
13
16
|
"forex",
|
|
14
17
|
"fx",
|
|
15
18
|
"cad",
|
|
19
|
+
"currency-api",
|
|
20
|
+
"currency-exchange-rates",
|
|
21
|
+
"forex-api",
|
|
22
|
+
"currency-conversion",
|
|
23
|
+
"currency-exchange",
|
|
24
|
+
"currency-rates",
|
|
16
25
|
"central-bank",
|
|
17
26
|
"official-rates",
|
|
18
|
-
"canada",
|
|
19
27
|
"api",
|
|
20
28
|
"typescript"
|
|
21
29
|
],
|