@allratestoday/boc-exchange-rate 1.3.6 โ†’ 1.3.9

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 +49 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
  [![license](https://img.shields.io/npm/l/@allratestoday%2Fboc-exchange-rate.svg)](https://github.com/AllRates-Today/boc-exchange-rate/blob/main/LICENSE)
5
5
  [![zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](https://www.npmjs.com/package/@allratestoday/boc-exchange-rate)
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-types%20included-3178C6.svg)](https://www.typescriptlang.org/)
7
+ [![USD/CAD today](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Fboc%3Fsource%3DUSD%26target%3DCAD&query=%24.rate&label=USD%2FCAD%20published%20by%20Bank%20of%20Canada&color=0A7E8C&cacheSeconds=3600)](https://allratestoday.com/central-bank-rates-api/boc/)
8
+ [![rate date](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Fboc%3Fsource%3DUSD%26target%3DCAD&query=%24.rate_date&label=rate%20date&color=555&cacheSeconds=3600)](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,45 @@ 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
+ [![Latest Bank of Canada table](https://allratestoday.com/api/open/central-bank/boc/table.svg)](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.
43
+
44
+ <!-- daily-table:start -->
45
+ Published **2026-10-09** by Bank of Canada โ€” 24 rates. Updated 2026-10-12.
46
+
47
+ | Base | Quote | Type | Rate |
48
+ | --- | --- | --- | ---: |
49
+ | AUD | CAD | indicative | 0.9958 |
50
+ | BRL | CAD | indicative | 0.286 |
51
+ | CHF | CAD | indicative | 1.718 |
52
+ | CNY | CAD | indicative | 0.2132 |
53
+ | EUR | CAD | indicative | 1.5978 |
54
+ | GBP | CAD | indicative | 1.8879 |
55
+ | HKD | CAD | indicative | 0.1818 |
56
+ | IDR | CAD | indicative | 0.00008 |
57
+ | INR | CAD | indicative | 0.01475 |
58
+ | JPY | CAD | indicative | 0.00902 |
59
+ | KRW | CAD | indicative | 0.001063 |
60
+ | MXN | CAD | indicative | 0.07767 |
61
+ | MYR | CAD | indicative | 0.3493 |
62
+ | NOK | CAD | indicative | 0.1491 |
63
+ | NZD | CAD | indicative | 0.8005 |
64
+ | PEN | CAD | indicative | 0.4143 |
65
+ | PLN | CAD | indicative | 0.3641 |
66
+ | SEK | CAD | indicative | 0.1427 |
67
+ | SGD | CAD | indicative | 1.114 |
68
+ | THB | CAD | indicative | 0.04255 |
69
+ | TRY | CAD | indicative | 0.0289 |
70
+ | TWD | CAD | indicative | 0.04467 |
71
+ | USD | CAD | indicative | 1.4271 |
72
+ | ZAR | CAD | indicative | 0.08634 |
73
+
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.
75
+ <!-- daily-table:end -->
76
+
36
77
  ## ๐Ÿ”‘ Get your API key
37
78
 
38
79
  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 +126,10 @@ const pair = await getRate('USD', 'CAD', { apiKey: 'art_live_...' });
85
126
  {
86
127
  bank: 'boc',
87
128
  name: 'Bank of Canada',
88
- rate_date: '2026-10-08', // Bank of Canada's own publication date
129
+ rate_date: '2026-10-09', // Bank of Canada's own publication date
89
130
  source: 'USD',
90
131
  target: 'CAD',
91
- rate: 1.424,
132
+ rate: 1.4271,
92
133
  rate_type: 'indicative',
93
134
  derived: false,
94
135
  method: 'published',
@@ -113,9 +154,9 @@ console.log(table.rate_date, table.rates.length);
113
154
  {
114
155
  bank: 'boc',
115
156
  name: 'Bank of Canada',
116
- rate_date: '2026-10-08',
157
+ rate_date: '2026-10-09',
117
158
  rates: [
118
- { "base": "USD", "quote": "CAD", "type": "indicative", "value": 1.424 },
159
+ { "base": "USD", "quote": "CAD", "type": "indicative", "value": 1.4271 },
119
160
  // โ€ฆ the rest of the published table (24 currencies vs CAD)
120
161
  ],
121
162
  disclaimer: 'โ€ฆ'
@@ -155,7 +196,7 @@ Paid plans. One resolved rate per publication date โ€” ready for charting, reval
155
196
  import { getHistory } from '@allratestoday/boc-exchange-rate';
156
197
 
157
198
  const series = await getHistory(
158
- { source: 'USD', target: 'CAD', from: '2026-01-01', to: '2026-10-08' },
199
+ { source: 'USD', target: 'CAD', from: '2026-01-01', to: '2026-10-09' },
159
200
  { apiKey: 'art_live_...' }
160
201
  );
161
202
  ```
@@ -168,11 +209,11 @@ const series = await getHistory(
168
209
  source: 'USD',
169
210
  target: 'CAD',
170
211
  from: '2026-01-01',
171
- to: '2026-10-08',
212
+ to: '2026-10-09',
172
213
  count: 152,
173
214
  rates: [
174
215
  // one entry per publication date
175
- { date: '2026-10-08', rate: 1.424, rate_type: 'indicative', derived: false, method: 'published' },
216
+ { date: '2026-10-09', rate: 1.4271, rate_type: 'indicative', derived: false, method: 'published' },
176
217
  // โ€ฆ
177
218
  ],
178
219
  disclaimer: 'โ€ฆ'
@@ -222,6 +263,7 @@ curl "https://allratestoday.com/api/v1/central-bank/boc/latest?format=xml&api_ke
222
263
  - 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
264
  - 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
224
265
  - 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
266
+ - 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`
225
267
  - Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) ยท [for-ai-agents](https://allratestoday.com/for-ai-agents/)
226
268
 
227
269
  ## โš–๏ธ 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.6",
3
+ "version": "1.3.9",
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",