{"_id":"@allratestoday/bdi-exchange-rate","_rev":"7-a6a89576f5d308bb3d2d89a3fbe14998","name":"@allratestoday/bdi-exchange-rate","dist-tags":{"latest":"1.3.4"},"versions":{"1.2.2":{"name":"@allratestoday/bdi-exchange-rate","version":"1.2.2","keywords":["bdi","banca","d'italia","exchange-rate","exchange-rates","currency","forex","fx","eur","central-bank","official-rates","italy","api","typescript"],"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","_id":"@allratestoday/bdi-exchange-rate@1.2.2","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"homepage":"https://allratestoday.com/central-bank-rates-api/bdi/","bugs":{"url":"https://github.com/AllRates-Today/bdi-exchange-rate/issues"},"dist":{"shasum":"fbcc24b2f0d185e753e8049783c2f5babe3ef1bd","tarball":"https://registry.npmjs.org/@allratestoday/bdi-exchange-rate/-/bdi-exchange-rate-1.2.2.tgz","fileCount":6,"integrity":"sha512-b3gfROLMyIsZren3Y5tyOgKWKTPXEumNR2V2EhF/kxvQqABoBR7JUIFSlp8SmeT0tB2ZnrxbzaRlX4YfX+IZRQ==","signatures":[{"sig":"MEUCIDHgEUF9xF0l0321nomdi8O5/UZis1RWVwk29VKYAFPnAiEAw6ev64gvpxAgLr8WVM67EwowtYLcX6w6Dy3Buz+aWfg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18054},"main":"./index.cjs","type":"module","types":"./index.d.ts","module":"./index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"}},"gitHead":"7628917ee928d804bc89fa36eaf56610f9e1de5f","_npmUser":{"name":"chathurangac8","email":"basnayakac8@gmail.com"},"repository":{"url":"git+https://github.com/AllRates-Today/bdi-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Banca d'Italia (Italy) daily exchange rates — 150 currencies vs EUR, history since 2016. Zero-dependency Node.js/TypeScript client.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bdi-exchange-rate_1.2.2_1786524329095_0.6882602705381813","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"name":"@allratestoday/bdi-exchange-rate","version":"1.2.3","keywords":["bdi","banca","d'italia","exchange-rate","exchange-rates","currency","forex","fx","eur","central-bank","official-rates","italy","api","typescript"],"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","_id":"@allratestoday/bdi-exchange-rate@1.2.3","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"homepage":"https://allratestoday.com/central-bank-rates-api/bdi/","bugs":{"url":"https://github.com/AllRates-Today/bdi-exchange-rate/issues"},"dist":{"shasum":"59f6b335cab6d8dcc7d245ba517510c80e8b531a","tarball":"https://registry.npmjs.org/@allratestoday/bdi-exchange-rate/-/bdi-exchange-rate-1.2.3.tgz","fileCount":6,"integrity":"sha512-ppDTY9+u6tQdrG202eqLtp2vU1GcF4eKbmLQ9hF2EIJRQ80Q90CaFaMs8lkPUowIVJXVzhEJQ4rauovHtHCHAw==","signatures":[{"sig":"MEQCIEAs19POMYkUmE6Y1YLrhmkJ1kFEGqZJHHCh12RvIY+KAiANA8lcPpK3taQ84zd6RJJicBf6YshV6M/p9haIWI7qng==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19366},"main":"./index.cjs","type":"module","types":"./index.d.ts","module":"./index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"}},"gitHead":"86f5e662605241f5a3f10be7654381a0192651db","_npmUser":{"name":"chathurangac8","email":"basnayakac8@gmail.com"},"repository":{"url":"git+https://github.com/AllRates-Today/bdi-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Banca d'Italia (Italy) daily exchange rates — 150 currencies vs EUR, history since 2016. Zero-dependency Node.js/TypeScript client.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bdi-exchange-rate_1.2.3_1786608490606_0.04934480040183176","host":"s3://npm-registry-packages-npm-production"}},"1.2.7":{"name":"@allratestoday/bdi-exchange-rate","version":"1.2.7","keywords":["bdi","banca","d'italia","exchange-rate","exchange-rates","currency","forex","fx","eur","central-bank","official-rates","italy","api","typescript"],"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","_id":"@allratestoday/bdi-exchange-rate@1.2.7","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"homepage":"https://allratestoday.com/central-bank-rates-api/bdi/","bugs":{"url":"https://github.com/AllRates-Today/bdi-exchange-rate/issues"},"dist":{"shasum":"b0458e8f171db8940b42f05da0f404ef2b58afef","tarball":"https://registry.npmjs.org/@allratestoday/bdi-exchange-rate/-/bdi-exchange-rate-1.2.7.tgz","fileCount":6,"integrity":"sha512-Z1PEbKaben77mQEAvQkEtu1wowxaupj5Gq5Zj/aPc4u340oclM2vrzzIIwEPq7sHXWcD+P/REESjb0MsVLfl5Q==","signatures":[{"sig":"MEYCIQCPAzsv//l6hdZD+ZUZ9yN+n7r6cTtjtPjXXIWnm5m7/AIhAKO3PRU/YeKr5Geb6F+L/7k40lZUTAD8AwTJLB2HVxon","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19367},"main":"./index.cjs","type":"module","types":"./index.d.ts","module":"./index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"}},"gitHead":"0bdc92d850f026c2ce3ab23033ab006807b0ecfc","_npmUser":{"name":"chathurangac8","email":"basnayakac8@gmail.com"},"repository":{"url":"git+https://github.com/AllRates-Today/bdi-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Banca d'Italia (Italy) daily exchange rates — 150 currencies vs EUR, history since 2016. Zero-dependency Node.js/TypeScript client.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bdi-exchange-rate_1.2.7_1787566895646_0.6588259277133566","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@allratestoday/bdi-exchange-rate","version":"1.3.0","keywords":["bdi","banca","d'italia","exchange-rate","exchange-rates","currency","forex","fx","eur","central-bank","official-rates","italy","api","typescript"],"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","_id":"@allratestoday/bdi-exchange-rate@1.3.0","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"homepage":"https://allratestoday.com/central-bank-rates-api/bdi/","bugs":{"url":"https://github.com/AllRates-Today/bdi-exchange-rate/issues"},"dist":{"shasum":"f6e205693c0376888702105b73881d15b30646ef","tarball":"https://registry.npmjs.org/@allratestoday/bdi-exchange-rate/-/bdi-exchange-rate-1.3.0.tgz","fileCount":6,"integrity":"sha512-xGU5Wdkgogut/SIU7aCgC+Fijnl6w1DJDeeYCfCuiJ4zCyHPZwWl71yni3yK5FDUW8pvRarTZ7CwwjEM6eL1Zg==","signatures":[{"sig":"MEUCIBzGTbL3AYnNjOfAmqhJiHqEvQps5oLUZJdpKWtD4uCUAiEAi6SkFl0M1A9kw4aO3qxEQNicmXqlZNAUB9aQx+5pBJE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19915},"main":"./index.cjs","type":"module","types":"./index.d.ts","module":"./index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"}},"gitHead":"ec4d6bcf08cf485c7ab237f12d27e3d5a0f97e14","_npmUser":{"name":"chathurangac8","email":"basnayakac8@gmail.com"},"repository":{"url":"git+https://github.com/AllRates-Today/bdi-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Banca d'Italia (Italy) daily exchange rates — 150 currencies vs EUR, history since 2016. Zero-dependency Node.js/TypeScript client.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bdi-exchange-rate_1.3.0_1788976885127_0.7481003303757654","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@allratestoday/bdi-exchange-rate","version":"1.3.1","keywords":["bdi","banca","d'italia","exchange-rate","exchange-rates","currency","forex","fx","eur","central-bank","official-rates","italy","api","typescript"],"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","_id":"@allratestoday/bdi-exchange-rate@1.3.1","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"homepage":"https://allratestoday.com/central-bank-rates-api/bdi/","bugs":{"url":"https://github.com/AllRates-Today/bdi-exchange-rate/issues"},"dist":{"shasum":"a1a772664204c540ec8a5c7f108e2af28bb51611","tarball":"https://registry.npmjs.org/@allratestoday/bdi-exchange-rate/-/bdi-exchange-rate-1.3.1.tgz","fileCount":6,"integrity":"sha512-cOkOW4ApTUXISrQQPpxE7ux1iJSqtJCNDFm9lzOHeIX+RgFuvkAvTQtF0djRxolMPjbr0J5w7aCJr8vdAEf1Lg==","signatures":[{"sig":"MEUCIQCLFoqrBgZGrVtXJtjO5qVKQHYHWJuFnfi/wdbuMY66dQIgeF6h+PwpnoC/GaMxUn+uX4kcKXh4/hf+dlP4nxs5OoM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCmFUBLtMwI4Waa/oOZpsymCeQqyQtB5ghIUPKJ6K3QDQIhAPKvO76UCsiJCzZNOzmme0bDjpwY7s4C9xJEz5CKjrw1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23762},"main":"./index.cjs","type":"module","types":"./index.d.ts","module":"./index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"}},"gitHead":"fc26fa33ba7dd14ed15e95764a0cdb2b1355358f","_npmUser":{"name":"chathurangac8","email":"basnayakac8@gmail.com"},"repository":{"url":"git+https://github.com/AllRates-Today/bdi-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Banca d'Italia (Italy) daily exchange rates — 150 currencies vs EUR, history since 2016. Zero-dependency Node.js/TypeScript client.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bdi-exchange-rate_1.3.1_1789650059785_0.5190264968600014","host":"s3://npm-registry-packages-npm-production"}},"1.3.3":{"name":"@allratestoday/bdi-exchange-rate","version":"1.3.3","keywords":["bdi","banca","d'italia","exchange-rate","exchange-rates","currency","forex","fx","eur","central-bank","official-rates","italy","api","typescript"],"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","_id":"@allratestoday/bdi-exchange-rate@1.3.3","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"homepage":"https://allratestoday.com/central-bank-rates-api/bdi/","bugs":{"url":"https://github.com/AllRates-Today/bdi-exchange-rate/issues"},"dist":{"shasum":"866dd98ebc910ff9e79fb848eaea3bcd8317918a","tarball":"https://registry.npmjs.org/@allratestoday/bdi-exchange-rate/-/bdi-exchange-rate-1.3.3.tgz","fileCount":6,"integrity":"sha512-+GImdktb41Tx98X+0rpCcJ2dkQGnOqDo1TlfDApbpTu73uaVdh6VuH3BC/NPxl/2WkX/eTVzzBcWAcy3/wCNHA==","signatures":[{"sig":"MEYCIQClMVkJKLipEAGCP2S+zLh+ClT6XX42WBYKIW+SzbTOeAIhANHJ7YBHyadbkiwW3Kc/7rgLcd0QF8XCPM4AtiQVt2kU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCGd5kzVJBz6YNiw0UHpXBnP3mt5r06bTKHag7exPIwEgIhAN1zhtcnpOcn9PT9gxwbQ67svs0A9MpN0FRgifrXKy22","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23759},"main":"./index.cjs","type":"module","types":"./index.d.ts","module":"./index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"}},"gitHead":"ca0b6b268a0b3c562dedb06b2ec12ac8815a6a05","_npmUser":{"name":"chathurangac8","email":"basnayakac8@gmail.com"},"repository":{"url":"git+https://github.com/AllRates-Today/bdi-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Banca d'Italia (Italy) daily exchange rates — 150 currencies vs EUR, history since 2016. Zero-dependency Node.js/TypeScript client.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bdi-exchange-rate_1.3.3_1790770286263_0.5392265316347551","host":"s3://npm-registry-packages-npm-production"}},"1.3.4":{"_id":"@allratestoday/bdi-exchange-rate@1.3.4","bugs":{"url":"https://github.com/AllRates-Today/bdi-exchange-rate/issues"},"dist":{"shasum":"b6ce2593f5f4ee3518160ad7148b13fa697d17e5","tarball":"https://registry.npmjs.org/@allratestoday/bdi-exchange-rate/-/bdi-exchange-rate-1.3.4.tgz","fileCount":6,"integrity":"sha512-CmZ4/Mi/5xaJMe9gCYk3g49nb40G4tBKIINxhGNBWOFJ7WcOcOvUIM6uHTRh2FnBsiYlsqqW7uGzMYmyUhnirw==","signatures":[{"sig":"MEQCID8ULjk0inusWPu6pu136D40rtdQuqOPRN0A71RA/+0yAiAmI1qVsF5vQywQTMUsk2uB5PhlmTAsHSKaD0Lw5mOEPw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCXOGyH4EEF2EXrSBeMpPaKrZLgK1Bs0FH69QR0u4fNqwIgHQBSdJDeBVKY9xYMXXRcH5Dv7Hpur9OaraYOc9V1GO0="}],"unpackedSize":24158},"main":"./index.cjs","name":"@allratestoday/bdi-exchange-rate","type":"module","types":"./index.d.ts","author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"module":"./index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"}},"gitHead":"79b405ca4251d0e8c85b00c9f6c63206e5e3dab3","license":"MIT","version":"1.3.4","_npmUser":{"name":"chathurangac8","email":"basnayakac8@gmail.com"},"homepage":"https://allratestoday.com/central-bank-rates-api/bdi/","keywords":["bdi","banca","d'italia","exchange-rate","exchange-rates","currency","forex","fx","eur","central-bank","official-rates","italy","api","typescript"],"repository":{"url":"git+https://github.com/AllRates-Today/bdi-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Banca d'Italia (Italy) daily exchange rates — 150 currencies vs EUR, history since 2016. Zero-dependency Node.js/TypeScript client.","directories":{},"maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"sideEffects":false,"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bdi-exchange-rate_1.3.4_1790851153335_0.7749597958717058"}}},"time":{"created":"2026-08-12T08:45:28.859Z","modified":"2026-10-01T10:39:13.821Z","1.2.2":"2026-08-12T08:45:29.246Z","1.2.3":"2026-08-13T08:08:10.773Z","1.2.7":"2026-08-24T10:21:35.851Z","1.3.0":"2026-09-09T18:01:25.276Z","1.3.1":"2026-09-17T13:00:59.862Z","1.3.3":"2026-09-30T12:11:26.356Z","1.3.4":"2026-10-01T10:39:13.418Z"},"bugs":{"url":"https://github.com/AllRates-Today/bdi-exchange-rate/issues"},"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","homepage":"https://allratestoday.com/central-bank-rates-api/bdi/","keywords":["bdi","banca","d'italia","exchange-rate","exchange-rates","currency","forex","fx","eur","central-bank","official-rates","italy","api","typescript"],"repository":{"url":"git+https://github.com/AllRates-Today/bdi-exchange-rate.git","type":"git"},"description":"Official Banca d'Italia (Italy) daily exchange rates — 150 currencies vs EUR, history since 2016. Zero-dependency Node.js/TypeScript client.","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"readme":"# Banca d'Italia Exchange Rates API — bdi-exchange-rate\n\n[![npm version](https://img.shields.io/npm/v/@allratestoday%2Fbdi-exchange-rate.svg)](https://www.npmjs.com/package/@allratestoday/bdi-exchange-rate)\n[![license](https://img.shields.io/npm/l/@allratestoday%2Fbdi-exchange-rate.svg)](https://github.com/AllRates-Today/bdi-exchange-rate/blob/main/LICENSE)\n[![zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](https://www.npmjs.com/package/@allratestoday/bdi-exchange-rate)\n[![TypeScript](https://img.shields.io/badge/TypeScript-types%20included-3178C6.svg)](https://www.typescriptlang.org/)\n\n**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.**\n\n## 🚀 Why this client?\n\n- 🏛️ **Official published rates** — Banca d'Italia's own table, with the publisher's own `rate_date` on every response\n- 📅 **History back to 2016** — point-in-time tables and daily series for any past date\n- 🔀 **Published vs derived, always flagged** — computed inverse/cross pairs carry `derived: true`, never mixed with official prints\n- ⚡ **Zero dependencies** — pure ESM + CJS over global `fetch`; Node 18+, Bun, Deno, and edge runtimes\n- 🔷 **Type-safe** — full TypeScript definitions shipped with the package\n- 🧾 **Compliance-grade metadata** — `rate_type`, publication date, and source disclaimer on every response\n\n> **Official rate, not mid-market:** every value here is a number Banca d'Italia itself published, fixed once printed and carrying the central bank's own `rate_date` — what filings and audits require. Need the live mid-market rate for pricing or display instead? Use the [mid-market API](https://allratestoday.com/docs/) or [`@allratestoday/sdk`](https://www.npmjs.com/package/@allratestoday/sdk). The two can diverge by several percent.\n\n## ⚡ Try it without a key\n\nThe latest Banca d'Italia table is also served keyless, CORS-open and edge-cached, for evaluation, embeds and AI agents:\n\n```bash\ncurl \"https://allratestoday.com/api/open/central-bank/bdi?source=USD&target=EUR\"\n```\n\n```js\nconst r = await fetch('https://allratestoday.com/api/open/central-bank/bdi').then((x) => x.json());\nconsole.log(r.rate_date, r.rates.length); // the central bank's latest published table, no key\n```\n\nThe 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.\n\n## 🔑 Get your API key\n\nGet a free API key at [allratestoday.com/register](https://allratestoday.com/register) — no credit card required. Latest rates are on every plan, including free.\n\n## 📦 Installation\n\n```bash\nnpm install @allratestoday/bdi-exchange-rate\n```\n\n```bash\nyarn add @allratestoday/bdi-exchange-rate\n```\n\n```bash\npnpm add @allratestoday/bdi-exchange-rate\n```\n\nRequires Node 18+ (global `fetch`); also runs on Bun, Deno and edge runtimes. Scoped mirror of [`bdi-exchange-rate`](https://www.npmjs.com/package/bdi-exchange-rate) — same code, same versions.\n\n## 🏁 Quick start\n\n```js\nimport { getRate } from '@allratestoday/bdi-exchange-rate';\n\nconst pair = await getRate('USD', 'EUR', { apiKey: 'art_live_...' });\nconsole.log(pair.rate, pair.rate_date); // the official Banca d'Italia rate, on the central bank's own date\n```\n\n## 📚 API reference\n\n- [Latest pair rate](#latest-pair-rate) — one pair from the latest published table\n- [Full published table](#full-published-table) — everything the central bank printed, in one call\n- [Table for a date](#table-for-a-date) — the official table for an invoice or filing date\n- [Daily time series](#daily-time-series) — one pair across a date range\n\n---\n\n### Latest pair rate\n\nFree plan and up. Pairs the central bank does not print directly are resolved from its table and flagged (see *Published vs derived rates* below).\n\n```js\nconst pair = await getRate('USD', 'EUR', { apiKey: 'art_live_...' });\n```\n\n**Response:**\n\n```javascript\n{\n  bank: 'bdi',\n  name: 'Banca d\\'Italia',\n  rate_date: '2026-09-25',   // Banca d'Italia's own publication date\n  source: 'USD',\n  target: 'EUR',\n  rate: 0.876962,\n  rate_type: 'reference',\n  derived: true,\n  method: 'inverse',  // computed from the published EUR/USD print\n  disclaimer: 'Official rates as published by the named central bank. On weekends/holidays the most recent published rate_date is returned.'\n}\n```\n\n### Full published table\n\nFree plan and up. The complete table for the latest publication date.\n\n```js\nimport { getLatestRates } from '@allratestoday/bdi-exchange-rate';\n\nconst table = await getLatestRates({ apiKey: 'art_live_...' });\nconsole.log(table.rate_date, table.rates.length);\n```\n\n**Response:**\n\n```javascript\n{\n  bank: 'bdi',\n  name: 'Banca d\\'Italia',\n  rate_date: '2026-09-25',\n  rates: [\n    { \"base\": \"EUR\", \"quote\": \"USD\", \"type\": \"reference\", \"value\": 1.1403 },\n    // … the rest of the published table (150 currencies vs EUR)\n  ],\n  disclaimer: '…'\n}\n```\n\n### Table for a date\n\nPaid plans. The official table for any date since 2016 — weekends and holidays return the most recent published date, flagged via `published_on_requested_date`, which is exactly the in-force rate a filing needs.\n\n```js\nimport { getRatesForDate } from '@allratestoday/bdi-exchange-rate';\n\nconst day = await getRatesForDate('2026-06-30', { apiKey: 'art_live_...' });\n// Optionally narrow to one pair:\nconst one = await getRatesForDate('2026-06-30', { apiKey: 'art_live_...', source: 'USD', target: 'EUR' });\n```\n\n**Response:**\n\n```javascript\n{\n  bank: 'bdi',\n  requested_date: '2026-06-30',\n  rate_date: '2026-06-30',                // the date actually published\n  published_on_requested_date: true,      // false when a weekend/holiday fell back\n  rates: [ /* the full table for that date */ ],\n  disclaimer: '…'\n}\n```\n\n### Daily time series\n\nPaid plans. One resolved rate per publication date — ready for charting, revaluation runs, or audit workpapers.\n\n```js\nimport { getHistory } from '@allratestoday/bdi-exchange-rate';\n\nconst series = await getHistory(\n  { source: 'USD', target: 'EUR', from: '2026-01-01', to: '2026-09-25' },\n  { apiKey: 'art_live_...' }\n);\n```\n\n**Response:**\n\n```javascript\n{\n  bank: 'bdi',\n  source: 'USD',\n  target: 'EUR',\n  from: '2026-01-01',\n  to: '2026-09-25',\n  count: 152,\n  rates: [\n    // one entry per publication date\n    { date: '2026-09-25', rate: 0.876962, rate_type: 'reference', derived: true, method: 'inverse' },\n    // …\n  ],\n  disclaimer: '…'\n}\n```\n\nPass `{ symbol: 'USD' }` instead of `source`/`target` to get the raw published rows for one currency (all rate types, no pair resolution).\n\n---\n\n## 🗺️ Currencies covered\n\nBanca d'Italia currently publishes rates covering **150 currencies** against the EUR (as of the latest table):\n\n🇦🇪 `AED` · 🇦🇫 `AFN` · 🇦🇱 `ALL` · 🇦🇲 `AMD` · 🇦🇴 `AOA` · 🇦🇷 `ARS` · 🇦🇺 `AUD` · 🇦🇼 `AWG` · 🇦🇿 `AZN` · 🇧🇦 `BAM` · 🇧🇧 `BBD` · 🇧🇩 `BDT` · 🇧🇭 `BHD` · 🇧🇮 `BIF` · 🇧🇲 `BMD` · 🇧🇳 `BND` · 🇧🇴 `BOB` · 🇧🇷 `BRL` · 🇧🇸 `BSD` · 🇧🇹 `BTN` · 🇧🇼 `BWP` · 🇧🇿 `BZD` · 🇨🇦 `CAD` · 🇨🇩 `CDF` · 🇨🇭 `CHF` · 🇨🇱 `CLP` · 🇨🇳 `CNY` · 🇨🇴 `COP` · 🇨🇷 `CRC` · 🇨🇺 `CUP` · 🇨🇻 `CVE` · 🇨🇿 `CZK` · 🇩🇯 `DJF` · 🇩🇰 `DKK` · 🇩🇴 `DOP` · 🇩🇿 `DZD` · 🇪🇬 `EGP` · 🇪🇷 `ERN` · 🇪🇹 `ETB` · 🇫🇯 `FJD` · 🇫🇰 `FKP` · 🇬🇧 `GBP` · 🇬🇪 `GEL` · 🇬🇭 `GHS` · 🇬🇮 `GIP` · 🇬🇲 `GMD` · 🇬🇳 `GNF` · 🇬🇹 `GTQ` · 🇬🇾 `GYD` · 🇭🇰 `HKD` · 🇭🇳 `HNL` · 🇭🇹 `HTG` · 🇭🇺 `HUF` · 🇮🇩 `IDR` · 🇮🇱 `ILS` · 🇮🇳 `INR` · 🇮🇶 `IQD` · 🇮🇸 `ISK` · 🇯🇲 `JMD` · 🇯🇴 `JOD` · 🇯🇵 `JPY` · 🇰🇪 `KES` · 🇰🇬 `KGS` · 🇰🇭 `KHR` · 🇰🇲 `KMF` · 🇰🇷 `KRW` · 🇰🇼 `KWD` · 🇰🇾 `KYD` · 🇰🇿 `KZT` · 🇱🇦 `LAK` · 🇱🇧 `LBP` · 🇱🇰 `LKR` · 🇱🇷 `LRD` · 🇱🇸 `LSL` · 🇱🇾 `LYD` · 🇲🇦 `MAD` · 🇲🇩 `MDL` · 🇲🇬 `MGA` · 🇲🇰 `MKD` · 🇲🇲 `MMK` · 🇲🇳 `MNT` · 🇲🇴 `MOP` · 🇲🇷 `MRU` · 🇲🇺 `MUR` · 🇲🇻 `MVR` · 🇲🇼 `MWK` · 🇲🇽 `MXN` · 🇲🇾 `MYR` · 🇲🇿 `MZN` · 🇳🇦 `NAD` · 🇳🇬 `NGN` · 🇳🇮 `NIO` · 🇳🇴 `NOK` · 🇳🇵 `NPR` · 🇳🇿 `NZD` · 🇴🇲 `OMR` · 🇵🇦 `PAB` · 🇵🇪 `PEN` · 🇵🇬 `PGK` · 🇵🇭 `PHP` · 🇵🇰 `PKR` · 🇵🇱 `PLN` · 🇵🇾 `PYG` · 🇶🇦 `QAR` · 🇷🇴 `RON` · 🇷🇸 `RSD` · 🇷🇼 `RWF` · 🇸🇦 `SAR` · 🇸🇧 `SBD` · 🇸🇨 `SCR` · 🇸🇩 `SDG` · 🇸🇪 `SEK` · 🇸🇬 `SGD` · 🇸🇭 `SHP` · 🇸🇱 `SLE` · 🇸🇴 `SOS` · 🇸🇷 `SRD` · 🇸🇸 `SSP` · 🇸🇹 `STN` · 🇸🇻 `SVC` · 🇸🇾 `SYP` · 🇸🇿 `SZL` · 🇹🇭 `THB` · 🇹🇯 `TJS` · 🇹🇲 `TMT` · 🇹🇳 `TND` · 🇹🇴 `TOP` · 🇹🇷 `TRY` · 🇹🇹 `TTD` · 🇹🇼 `TWD` · 🇹🇿 `TZS` · 🇺🇦 `UAH` · 🇺🇬 `UGX` · 🇺🇸 `USD` · 🇺🇾 `UYU` · 🇺🇿 `UZS` · 🇻🇪 `VES` · 🇻🇳 `VND` · 🇻🇺 `VUV` · 🇼🇸 `WST` · `XAF` · `XCD` · `XCG` · `XDR` · `XOF` · `XPF` · 🇾🇪 `YER` · 🇿🇦 `ZAR` · 🇿🇲 `ZMW` · 🇿🇼 `ZWG`\n\n## 🏛️ Source\n\nBanca d'Italia is Italy's central bank and part of the Eurosystem. Its exchange-rate portal publishes daily reference rates for around 170 currencies against the euro, compiled through the daily concertation procedure with the other ESCB central banks — the series Italian tax and accounting practice refers to.\n\n- Publisher's own page: [Exchange rates portal (Cambi)](https://tassidicambio.bancaditalia.it/terzevalute-wf-ui-web/converter) · [www.bancaditalia.it](https://www.bancaditalia.it)\n- Publication: every business day; the exact schedule, freshness status and any current delay are on the [Banca d'Italia rates page](https://allratestoday.com/central-bank-rates-api/bdi/)\n- Values are stored unmodified, with the publisher's own `rate_date` on every row — see the [methodology](https://allratestoday.com/official-rates-methodology/)\n\n## 🧭 Reading the numbers\n\n- `value` is always **quote currency per 1 unit of base currency** (`base: \"EUR\", quote: \"USD\", value: 1.15` means 1 EUR = 1.15 USD).\n- Banca d'Italia quotes **foreign currency per 1 EUR** (e.g. `base: \"EUR\", quote: \"USD\"` means USD per one EUR).\n- Need the other way round? Ask `getRate(target, source)` and the API inverts or crosses for you, flagged `derived: true` — never divide a published rate yourself in a compliance workflow.\n- `rate_type` tells you which of the central bank's series a row belongs to (`reference` here); some publishers print buy/sell or several fixings for the same pair.\n\n## 🧩 ERP & accounting systems\n\nLoading the official Banca d'Italia rate into an accounting system is a supported workflow, not a hack. Step-by-step guides with the direction each system expects:\n\n- [Dynamics 365 Business Central](https://allratestoday.com/docs/integrations/business-central/) — built-in Currency Exchange Rate Service, no code\n- [Xero](https://allratestoday.com/docs/integrations/xero/) · [QuickBooks Online](https://allratestoday.com/docs/integrations/quickbooks/) · [SAP S/4HANA and ECC](https://allratestoday.com/docs/integrations/sap/) · [Odoo](https://allratestoday.com/docs/integrations/odoo/)\n\nThe same keyed endpoints return `?format=csv`, `?format=xml` and `?format=xlsx`, and accept the key as `?api_key=` on the URL for importers that cannot send headers:\n\n```bash\ncurl \"https://allratestoday.com/api/v1/central-bank/bdi/latest?format=xml&api_key=art_live_...\"\n```\n\n## 🤖 AI agents\n\n- 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\n- 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('bdi')` 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\n- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) · [for-ai-agents](https://allratestoday.com/for-ai-agents/)\n\n## ⚖️ Published vs derived rates\n\nIf 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:\n\n| `method` | `derived` | Meaning |\n| --- | --- | --- |\n| `published` | `false` | The central bank printed this pair directly |\n| `inverse` | `true` | Computed as 1 ÷ the published opposite direction |\n| `cross` | `true` | Computed via EUR from two published rates |\n\n## 🛡️ Error handling\n\nErrors are thrown as `Error` with `status` (HTTP code) and `body` (the API's JSON error) attached:\n\n```js\ntry {\n  const pair = await getRate('USD', 'XXX', { apiKey: 'art_live_...' });\n} catch (err) {\n  console.log(err.message); // human-readable reason\n  console.log(err.status);  // e.g. 404\n}\n```\n\n| Status | Meaning |\n| ------ | ------- |\n| — | Missing `apiKey` (thrown before any request) |\n| `400` | Malformed date or parameters |\n| `401` | Invalid API key |\n| `403` | Endpoint needs a [paid plan](https://allratestoday.com/pricing/) (historical dates & series) |\n| `404` | Pair or date range not covered by Banca d'Italia |\n| `429` | Monthly quota exceeded |\n\n## 🔷 TypeScript\n\nFull definitions ship with the package — no `@types` install:\n\n```ts\nimport type { LatestRates, PairRate, DatedRates, RateEntry, HistoryQuery, RequestOptions } from '@allratestoday/bdi-exchange-rate';\n```\n\n## 📦 CommonJS\n\n```javascript\nconst { getRate } = require('@allratestoday/bdi-exchange-rate');\n\ngetRate('USD', 'EUR', { apiKey: 'art_live_...' }).then((pair) => console.log(pair.rate));\n```\n\n## 💡 Quota tips\n\n- Rates change once per business day — cache the published table locally and a small monthly quota goes a long way.\n- Every request counts toward your AllRatesToday quota, shared across all AllRatesToday endpoints on your key.\n\n## 📖 Methods reference\n\n| Method | Plan | Description |\n| ------ | ---- | ----------- |\n| `getRate(source, target, { apiKey })` | Free | Latest rate for one pair, resolved from the published table |\n| `getLatestRates({ apiKey })` | Free | The central bank's full latest published table |\n| `getRatesForDate(date, { apiKey, source?, target? })` | Paid | The official table (or one pair) for a YYYY-MM-DD date |\n| `getHistory({ symbol \\| source+target, from?, to? }, { apiKey })` | Paid | Daily series since 2016 |\n\n## 📥 Bulk data (no key)\n\nNeed the whole archive rather than an API call? The same published tables are mirrored daily as open data:\n\n- Hugging Face: [AllRates/central-bank-exchange-rates](https://huggingface.co/datasets/AllRates/central-bank-exchange-rates) — one CSV per institution (`rates/bdi.csv`)\n- Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)\n- CDN JSON: `https://cdn.jsdelivr.net/gh/AllRates-Today/central-bank-exchange-rates@main/data/bdi/latest.json`\n\n## 🔗 Links\n\n- [Banca d'Italia rates page](https://allratestoday.com/central-bank-rates-api/bdi/) — live table, publication cadence, FAQ\n- [All central bank sources](https://allratestoday.com/central-bank-rates-api/)\n- [Package docs on the site](https://allratestoday.com/docs/sdk/bdi-exchange-rate/) · [ERP integration guides](https://allratestoday.com/docs/integrations/)\n- [API documentation](https://allratestoday.com/docs/#central-bank) · [Interactive reference](https://allratestoday.com/api-reference/) · [Methodology](https://allratestoday.com/official-rates-methodology/)\n- [Register (free)](https://allratestoday.com/register) · [Pricing](https://allratestoday.com/pricing/)\n- [GitHub](https://github.com/AllRates-Today/bdi-exchange-rate)\n\n## 📜 License\n\nMIT\n","readmeFilename":"README.md"}