Official Bank of Zambia exchange rates (ZMW) as JSON — zero-dependency Node.js/TypeScript SDK
# Bank of Zambia Exchange Rate API — boz-exchange-rate
**Official Bank of Zambia (Zambia) 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 Bank of Zambia itself prints, every business day.**
## 🚀 Why this client?
- 🏛️ **Official published rates** — Bank of Zambia's own table, with the publisher's own `rate_date` on every response
- 📅 **History back to 2026** — 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 Bank of Zambia 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 boz-exchange-rate
```
```bash
yarn add boz-exchange-rate
```
```bash
pnpm add boz-exchange-rate
```
Also published under the org scope as `@allratestoday/boz-exchange-rate` — same code, same versions.
## 🏁 Quick start
```js
import { getRate } from 'boz-exchange-rate';
const pair = await getRate('USD', 'ZMW', { apiKey: 'art_live_...' });
console.log(pair.rate, pair.rate_date); // the official Bank of Zambia rate, on the central bank's own date
```
## 📚 API ref …