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.
Files changed (2) hide show
  1. package/README.md +31 -30
  2. 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-08** by Bank of Canada — 24 rates. Updated 2026-10-08.
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.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 |
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.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 |
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.04456 |
69
- | USD | CAD | indicative | 1.424 |
70
- | ZAR | CAD | indicative | 0.08566 |
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-08', // Bank of Canada's own publication date
127
+ rate_date: '2026-10-09', // Bank of Canada's own publication date
128
128
  source: 'USD',
129
129
  target: 'CAD',
130
- rate: 1.424,
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-08',
155
+ rate_date: '2026-10-09',
156
156
  rates: [
157
- { "base": "USD", "quote": "CAD", "type": "indicative", "value": 1.424 },
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-08' },
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-08',
210
+ to: '2026-10-09',
211
211
  count: 152,
212
212
  rates: [
213
213
  // one entry per publication date
214
- { date: '2026-10-08', rate: 1.424, rate_type: 'indicative', derived: false, method: 'published' },
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "boc-exchange-rate",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
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",