Official Reserve Bank of Malawi exchange rates (MWK) as JSON — zero-dependency Node.js/TypeScript SDK
# Reserve Bank of Malawi Exchange Rate API — rbm-exchange-rate
**Official Reserve Bank of Malawi (Malawi) 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 Reserve Bank of Malawi itself prints, every business day.**
## 🚀 Why this client?
- 🏛️ **Official published rates** — Reserve Bank of Malawi's own table, with the publisher's own `rate_date` on every response
- 📅 **History back to 2016** — point-in-time tables and daily series for any past date
- 🔀 **Published vs derived, always flagged** — computed inverse/cross pairs carry `derived: true`, never mixed with official prints
- ⚡ **Zero dependencies** — pure ESM + CJS over global `fetch`; Node 18+, Bun, Deno, and edge runtimes
- 🔷 **Type-safe** — full TypeScript definitions shipped with the package
- 🧾 **Compliance-grade metadata** — `rate_type`, publication date, and source disclaimer on every response
> **Official rate, not mid-market:** every value here is a number Reserve Bank of Malawi itself published, fixed once printed and carrying the central bank's own `rate_date` — what filings and audits require. Need the live interbank midpoint for pricing or display instead? Use the mid-market API or `@allratestoday/sdk`. The two can diverge by several percent.
## 🔑 Get your API key
Get a free API key at
allratestoday.com — no credit card required. Latest rates are on every plan, including free.
## 📦 Installation
```bash
npm install rbm-exchange-rate
```
```bash
yarn add rbm-exchange-rate
```
```bash
pnpm add rbm-exchange-rate
```
Also published under the org scope as `@allratestoday/rbm-exchange-rate` — same code, same versions.
## 🏁 Quick start
```js
import { getRate } from 'rbm-exchange-rate';
const pair = await getRate('USD', 'MWK', { apiKey: 'art_live_...' });
console.log(pair.rate, pair.rate_date); // the official Reserve Bank of Malawi rate, …