bdi-exchange-rate 1.3.29 โ 1.3.30
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 +81 -81
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
[](https://github.com/AllRates-Today/bdi-exchange-rate/blob/main/LICENSE)
|
|
5
5
|
[](https://www.npmjs.com/package/bdi-exchange-rate)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
|
-
[](https://allratestoday.com/central-bank-rates-api/bdi/)
|
|
8
8
|
[](https://allratestoday.com/central-bank-rates-api/bdi/)
|
|
9
9
|
|
|
10
10
|
**Official Banca d'Italia (Italy) 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 Banca d'Italia itself prints, every business day.**
|
|
11
11
|
|
|
12
12
|
## ๐ Why this client?
|
|
13
13
|
|
|
14
|
-
- ๐๏ธ **Official
|
|
14
|
+
- ๐๏ธ **Official rates** โ Banca d'Italia's own table, with the publisher's own `rate_date` on every response
|
|
15
15
|
- ๐
**History back to 2016** โ point-in-time tables and daily series for any past date
|
|
16
|
-
- ๐ **
|
|
16
|
+
- ๐ **Official vs derived, always flagged** โ computed inverse/cross pairs carry `derived: true`, never mixed with official prints
|
|
17
17
|
- โก **Zero dependencies** โ pure ESM + CJS over global `fetch`; Node 18+, Bun, Deno, and edge runtimes
|
|
18
18
|
- ๐ท **Type-safe** โ full TypeScript definitions shipped with the package
|
|
19
19
|
- ๐งพ **Compliance-grade metadata** โ `rate_type`, publication date, and source disclaimer on every response
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
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.
|
|
26
26
|
|
|
27
|
-
## ๐ Latest
|
|
27
|
+
## ๐ Latest official table
|
|
28
28
|
|
|
29
29
|
[](https://allratestoday.com/central-bank-rates-api/bdi/)
|
|
30
30
|
|
|
@@ -32,70 +32,70 @@ The image is rendered live from the keyless endpoint, so it follows the central
|
|
|
32
32
|
|
|
33
33
|
<!-- daily-table:start -->
|
|
34
34
|
<details>
|
|
35
|
-
<summary>Table as text: published 2026-11-
|
|
35
|
+
<summary>Table as text: published 2026-11-10 by Banca d'Italia โ 150 rates, first 60 shown. Updated 2026-11-11.</summary>
|
|
36
36
|
|
|
37
37
|
| Base | Quote | Type | Rate |
|
|
38
38
|
| --- | --- | --- | ---: |
|
|
39
|
-
| EUR | AED | reference | 4.
|
|
40
|
-
| EUR | AFN | reference |
|
|
41
|
-
| EUR | ALL | reference | 90.
|
|
42
|
-
| EUR | AMD | reference |
|
|
43
|
-
| EUR | AOA | reference |
|
|
44
|
-
| EUR | ARS | reference |
|
|
45
|
-
| EUR | AUD | reference | 1.
|
|
46
|
-
| EUR | AWG | reference |
|
|
47
|
-
| EUR | AZN | reference | 1.
|
|
39
|
+
| EUR | AED | reference | 4.1183 |
|
|
40
|
+
| EUR | AFN | reference | 73.1629 |
|
|
41
|
+
| EUR | ALL | reference | 90.77 |
|
|
42
|
+
| EUR | AMD | reference | 404.48 |
|
|
43
|
+
| EUR | AOA | reference | 1032.407 |
|
|
44
|
+
| EUR | ARS | reference | 1733.0848 |
|
|
45
|
+
| EUR | AUD | reference | 1.6244 |
|
|
46
|
+
| EUR | AWG | reference | 2.0073 |
|
|
47
|
+
| EUR | AZN | reference | 1.9064 |
|
|
48
48
|
| EUR | BAM | reference | 1.95583 |
|
|
49
|
-
| EUR | BBD | reference | 2.
|
|
50
|
-
| EUR | BDT | reference |
|
|
51
|
-
| EUR | BHD | reference | 0.
|
|
52
|
-
| EUR | BIF | reference |
|
|
53
|
-
| EUR | BMD | reference | 1.
|
|
54
|
-
| EUR | BND | reference | 1.
|
|
55
|
-
| EUR | BOB | reference | 13.
|
|
56
|
-
| EUR | BRL | reference | 6.
|
|
57
|
-
| EUR | BSD | reference | 1.
|
|
58
|
-
| EUR | BTN | reference |
|
|
59
|
-
| EUR | BWP | reference | 15.
|
|
60
|
-
| EUR | BZD | reference | 2.
|
|
61
|
-
| EUR | CAD | reference | 1.
|
|
62
|
-
| EUR | CDF | reference |
|
|
63
|
-
| EUR | CHF | reference | 0.
|
|
64
|
-
| EUR | CLP | reference |
|
|
65
|
-
| EUR | CNY | reference | 7.
|
|
66
|
-
| EUR | COP | reference |
|
|
67
|
-
| EUR | CRC | reference | 505.
|
|
68
|
-
| EUR | CUP | reference | 26.
|
|
49
|
+
| EUR | BBD | reference | 2.2428 |
|
|
50
|
+
| EUR | BDT | reference | 139.5302 |
|
|
51
|
+
| EUR | BHD | reference | 0.422 |
|
|
52
|
+
| EUR | BIF | reference | 3380.55 |
|
|
53
|
+
| EUR | BMD | reference | 1.1214 |
|
|
54
|
+
| EUR | BND | reference | 1.4335 |
|
|
55
|
+
| EUR | BOB | reference | 13.1765 |
|
|
56
|
+
| EUR | BRL | reference | 6.2257 |
|
|
57
|
+
| EUR | BSD | reference | 1.1214 |
|
|
58
|
+
| EUR | BTN | reference | 105.3315 |
|
|
59
|
+
| EUR | BWP | reference | 15.662 |
|
|
60
|
+
| EUR | BZD | reference | 2.2428 |
|
|
61
|
+
| EUR | CAD | reference | 1.5852 |
|
|
62
|
+
| EUR | CDF | reference | 2533.0856 |
|
|
63
|
+
| EUR | CHF | reference | 0.9203 |
|
|
64
|
+
| EUR | CLP | reference | 1088.17 |
|
|
65
|
+
| EUR | CNY | reference | 7.4801 |
|
|
66
|
+
| EUR | COP | reference | 3670.15 |
|
|
67
|
+
| EUR | CRC | reference | 505.5159 |
|
|
68
|
+
| EUR | CUP | reference | 26.9136 |
|
|
69
69
|
| EUR | CVE | reference | 110.265 |
|
|
70
|
-
| EUR | CZK | reference | 24.
|
|
71
|
-
| EUR | DJF | reference |
|
|
72
|
-
| EUR | DKK | reference | 7.
|
|
73
|
-
| EUR | DOP | reference | 67.
|
|
74
|
-
| EUR | DZD | reference | 152.
|
|
75
|
-
| EUR | EGP | reference | 60.
|
|
76
|
-
| EUR | ERN | reference | 17.
|
|
77
|
-
| EUR | ETB | reference | 182.
|
|
78
|
-
| EUR | FJD | reference | 2.
|
|
79
|
-
| EUR | FKP | reference | 0.
|
|
80
|
-
| EUR | GBP | reference | 0.
|
|
81
|
-
| EUR | GEL | reference | 2.
|
|
82
|
-
| EUR | GHS | reference | 13.
|
|
83
|
-
| EUR | GIP | reference | 0.
|
|
84
|
-
| EUR | GMD | reference |
|
|
85
|
-
| EUR | GNF | reference |
|
|
86
|
-
| EUR | GTQ | reference | 8.
|
|
87
|
-
| EUR | GYD | reference |
|
|
88
|
-
| EUR | HKD | reference | 8.
|
|
89
|
-
| EUR | HNL | reference | 30.
|
|
90
|
-
| EUR | HTG | reference | 146.
|
|
91
|
-
| EUR | HUF | reference |
|
|
92
|
-
| EUR | IDR | reference |
|
|
93
|
-
| EUR | ILS | reference | 3.
|
|
94
|
-
| EUR | INR | reference |
|
|
95
|
-
| EUR | IQD | reference |
|
|
96
|
-
| EUR | ISK | reference |
|
|
97
|
-
| EUR | JMD | reference | 177.
|
|
98
|
-
| EUR | JOD | reference | 0.
|
|
70
|
+
| EUR | CZK | reference | 24.337 |
|
|
71
|
+
| EUR | DJF | reference | 199.296 |
|
|
72
|
+
| EUR | DKK | reference | 7.4754 |
|
|
73
|
+
| EUR | DOP | reference | 67.9691 |
|
|
74
|
+
| EUR | DZD | reference | 152.5843 |
|
|
75
|
+
| EUR | EGP | reference | 60.295 |
|
|
76
|
+
| EUR | ERN | reference | 17.2471 |
|
|
77
|
+
| EUR | ETB | reference | 182.0973 |
|
|
78
|
+
| EUR | FJD | reference | 2.54 |
|
|
79
|
+
| EUR | FKP | reference | 0.83545 |
|
|
80
|
+
| EUR | GBP | reference | 0.83545 |
|
|
81
|
+
| EUR | GEL | reference | 2.908 |
|
|
82
|
+
| EUR | GHS | reference | 13.0958 |
|
|
83
|
+
| EUR | GIP | reference | 0.83545 |
|
|
84
|
+
| EUR | GMD | reference | 81.21 |
|
|
85
|
+
| EUR | GNF | reference | 9896.9838 |
|
|
86
|
+
| EUR | GTQ | reference | 8.5702 |
|
|
87
|
+
| EUR | GYD | reference | 234.6193 |
|
|
88
|
+
| EUR | HKD | reference | 8.7973 |
|
|
89
|
+
| EUR | HNL | reference | 30.1895 |
|
|
90
|
+
| EUR | HTG | reference | 146.581 |
|
|
91
|
+
| EUR | HUF | reference | 362.98 |
|
|
92
|
+
| EUR | IDR | reference | 20255.34 |
|
|
93
|
+
| EUR | ILS | reference | 3.5507 |
|
|
94
|
+
| EUR | INR | reference | 105.3315 |
|
|
95
|
+
| EUR | IQD | reference | 1700.042 |
|
|
96
|
+
| EUR | ISK | reference | 137.2 |
|
|
97
|
+
| EUR | JMD | reference | 177.6482 |
|
|
98
|
+
| EUR | JOD | reference | 0.7951 |
|
|
99
99
|
|
|
100
100
|
</details>
|
|
101
101
|
|
|
@@ -129,8 +129,8 @@ console.log(pair.rate, pair.rate_date); // the official Banca d'Italia rate, on
|
|
|
129
129
|
|
|
130
130
|
## ๐ API reference
|
|
131
131
|
|
|
132
|
-
- [Latest pair rate](#latest-pair-rate) โ one pair from the latest
|
|
133
|
-
- [Full
|
|
132
|
+
- [Latest pair rate](#latest-pair-rate) โ one pair from the latest official table
|
|
133
|
+
- [Full official table](#full-official-table) โ everything the central bank printed, in one call
|
|
134
134
|
- [Table for a date](#table-for-a-date) โ the official table for an invoice or filing date
|
|
135
135
|
- [Daily time series](#daily-time-series) โ one pair across a date range
|
|
136
136
|
|
|
@@ -138,7 +138,7 @@ console.log(pair.rate, pair.rate_date); // the official Banca d'Italia rate, on
|
|
|
138
138
|
|
|
139
139
|
### Latest pair rate
|
|
140
140
|
|
|
141
|
-
Free plan and up. Pairs the central bank does not print directly are resolved from its table and flagged (see *
|
|
141
|
+
Free plan and up. Pairs the central bank does not print directly are resolved from its table and flagged (see *Official vs derived rates* below).
|
|
142
142
|
|
|
143
143
|
```js
|
|
144
144
|
const pair = await getRate('USD', 'EUR', { apiKey: 'art_live_...' });
|
|
@@ -150,10 +150,10 @@ const pair = await getRate('USD', 'EUR', { apiKey: 'art_live_...' });
|
|
|
150
150
|
{
|
|
151
151
|
bank: 'bdi',
|
|
152
152
|
name: 'Banca d\'Italia',
|
|
153
|
-
rate_date: '2026-10
|
|
153
|
+
rate_date: '2026-11-10', // Banca d'Italia's own publication date
|
|
154
154
|
source: 'USD',
|
|
155
155
|
target: 'EUR',
|
|
156
|
-
rate: 0.
|
|
156
|
+
rate: 0.891742,
|
|
157
157
|
rate_type: 'reference',
|
|
158
158
|
derived: true,
|
|
159
159
|
method: 'inverse', // computed from the published EUR/USD print
|
|
@@ -161,7 +161,7 @@ const pair = await getRate('USD', 'EUR', { apiKey: 'art_live_...' });
|
|
|
161
161
|
}
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
### Full
|
|
164
|
+
### Full official table
|
|
165
165
|
|
|
166
166
|
Free plan and up. The complete table for the latest publication date.
|
|
167
167
|
|
|
@@ -178,10 +178,10 @@ console.log(table.rate_date, table.rates.length);
|
|
|
178
178
|
{
|
|
179
179
|
bank: 'bdi',
|
|
180
180
|
name: 'Banca d\'Italia',
|
|
181
|
-
rate_date: '2026-10
|
|
181
|
+
rate_date: '2026-11-10',
|
|
182
182
|
rates: [
|
|
183
|
-
{ "base": "EUR", "quote": "USD", "type": "reference", "value": 1.
|
|
184
|
-
// โฆ the rest of the
|
|
183
|
+
{ "base": "EUR", "quote": "USD", "type": "reference", "value": 1.1214 },
|
|
184
|
+
// โฆ the rest of the official table (150 currencies vs EUR)
|
|
185
185
|
],
|
|
186
186
|
disclaimer: 'โฆ'
|
|
187
187
|
}
|
|
@@ -220,7 +220,7 @@ Paid plans. One resolved rate per publication date โ ready for charting, reval
|
|
|
220
220
|
import { getHistory } from 'bdi-exchange-rate';
|
|
221
221
|
|
|
222
222
|
const series = await getHistory(
|
|
223
|
-
{ source: 'USD', target: 'EUR', from: '2026-01-01', to: '2026-10
|
|
223
|
+
{ source: 'USD', target: 'EUR', from: '2026-01-01', to: '2026-11-10' },
|
|
224
224
|
{ apiKey: 'art_live_...' }
|
|
225
225
|
);
|
|
226
226
|
```
|
|
@@ -233,11 +233,11 @@ const series = await getHistory(
|
|
|
233
233
|
source: 'USD',
|
|
234
234
|
target: 'EUR',
|
|
235
235
|
from: '2026-01-01',
|
|
236
|
-
to: '2026-10
|
|
236
|
+
to: '2026-11-10',
|
|
237
237
|
count: 152,
|
|
238
238
|
rates: [
|
|
239
239
|
// one entry per publication date
|
|
240
|
-
{ date: '2026-10
|
|
240
|
+
{ date: '2026-11-10', rate: 0.891742, rate_type: 'reference', derived: true, method: 'inverse' },
|
|
241
241
|
// โฆ
|
|
242
242
|
],
|
|
243
243
|
disclaimer: 'โฆ'
|
|
@@ -291,7 +291,7 @@ curl "https://allratestoday.com/api/v1/central-bank/bdi/latest?format=xml&api_ke
|
|
|
291
291
|
- Evaluating? 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 that covers the free-plan methods (latest table, pairs); dated tables and history need a [paid plan](https://allratestoday.com/pricing/). The MCP servers expose it as `request_trial_key`
|
|
292
292
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) ยท [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
293
293
|
|
|
294
|
-
## โ๏ธ
|
|
294
|
+
## โ๏ธ Official vs derived rates
|
|
295
295
|
|
|
296
296
|
If Banca d'Italia does not print a pair directly, the API resolves it from the central bank's own table and says so โ official and computed values are never confused:
|
|
297
297
|
|
|
@@ -341,21 +341,21 @@ getRate('USD', 'EUR', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
|
|
|
341
341
|
|
|
342
342
|
## ๐ก Quota tips
|
|
343
343
|
|
|
344
|
-
- Rates change once per business day โ cache the
|
|
344
|
+
- Rates change once per business day โ cache the official table locally and a small monthly quota goes a long way.
|
|
345
345
|
- Every request counts toward your AllRatesToday quota, shared across all AllRatesToday endpoints on your key.
|
|
346
346
|
|
|
347
347
|
## ๐ Methods reference
|
|
348
348
|
|
|
349
349
|
| Method | Plan | Description |
|
|
350
350
|
| ------ | ---- | ----------- |
|
|
351
|
-
| `getRate(source, target, { apiKey })` | Free | Latest rate for one pair, resolved from the
|
|
352
|
-
| `getLatestRates({ apiKey })` | Free | The central bank's full latest
|
|
351
|
+
| `getRate(source, target, { apiKey })` | Free | Latest rate for one pair, resolved from the official table |
|
|
352
|
+
| `getLatestRates({ apiKey })` | Free | The central bank's full latest official table |
|
|
353
353
|
| `getRatesForDate(date, { apiKey, source?, target? })` | Paid | The official table (or one pair) for a YYYY-MM-DD date |
|
|
354
354
|
| `getHistory({ symbol \| source+target, from?, to? }, { apiKey })` | Paid | Daily series since 2016 |
|
|
355
355
|
|
|
356
356
|
## ๐ฅ Bulk data (no key)
|
|
357
357
|
|
|
358
|
-
Need the whole archive rather than an API call? The same
|
|
358
|
+
Need the whole archive rather than an API call? The same official tables are mirrored daily as open data:
|
|
359
359
|
|
|
360
360
|
- Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) โ one CSV per institution (`rates/bdi.csv`)
|
|
361
361
|
- Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
|
|
@@ -365,7 +365,7 @@ Need the whole archive rather than an API call? The same published tables are mi
|
|
|
365
365
|
|
|
366
366
|
- **Website:** [allratestoday.com](https://allratestoday.com)
|
|
367
367
|
- [Banca d'Italia rates page](https://allratestoday.com/central-bank-rates-api/bdi/) โ live table, publication cadence, FAQ
|
|
368
|
-
- [All central bank sources](https://allratestoday.com/central-bank-rates-api/)
|
|
368
|
+
- [All central bank sources](https://allratestoday.com/central-bank-rates-api/) ยท [Full list of 130+ central banks and tax authorities](https://allratestoday.com/central-bank-rates-api/institutions/) โ one API, the same response shape for every source
|
|
369
369
|
- [Download central bank rates](https://allratestoday.com/download-central-bank-rates/) โ every bank's latest table and history as Excel, CSV or JSON
|
|
370
370
|
- [Package docs on the site](https://allratestoday.com/docs/sdk/bdi-exchange-rate/) ยท [ERP integration guides](https://allratestoday.com/docs/integrations/)
|
|
371
371
|
- [API documentation](https://allratestoday.com/docs/#central-bank) ยท [Interactive reference](https://allratestoday.com/api-reference/) ยท [Methodology](https://allratestoday.com/official-rates-methodology/)
|
package/package.json
CHANGED