boj-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 +10 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ The open endpoint serves the *latest* table only and asks for a visible attribut
|
|
|
40
40
|
Today's full Bank of Japan 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-07** by Bank of Japan — 2 rates. Updated 2026-10-
|
|
43
|
+
Published **2026-10-07** by Bank of Japan (the API currently flags this table as stale) — 2 rates. Updated 2026-10-12.
|
|
44
44
|
|
|
45
45
|
| Base | Quote | Type | Rate |
|
|
46
46
|
| --- | --- | --- | ---: |
|
|
@@ -102,10 +102,10 @@ const pair = await getRate('USD', 'JPY', { apiKey: 'art_live_...' });
|
|
|
102
102
|
{
|
|
103
103
|
bank: 'boj',
|
|
104
104
|
name: 'Bank of Japan',
|
|
105
|
-
rate_date: '2026-10-
|
|
105
|
+
rate_date: '2026-10-07', // Bank of Japan's own publication date
|
|
106
106
|
source: 'USD',
|
|
107
107
|
target: 'JPY',
|
|
108
|
-
rate:
|
|
108
|
+
rate: 158.46,
|
|
109
109
|
rate_type: 'middle',
|
|
110
110
|
derived: false,
|
|
111
111
|
method: 'published',
|
|
@@ -130,10 +130,10 @@ console.log(table.rate_date, table.rates.length);
|
|
|
130
130
|
{
|
|
131
131
|
bank: 'boj',
|
|
132
132
|
name: 'Bank of Japan',
|
|
133
|
-
rate_date: '2026-10-
|
|
133
|
+
rate_date: '2026-10-07',
|
|
134
134
|
rates: [
|
|
135
|
-
{ "base": "USD", "quote": "JPY", "type": "middle", "value":
|
|
136
|
-
{ "base": "USD", "quote": "JPY", "type": "spot", "value": 158.
|
|
135
|
+
{ "base": "USD", "quote": "JPY", "type": "middle", "value": 158.46 },
|
|
136
|
+
{ "base": "USD", "quote": "JPY", "type": "spot", "value": 158.11 },
|
|
137
137
|
// … the rest of the published table (1 currency vs JPY)
|
|
138
138
|
],
|
|
139
139
|
disclaimer: '…'
|
|
@@ -173,7 +173,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
|
|
|
173
173
|
import { getHistory } from 'boj-exchange-rate';
|
|
174
174
|
|
|
175
175
|
const series = await getHistory(
|
|
176
|
-
{ source: 'USD', target: 'JPY', from: '2026-01-01', to: '2026-10-
|
|
176
|
+
{ source: 'USD', target: 'JPY', from: '2026-01-01', to: '2026-10-07' },
|
|
177
177
|
{ apiKey: 'art_live_...' }
|
|
178
178
|
);
|
|
179
179
|
```
|
|
@@ -186,11 +186,11 @@ const series = await getHistory(
|
|
|
186
186
|
source: 'USD',
|
|
187
187
|
target: 'JPY',
|
|
188
188
|
from: '2026-01-01',
|
|
189
|
-
to: '2026-10-
|
|
189
|
+
to: '2026-10-07',
|
|
190
190
|
count: 152,
|
|
191
191
|
rates: [
|
|
192
192
|
// one entry per publication date
|
|
193
|
-
{ date: '2026-10-
|
|
193
|
+
{ date: '2026-10-07', rate: 158.46, rate_type: 'middle', derived: false, method: 'published' },
|
|
194
194
|
// …
|
|
195
195
|
],
|
|
196
196
|
disclaimer: '…'
|
|
@@ -240,6 +240,7 @@ curl "https://allratestoday.com/api/v1/central-bank/boj/latest?format=xml&api_ke
|
|
|
240
240
|
- 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
|
|
241
241
|
- 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('boj')` 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
|
|
242
242
|
- 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 boj ...` command
|
|
243
|
+
- 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`
|
|
243
244
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) · [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
244
245
|
|
|
245
246
|
## ⚖️ Published vs derived rates
|
package/package.json
CHANGED