boc-exchange-rate 1.3.7 → 1.3.8
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 +31 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,34 +40,34 @@ The open endpoint serves the *latest* table only and asks for a visible attribut
|
|
|
40
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
41
|
|
|
42
42
|
<!-- daily-table:start -->
|
|
43
|
-
Published **2026-10-
|
|
43
|
+
Published **2026-10-09** by Bank of Canada — 24 rates. Updated 2026-10-12.
|
|
44
44
|
|
|
45
45
|
| Base | Quote | Type | Rate |
|
|
46
46
|
| --- | --- | --- | ---: |
|
|
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.
|
|
47
|
+
| AUD | CAD | indicative | 0.9958 |
|
|
48
|
+
| BRL | CAD | indicative | 0.286 |
|
|
49
|
+
| CHF | CAD | indicative | 1.718 |
|
|
50
|
+
| CNY | CAD | indicative | 0.2132 |
|
|
51
|
+
| EUR | CAD | indicative | 1.5978 |
|
|
52
|
+
| GBP | CAD | indicative | 1.8879 |
|
|
53
|
+
| HKD | CAD | indicative | 0.1818 |
|
|
54
54
|
| IDR | CAD | indicative | 0.00008 |
|
|
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.
|
|
63
|
-
| PLN | CAD | indicative | 0.
|
|
64
|
-
| SEK | CAD | indicative | 0.
|
|
65
|
-
| SGD | CAD | indicative | 1.
|
|
66
|
-
| THB | CAD | indicative | 0.
|
|
55
|
+
| INR | CAD | indicative | 0.01475 |
|
|
56
|
+
| JPY | CAD | indicative | 0.00902 |
|
|
57
|
+
| KRW | CAD | indicative | 0.001063 |
|
|
58
|
+
| MXN | CAD | indicative | 0.07767 |
|
|
59
|
+
| MYR | CAD | indicative | 0.3493 |
|
|
60
|
+
| NOK | CAD | indicative | 0.1491 |
|
|
61
|
+
| NZD | CAD | indicative | 0.8005 |
|
|
62
|
+
| PEN | CAD | indicative | 0.4143 |
|
|
63
|
+
| PLN | CAD | indicative | 0.3641 |
|
|
64
|
+
| SEK | CAD | indicative | 0.1427 |
|
|
65
|
+
| SGD | CAD | indicative | 1.114 |
|
|
66
|
+
| THB | CAD | indicative | 0.04255 |
|
|
67
67
|
| TRY | CAD | indicative | 0.0289 |
|
|
68
|
-
| TWD | CAD | indicative | 0.
|
|
69
|
-
| USD | CAD | indicative | 1.
|
|
70
|
-
| ZAR | CAD | indicative | 0.
|
|
68
|
+
| TWD | CAD | indicative | 0.04467 |
|
|
69
|
+
| USD | CAD | indicative | 1.4271 |
|
|
70
|
+
| ZAR | CAD | indicative | 0.08634 |
|
|
71
71
|
|
|
72
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
73
|
<!-- daily-table:end -->
|
|
@@ -124,10 +124,10 @@ const pair = await getRate('USD', 'CAD', { apiKey: 'art_live_...' });
|
|
|
124
124
|
{
|
|
125
125
|
bank: 'boc',
|
|
126
126
|
name: 'Bank of Canada',
|
|
127
|
-
rate_date: '2026-10-
|
|
127
|
+
rate_date: '2026-10-09', // Bank of Canada's own publication date
|
|
128
128
|
source: 'USD',
|
|
129
129
|
target: 'CAD',
|
|
130
|
-
rate: 1.
|
|
130
|
+
rate: 1.4271,
|
|
131
131
|
rate_type: 'indicative',
|
|
132
132
|
derived: false,
|
|
133
133
|
method: 'published',
|
|
@@ -152,9 +152,9 @@ console.log(table.rate_date, table.rates.length);
|
|
|
152
152
|
{
|
|
153
153
|
bank: 'boc',
|
|
154
154
|
name: 'Bank of Canada',
|
|
155
|
-
rate_date: '2026-10-
|
|
155
|
+
rate_date: '2026-10-09',
|
|
156
156
|
rates: [
|
|
157
|
-
{ "base": "USD", "quote": "CAD", "type": "indicative", "value": 1.
|
|
157
|
+
{ "base": "USD", "quote": "CAD", "type": "indicative", "value": 1.4271 },
|
|
158
158
|
// … the rest of the published table (24 currencies vs CAD)
|
|
159
159
|
],
|
|
160
160
|
disclaimer: '…'
|
|
@@ -194,7 +194,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
|
|
|
194
194
|
import { getHistory } from 'boc-exchange-rate';
|
|
195
195
|
|
|
196
196
|
const series = await getHistory(
|
|
197
|
-
{ source: 'USD', target: 'CAD', from: '2026-01-01', to: '2026-10-
|
|
197
|
+
{ source: 'USD', target: 'CAD', from: '2026-01-01', to: '2026-10-09' },
|
|
198
198
|
{ apiKey: 'art_live_...' }
|
|
199
199
|
);
|
|
200
200
|
```
|
|
@@ -207,11 +207,11 @@ const series = await getHistory(
|
|
|
207
207
|
source: 'USD',
|
|
208
208
|
target: 'CAD',
|
|
209
209
|
from: '2026-01-01',
|
|
210
|
-
to: '2026-10-
|
|
210
|
+
to: '2026-10-09',
|
|
211
211
|
count: 152,
|
|
212
212
|
rates: [
|
|
213
213
|
// one entry per publication date
|
|
214
|
-
{ date: '2026-10-
|
|
214
|
+
{ date: '2026-10-09', rate: 1.4271, rate_type: 'indicative', derived: false, method: 'published' },
|
|
215
215
|
// …
|
|
216
216
|
],
|
|
217
217
|
disclaimer: '…'
|
|
@@ -261,6 +261,7 @@ curl "https://allratestoday.com/api/v1/central-bank/boc/latest?format=xml&api_ke
|
|
|
261
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
|
|
262
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
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
|
|
264
|
+
- 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`
|
|
264
265
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) · [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
265
266
|
|
|
266
267
|
## ⚖️ Published vs derived rates
|
package/package.json
CHANGED