{"_id":"@allratestoday/rma-bhutan-exchange-rate","_rev":"6-1c3e0b6f99cdcc737d3ce87bdb63666d","name":"@allratestoday/rma-bhutan-exchange-rate","dist-tags":{"latest":"1.3.5"},"versions":{"1.2.7":{"name":"@allratestoday/rma-bhutan-exchange-rate","version":"1.2.7","keywords":["rma","royal","monetary","authority","of","bhutan","exchange-rate","exchange-rates","currency","forex","fx","btn","central-bank","official-rates","bhutan","api","typescript"],"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","_id":"@allratestoday/rma-bhutan-exchange-rate@1.2.7","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"homepage":"https://allratestoday.com/central-bank-rates-api/rma/","bugs":{"url":"https://github.com/AllRates-Today/rma-bhutan-exchange-rate/issues"},"dist":{"shasum":"d28d8040a12417a705bce484d52dd863a84e70d4","tarball":"https://registry.npmjs.org/@allratestoday/rma-bhutan-exchange-rate/-/rma-bhutan-exchange-rate-1.2.7.tgz","fileCount":6,"integrity":"sha512-BEIiXLbusXdDsgMAqTpd9jtfvQd41DeaG7luKXi8Xi35oeQVB34J7s8q6hmmnKP3H3o1l2G6jjq0UQFJ9vMkXw==","signatures":[{"sig":"MEQCIF5sEyNTP3UP59A9lwGfLTH+ccObtsrmE9eb20KOgEf2AiB7yXGNXalJ2x7vSCjFILu42mwrNvxyxnpRx4wZkSotzw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17451},"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":"d450988ac7d4986ae139b69a003117c016c530ce","_npmUser":{"name":"chathurangac8","email":"basnayakac8@gmail.com"},"repository":{"url":"git+https://github.com/AllRates-Today/rma-bhutan-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Royal Monetary Authority of Bhutan (Bhutan) daily exchange rates — 12 currencies vs BTN, history since 2024. Zero-dependency Node.js/TypeScript client.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rma-bhutan-exchange-rate_1.2.7_1788637451790_0.49277158003666166","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@allratestoday/rma-bhutan-exchange-rate","version":"1.3.0","keywords":["rma","royal","monetary","authority","of","bhutan","exchange-rate","exchange-rates","currency","forex","fx","btn","central-bank","official-rates","bhutan","api","typescript"],"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","_id":"@allratestoday/rma-bhutan-exchange-rate@1.3.0","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"homepage":"https://allratestoday.com/central-bank-rates-api/rma/","bugs":{"url":"https://github.com/AllRates-Today/rma-bhutan-exchange-rate/issues"},"dist":{"shasum":"bc115e2e711333449c9ef59d926f2ad05b3a00be","tarball":"https://registry.npmjs.org/@allratestoday/rma-bhutan-exchange-rate/-/rma-bhutan-exchange-rate-1.3.0.tgz","fileCount":6,"integrity":"sha512-uYoQDXM6DZXez2rbYNY6RMc4JpP8PWuuP+7WPhlR76NQKtAs2Qp0/4VWTb8qnpesrn3q4dh8pMPZfQ0qOyvLXw==","signatures":[{"sig":"MEQCIGtN/PE7M3jffJ/7pNRMv73XMTOL3gKQ2fKm5ndk2BUhAiBUqjwkXsc1P0XBgKljKKRn23PYRNwLvyn/tGxf3vlaDQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17999},"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/rma-bhutan-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Royal Monetary Authority of Bhutan (Bhutan) daily exchange rates — 12 currencies vs BTN, history since 2024. Zero-dependency Node.js/TypeScript client.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rma-bhutan-exchange-rate_1.3.0_1788977231428_0.3625322223907266","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@allratestoday/rma-bhutan-exchange-rate","version":"1.3.1","keywords":["rma","royal","monetary","authority","of","bhutan","exchange-rate","exchange-rates","currency","forex","fx","btn","central-bank","official-rates","bhutan","api","typescript"],"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","_id":"@allratestoday/rma-bhutan-exchange-rate@1.3.1","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"homepage":"https://allratestoday.com/central-bank-rates-api/rma/","bugs":{"url":"https://github.com/AllRates-Today/rma-bhutan-exchange-rate/issues"},"dist":{"shasum":"cf57e67414cf244ff80c05fb38dcdcadf5516bfb","tarball":"https://registry.npmjs.org/@allratestoday/rma-bhutan-exchange-rate/-/rma-bhutan-exchange-rate-1.3.1.tgz","fileCount":6,"integrity":"sha512-iZRWmhb+PrCMVqip1yR7VBepxCmN7E1w6Dj0LVPUMKdtpvPe6IFOv0IY3Epb6rD2XDG8yfa9ExuS4zWOG5C3VQ==","signatures":[{"sig":"MEYCIQC2AbsEPnSS5twhCtaY7NoNLTX8wijU2xbpRuugGELtHgIhALQ2ATXROM839Z3zKeGu+kb3i4NVr47kmyacfjED7JDk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCzP2A3uQd2fY6WpkaVHSvnjDf5yfAqViODzKhFXk9FqwIhAPaOobjWUDPaVXEIN+jbp6tgPUGQrnyRQRiEO2ZUzbfA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21888},"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/rma-bhutan-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Royal Monetary Authority of Bhutan (Bhutan) daily exchange rates — 12 currencies vs BTN, history since 2024. Zero-dependency Node.js/TypeScript client.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rma-bhutan-exchange-rate_1.3.1_1789650376746_0.9964032117695765","host":"s3://npm-registry-packages-npm-production"}},"1.3.3":{"name":"@allratestoday/rma-bhutan-exchange-rate","version":"1.3.3","keywords":["rma","royal","monetary","authority","of","bhutan","exchange-rate","exchange-rates","currency","forex","fx","btn","central-bank","official-rates","bhutan","api","typescript"],"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","_id":"@allratestoday/rma-bhutan-exchange-rate@1.3.3","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"homepage":"https://allratestoday.com/central-bank-rates-api/rma/","bugs":{"url":"https://github.com/AllRates-Today/rma-bhutan-exchange-rate/issues"},"dist":{"shasum":"baa460516e6fc13696b9dd1235619a60587e676e","tarball":"https://registry.npmjs.org/@allratestoday/rma-bhutan-exchange-rate/-/rma-bhutan-exchange-rate-1.3.3.tgz","fileCount":6,"integrity":"sha512-t2+SSej3+CeJUNhhwMNAw/nSBl7N7fLzHMDSVabO0jh4cBlejNt/d2C9MfLZCje93i1qK5aPqPRwFoVSb91G5Q==","signatures":[{"sig":"MEYCIQDgWuGZJIoSKt5O+VkIT5nKU9V/HaEQaEF+V/u9S6ZtqgIhAJ9iGlWmTCtU7N0g26Nvd6nAQMVmFW9wH7FRCcrzkSob","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDmjEyI5Lb1w5Yzv9LBmiHejVNf6/Vp+0oHtmiT5h46vAIhAPkLmzyHBE6+9B2Ot/K7MyRTtVEBbRWD/XDGORKl+7qM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21885},"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/rma-bhutan-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Royal Monetary Authority of Bhutan (Bhutan) daily exchange rates — 12 currencies vs BTN, history since 2024. Zero-dependency Node.js/TypeScript client.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rma-bhutan-exchange-rate_1.3.3_1790770481886_0.8254649805745435","host":"s3://npm-registry-packages-npm-production"}},"1.3.4":{"name":"@allratestoday/rma-bhutan-exchange-rate","version":"1.3.4","keywords":["rma","royal","monetary","authority","of","bhutan","exchange-rate","exchange-rates","currency","forex","fx","btn","central-bank","official-rates","bhutan","api","typescript"],"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","_id":"@allratestoday/rma-bhutan-exchange-rate@1.3.4","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"homepage":"https://allratestoday.com/central-bank-rates-api/rma/","bugs":{"url":"https://github.com/AllRates-Today/rma-bhutan-exchange-rate/issues"},"dist":{"shasum":"760d1d91978b3ecefb251aca8718e87a96f0aae3","tarball":"https://registry.npmjs.org/@allratestoday/rma-bhutan-exchange-rate/-/rma-bhutan-exchange-rate-1.3.4.tgz","fileCount":6,"integrity":"sha512-LcuSRfOPAD6JrBxae8WjAciqzIsPHVB/tF7OJDEsCfiMApu7R3DO7ekTASNQQu40iOlV6MIveZPNWTF53aEmkg==","signatures":[{"sig":"MEUCIHpY5+z7+OsDVyCIypdAkrdG6obnw0uNl3B9F8N6GK8TAiEAykZI2Z50jIu8GdPEJ9ji21uVG01LOK1ghoYnGz5Vupo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIBCXhWrfSTWyxVNMMFhj9AKB8fBpaD3zZ5llgoDk32soAiA1y3Qbz08tn8r+JTQ3UXraO5ga76HU0iQajwig3SXiGg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22284},"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":"79b405ca4251d0e8c85b00c9f6c63206e5e3dab3","_npmUser":{"name":"chathurangac8","email":"basnayakac8@gmail.com"},"repository":{"url":"git+https://github.com/AllRates-Today/rma-bhutan-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Royal Monetary Authority of Bhutan (Bhutan) daily exchange rates — 12 currencies vs BTN, history since 2024. Zero-dependency Node.js/TypeScript client.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rma-bhutan-exchange-rate_1.3.4_1790851560503_0.3709031039968551","host":"s3://npm-registry-packages-npm-production"}},"1.3.5":{"_id":"@allratestoday/rma-bhutan-exchange-rate@1.3.5","bugs":{"url":"https://github.com/AllRates-Today/rma-bhutan-exchange-rate/issues"},"dist":{"shasum":"7a7e953d5fddf17838eccec6c864f5f2a72ca281","tarball":"https://registry.npmjs.org/@allratestoday/rma-bhutan-exchange-rate/-/rma-bhutan-exchange-rate-1.3.5.tgz","fileCount":6,"integrity":"sha512-opEUZa7N07QTnfAlXM80qTQfEtIhetHq53FIxviV5vqMqH14eSq46UehnyGVMQ61sbIMI5XtmefzM/9cdWoveQ==","signatures":[{"sig":"MEQCIHi1VEOJYLhw1Nn0pv0XfQNm6uTKZ0ZJf2cg9mK6E9eqAiAqjvAwAqZ2fqpE/lGHdfed8U9dwrwi8ArFmqw5P1AcLw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIChdXfNgXOgaJjfTzx2Bl8Lgk5TAvY+QOWSDCrjU4RpqAiAhDHDItT1v5+qMjVH4eo0lP6ibZrV9vyhdtCQLsDKuRA=="}],"unpackedSize":22284},"main":"./index.cjs","name":"@allratestoday/rma-bhutan-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":"96538305fe3410109ec8f078656cb344ea3a301a","license":"MIT","version":"1.3.5","_npmUser":{"name":"chathurangac8","email":"basnayakac8@gmail.com"},"homepage":"https://allratestoday.com/central-bank-rates-api/rma/","keywords":["rma","royal","monetary","authority","of","bhutan","exchange-rate","exchange-rates","currency","forex","fx","btn","central-bank","official-rates","bhutan","api","typescript"],"repository":{"url":"git+https://github.com/AllRates-Today/rma-bhutan-exchange-rate.git","type":"git"},"_npmVersion":"9.2.0","description":"Official Royal Monetary Authority of Bhutan (Bhutan) daily exchange rates — 12 currencies vs BTN, history since 2024. 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/rma-bhutan-exchange-rate_1.3.5_1791322718567_0.44504150556734734"}}},"time":{"created":"2026-09-05T19:44:11.575Z","modified":"2026-10-06T21:38:38.980Z","1.2.7":"2026-09-05T19:44:11.930Z","1.3.0":"2026-09-09T18:07:11.572Z","1.3.1":"2026-09-17T13:06:16.828Z","1.3.3":"2026-09-30T12:14:41.983Z","1.3.4":"2026-10-01T10:46:00.632Z","1.3.5":"2026-10-06T21:38:38.655Z"},"bugs":{"url":"https://github.com/AllRates-Today/rma-bhutan-exchange-rate/issues"},"author":{"url":"https://allratestoday.com","name":"AllRatesToday","email":"hello@allratestoday.com"},"license":"MIT","homepage":"https://allratestoday.com/central-bank-rates-api/rma/","keywords":["rma","royal","monetary","authority","of","bhutan","exchange-rate","exchange-rates","currency","forex","fx","btn","central-bank","official-rates","bhutan","api","typescript"],"repository":{"url":"git+https://github.com/AllRates-Today/rma-bhutan-exchange-rate.git","type":"git"},"description":"Official Royal Monetary Authority of Bhutan (Bhutan) daily exchange rates — 12 currencies vs BTN, history since 2024. Zero-dependency Node.js/TypeScript client.","maintainers":[{"name":"chathurangac8","email":"basnayakac8@gmail.com"}],"readme":"# Royal Monetary Authority of Bhutan Exchange Rates API — rma-bhutan-exchange-rate\n\n[![npm version](https://img.shields.io/npm/v/@allratestoday%2Frma-bhutan-exchange-rate.svg)](https://www.npmjs.com/package/@allratestoday/rma-bhutan-exchange-rate)\n[![license](https://img.shields.io/npm/l/@allratestoday%2Frma-bhutan-exchange-rate.svg)](https://github.com/AllRates-Today/rma-bhutan-exchange-rate/blob/main/LICENSE)\n[![zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](https://www.npmjs.com/package/@allratestoday/rma-bhutan-exchange-rate)\n[![TypeScript](https://img.shields.io/badge/TypeScript-types%20included-3178C6.svg)](https://www.typescriptlang.org/)\n\n**Official Royal Monetary Authority of Bhutan (Bhutan) 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 Royal Monetary Authority of Bhutan itself prints, every business day.**\n\n## 🚀 Why this client?\n\n- 🏛️ **Official published rates** — Royal Monetary Authority of Bhutan's own table, with the publisher's own `rate_date` on every response\n- 📅 **History back to 2024** — 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 Royal Monetary Authority of Bhutan 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 Royal Monetary Authority of Bhutan 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/rma?source=USD&target=BTN\"\n```\n\n```js\nconst r = await fetch('https://allratestoday.com/api/open/central-bank/rma').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/rma-bhutan-exchange-rate\n```\n\n```bash\nyarn add @allratestoday/rma-bhutan-exchange-rate\n```\n\n```bash\npnpm add @allratestoday/rma-bhutan-exchange-rate\n```\n\nRequires Node 18+ (global `fetch`); also runs on Bun, Deno and edge runtimes. Scoped mirror of [`rma-bhutan-exchange-rate`](https://www.npmjs.com/package/rma-bhutan-exchange-rate) — same code, same versions.\n\n## 🏁 Quick start\n\n```js\nimport { getRate } from '@allratestoday/rma-bhutan-exchange-rate';\n\nconst pair = await getRate('USD', 'BTN', { apiKey: 'art_live_...' });\nconsole.log(pair.rate, pair.rate_date); // the official Royal Monetary Authority of Bhutan 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', 'BTN', { apiKey: 'art_live_...' });\n```\n\n**Response:**\n\n```javascript\n{\n  bank: 'rma',\n  name: 'Royal Monetary Authority of Bhutan',\n  rate_date: '2026-10-06',   // Royal Monetary Authority of Bhutan's own publication date\n  source: 'USD',\n  target: 'BTN',\n  rate: 96.73,\n  rate_type: 'sell',\n  derived: false,\n  method: 'published',\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/rma-bhutan-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: 'rma',\n  name: 'Royal Monetary Authority of Bhutan',\n  rate_date: '2026-10-06',\n  rates: [\n    { \"base\": \"USD\", \"quote\": \"BTN\", \"type\": \"sell\", \"value\": 96.73 },\n    { \"base\": \"USD\", \"quote\": \"BTN\", \"type\": \"buy\", \"value\": 96.06 },\n    // … the rest of the published table (12 currencies vs BTN)\n  ],\n  disclaimer: '…'\n}\n```\n\n### Table for a date\n\nPaid plans. The official table for any date since 2024 — 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/rma-bhutan-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: 'BTN' });\n```\n\n**Response:**\n\n```javascript\n{\n  bank: 'rma',\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/rma-bhutan-exchange-rate';\n\nconst series = await getHistory(\n  { source: 'USD', target: 'BTN', from: '2026-01-01', to: '2026-10-06' },\n  { apiKey: 'art_live_...' }\n);\n```\n\n**Response:**\n\n```javascript\n{\n  bank: 'rma',\n  source: 'USD',\n  target: 'BTN',\n  from: '2026-01-01',\n  to: '2026-10-06',\n  count: 152,\n  rates: [\n    // one entry per publication date\n    { date: '2026-10-06', rate: 96.73, rate_type: 'sell', derived: false, method: 'published' },\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\nRoyal Monetary Authority of Bhutan currently publishes rates covering **12 currencies** against the BTN (as of the latest table):\n\n🇦🇺 `AUD` · 🇨🇦 `CAD` · 🇨🇭 `CHF` · 🇩🇰 `DKK` · 🇪🇺 `EUR` · 🇬🇧 `GBP` · 🇭🇰 `HKD` · 🇯🇵 `JPY` · 🇳🇴 `NOK` · 🇸🇪 `SEK` · 🇸🇬 `SGD` · 🇺🇸 `USD`\n\n## 🏛️ Source\n\nThe Royal Monetary Authority of Bhutan publishes daily telegraphic-transfer buying and selling rates for 12 currencies in ngultrum. The ngultrum is pegged one-to-one to the Indian rupee, so the table tracks the rupee's moves against the dollar, euro and the other majors; the RMA's online archive starts in mid-2024.\n\n- Publisher's own page: [Exchange rates](https://www.rma.org.bt/exchangeRates/) · [www.rma.org.bt](https://www.rma.org.bt)\n- Publication: every business day; the exact schedule, freshness status and any current delay are on the [Royal Monetary Authority of Bhutan rates page](https://allratestoday.com/central-bank-rates-api/rma/)\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- Royal Monetary Authority of Bhutan quotes **BTN per 1 unit of foreign currency** (e.g. `base: \"USD\", quote: \"BTN\"` means BTN per one US dollar).\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 (`sell` here); some publishers print buy/sell or several fixings for the same pair.\n\n## 🧩 ERP & accounting systems\n\nLoading the official Royal Monetary Authority of Bhutan 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/rma/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('rma')` 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 Royal Monetary Authority of Bhutan 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 BTN 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 Royal Monetary Authority of Bhutan |\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/rma-bhutan-exchange-rate';\n```\n\n## 📦 CommonJS\n\n```javascript\nconst { getRate } = require('@allratestoday/rma-bhutan-exchange-rate');\n\ngetRate('USD', 'BTN', { 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 2024 |\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/rma.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/rma/latest.json`\n\n## 🔗 Links\n\n- [Royal Monetary Authority of Bhutan rates page](https://allratestoday.com/central-bank-rates-api/rma/) — 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/rma-bhutan-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/rma-bhutan-exchange-rate)\n\n## 📜 License\n\nMIT\n","readmeFilename":"README.md"}