@allratestoday/boc-exchange-rate 1.3.5 โ 1.3.7
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 +47 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
[](https://github.com/AllRates-Today/boc-exchange-rate/blob/main/LICENSE)
|
|
5
5
|
[](https://www.npmjs.com/package/@allratestoday/boc-exchange-rate)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://allratestoday.com/central-bank-rates-api/boc/)
|
|
8
|
+
[](https://allratestoday.com/central-bank-rates-api/boc/)
|
|
7
9
|
|
|
8
10
|
**Official Bank of Canada (Canada) daily exchange rates for Node.js and TypeScript. The published central bank rates behind tax filings, customs valuations, audits, and compliant invoicing โ not market estimates, but the numbers Bank of Canada itself prints, every business day.**
|
|
9
11
|
|
|
@@ -33,6 +35,43 @@ console.log(r.rate_date, r.rates.length); // the central bank's latest published
|
|
|
33
35
|
|
|
34
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, history, and CSV/XML/Excel output.
|
|
35
37
|
|
|
38
|
+
## ๐ Latest published table
|
|
39
|
+
|
|
40
|
+
Today's full Bank of Canada table, straight from the central bank's latest publication. On GitHub it is refreshed by [a daily Action](.github/workflows/daily-table.yml) that reads the keyless endpoint above and commits only when the central bank publishes a new table; the copy on npm is as of the package's publish date.
|
|
41
|
+
|
|
42
|
+
<!-- daily-table:start -->
|
|
43
|
+
Published **2026-10-08** by Bank of Canada โ 24 rates. Updated 2026-10-08.
|
|
44
|
+
|
|
45
|
+
| Base | Quote | Type | Rate |
|
|
46
|
+
| --- | --- | --- | ---: |
|
|
47
|
+
| AUD | CAD | indicative | 0.9902 |
|
|
48
|
+
| BRL | CAD | indicative | 0.284 |
|
|
49
|
+
| CHF | CAD | indicative | 1.7101 |
|
|
50
|
+
| CNY | CAD | indicative | 0.2125 |
|
|
51
|
+
| EUR | CAD | indicative | 1.595 |
|
|
52
|
+
| GBP | CAD | indicative | 1.8822 |
|
|
53
|
+
| HKD | CAD | indicative | 0.1814 |
|
|
54
|
+
| IDR | CAD | indicative | 0.00008 |
|
|
55
|
+
| INR | CAD | indicative | 0.01471 |
|
|
56
|
+
| JPY | CAD | indicative | 0.00901 |
|
|
57
|
+
| KRW | CAD | indicative | 0.001061 |
|
|
58
|
+
| MXN | CAD | indicative | 0.07867 |
|
|
59
|
+
| MYR | CAD | indicative | 0.348 |
|
|
60
|
+
| NOK | CAD | indicative | 0.1488 |
|
|
61
|
+
| NZD | CAD | indicative | 0.7973 |
|
|
62
|
+
| PEN | CAD | indicative | 0.4137 |
|
|
63
|
+
| PLN | CAD | indicative | 0.3643 |
|
|
64
|
+
| SEK | CAD | indicative | 0.1426 |
|
|
65
|
+
| SGD | CAD | indicative | 1.1114 |
|
|
66
|
+
| THB | CAD | indicative | 0.0423 |
|
|
67
|
+
| TRY | CAD | indicative | 0.0289 |
|
|
68
|
+
| TWD | CAD | indicative | 0.04456 |
|
|
69
|
+
| USD | CAD | indicative | 1.424 |
|
|
70
|
+
| ZAR | CAD | indicative | 0.08566 |
|
|
71
|
+
|
|
72
|
+
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
|
+
<!-- daily-table:end -->
|
|
74
|
+
|
|
36
75
|
## ๐ Get your API key
|
|
37
76
|
|
|
38
77
|
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.
|
|
@@ -85,10 +124,10 @@ const pair = await getRate('USD', 'CAD', { apiKey: 'art_live_...' });
|
|
|
85
124
|
{
|
|
86
125
|
bank: 'boc',
|
|
87
126
|
name: 'Bank of Canada',
|
|
88
|
-
rate_date: '2026-10-
|
|
127
|
+
rate_date: '2026-10-08', // Bank of Canada's own publication date
|
|
89
128
|
source: 'USD',
|
|
90
129
|
target: 'CAD',
|
|
91
|
-
rate: 1.
|
|
130
|
+
rate: 1.424,
|
|
92
131
|
rate_type: 'indicative',
|
|
93
132
|
derived: false,
|
|
94
133
|
method: 'published',
|
|
@@ -113,9 +152,9 @@ console.log(table.rate_date, table.rates.length);
|
|
|
113
152
|
{
|
|
114
153
|
bank: 'boc',
|
|
115
154
|
name: 'Bank of Canada',
|
|
116
|
-
rate_date: '2026-10-
|
|
155
|
+
rate_date: '2026-10-08',
|
|
117
156
|
rates: [
|
|
118
|
-
{ "base": "USD", "quote": "CAD", "type": "indicative", "value": 1.
|
|
157
|
+
{ "base": "USD", "quote": "CAD", "type": "indicative", "value": 1.424 },
|
|
119
158
|
// โฆ the rest of the published table (24 currencies vs CAD)
|
|
120
159
|
],
|
|
121
160
|
disclaimer: 'โฆ'
|
|
@@ -155,7 +194,7 @@ Paid plans. One resolved rate per publication date โ ready for charting, reval
|
|
|
155
194
|
import { getHistory } from '@allratestoday/boc-exchange-rate';
|
|
156
195
|
|
|
157
196
|
const series = await getHistory(
|
|
158
|
-
{ source: 'USD', target: 'CAD', from: '2026-01-01', to: '2026-10-
|
|
197
|
+
{ source: 'USD', target: 'CAD', from: '2026-01-01', to: '2026-10-08' },
|
|
159
198
|
{ apiKey: 'art_live_...' }
|
|
160
199
|
);
|
|
161
200
|
```
|
|
@@ -168,11 +207,11 @@ const series = await getHistory(
|
|
|
168
207
|
source: 'USD',
|
|
169
208
|
target: 'CAD',
|
|
170
209
|
from: '2026-01-01',
|
|
171
|
-
to: '2026-10-
|
|
210
|
+
to: '2026-10-08',
|
|
172
211
|
count: 152,
|
|
173
212
|
rates: [
|
|
174
213
|
// one entry per publication date
|
|
175
|
-
{ date: '2026-10-
|
|
214
|
+
{ date: '2026-10-08', rate: 1.424, rate_type: 'indicative', derived: false, method: 'published' },
|
|
176
215
|
// โฆ
|
|
177
216
|
],
|
|
178
217
|
disclaimer: 'โฆ'
|
|
@@ -221,6 +260,7 @@ curl "https://allratestoday.com/api/v1/central-bank/boc/latest?format=xml&api_ke
|
|
|
221
260
|
|
|
222
261
|
- 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
|
|
223
262
|
- 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('boc')` 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
|
|
263
|
+
- 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 boc ...` command
|
|
224
264
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) ยท [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
225
265
|
|
|
226
266
|
## โ๏ธ Published vs derived rates
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allratestoday/boc-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
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",
|