# National Bank of the Kyrgyz Republic Exchange Rates API — nbkr-exchange-rate

[![npm version](https://img.shields.io/npm/v/@allratestoday%2Fnbkr-exchange-rate.svg)](https://www.npmjs.com/package/@allratestoday/nbkr-exchange-rate)
[![license](https://img.shields.io/npm/l/@allratestoday%2Fnbkr-exchange-rate.svg)](https://github.com/AllRates-Today/nbkr-exchange-rate/blob/main/LICENSE)
[![zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](https://www.npmjs.com/package/@allratestoday/nbkr-exchange-rate)
[![TypeScript](https://img.shields.io/badge/TypeScript-types%20included-3178C6.svg)](https://www.typescriptlang.org/)
[![USD/KGS today](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Fnbkr%3Fsource%3DUSD%26target%3DKGS&query=%24.rate&label=USD%2FKGS%20official%2C%20National%20Bank%20of%20the%20Kyrgyz%20Republic&color=0A7E8C&cacheSeconds=3600)](https://allratestoday.com/central-bank-rates-api/nbkr/)
[![rate date](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Fnbkr%3Fsource%3DUSD%26target%3DKGS&query=%24.rate_date&label=rate%20date&color=555&cacheSeconds=3600)](https://allratestoday.com/central-bank-rates-api/nbkr/)

**Official National Bank of the Kyrgyz Republic (Kyrgyzstan) 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 National Bank of the Kyrgyz Republic itself prints, every business day.**

## 🚀 Why this client?

- 🏛️ **Official rates** — National Bank of the Kyrgyz Republic's own table, with the publisher's own `rate_date` on every response
- 📅 **History from 2026** — this source publishes only its current table, so the archive builds forward from the day we started collecting
- 🔀 **Official 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 National Bank of the Kyrgyz Republic 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.

## 🔑 Get your API key

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.

## 📈 Latest official table

[![Latest National Bank of the Kyrgyz Republic table](https://allratestoday.com/api/open/central-bank/nbkr/table.svg)](https://allratestoday.com/central-bank-rates-api/nbkr/)

The image is rendered live from the keyless endpoint, so it follows the central bank's publications on npm and on GitHub alike without a new release. The same table as text is folded below for search and copy-paste: on GitHub [a daily Action](.github/workflows/daily-table.yml) refreshes it whenever the central bank publishes a new table; on npm it is as of the package's publish date.

<!-- daily-table:start -->
<details>
<summary>Table as text: published 2026-11-24 by National Bank of the Kyrgyz Republic — 48 rates. Updated 2026-11-23.</summary>

| Base | Quote | Type | Rate |
| --- | --- | --- | ---: |
| AED | KGS | reference | 23.8098 |
| AFN | KGS | reference | 1.3448 |
| AMD | KGS | reference | 0.24228 |
| AUD | KGS | reference | 58.2942 |
| AZN | KGS | reference | 51.4412 |
| BHD | KGS | reference | 231.8214 |
| BRL | KGS | reference | 14.7512 |
| BYN | KGS | reference | 29.2055 |
| BYR | KGS | reference | 0.003402 |
| CAD | KGS | reference | 61.0322 |
| CHF | KGS | reference | 103.7428 |
| CNY | KGS | reference | 13.1221 |
| CZK | KGS | reference | 3.924 |
| DKK | KGS | reference | 12.831 |
| EUR | KGS | reference | 96.1119 |
| GBP | KGS | reference | 114.5639 |
| GEL | KGS | reference | 33.7215 |
| HKD | KGS | reference | 11.1536 |
| HUF | KGS | reference | 0.25753 |
| IDR | KGS | reference | 0.00479 |
| INR | KGS | reference | 0.9423 |
| IRR | KGS | reference | 0.000045 |
| JPY | KGS | reference | 0.54984 |
| KRW | KGS | reference | 0.0654 |
| KWD | KGS | reference | 283.0097 |
| KZT | KGS | reference | 0.192 |
| MDL | KGS | reference | 4.7769 |
| MNT | KGS | reference | 0.0242 |
| MYR | KGS | reference | 21.258 |
| NOK | KGS | reference | 8.9426 |
| NZD | KGS | reference | 48.1106 |
| OMR | KGS | reference | 227.137 |
| PKR | KGS | reference | 0.3164 |
| PLN | KGS | reference | 21.566 |
| RUB | KGS | reference | 1.0678 |
| SAR | KGS | reference | 23.3082 |
| SEK | KGS | reference | 8.571 |
| SGD | KGS | reference | 67.7933 |
| THB | KGS | reference | 2.5785 |
| TJS | KGS | reference | 9.4922 |
| TMT | KGS | reference | 24.9857 |
| TRY | KGS | reference | 1.729 |
| TWD | KGS | reference | 2.6507 |
| UAH | KGS | reference | 1.941 |
| USD | KGS | reference | 87.45 |
| UZS | KGS | reference | 0.0073 |
| VND | KGS | reference | 0.00339 |
| XDR | KGS | reference | 117.5656 |

</details>

Source: [Official rates published by NBKR, served by AllRatesToday](https://allratestoday.com/central-bank-rates-api/nbkr/). Rates are as printed by the central bank; AllRatesToday is not affiliated with it.
<!-- daily-table:end -->

## 📦 Installation

```bash
npm install @allratestoday/nbkr-exchange-rate
```

```bash
yarn add @allratestoday/nbkr-exchange-rate
```

```bash
pnpm add @allratestoday/nbkr-exchange-rate
```

Requires Node 18+ (global `fetch`); also runs on Bun, Deno and edge runtimes. Scoped mirror of [`nbkr-exchange-rate`](https://www.npmjs.com/package/nbkr-exchange-rate) — same code, same versions.

## 🏁 Quick start

```js
import { getRate } from '@allratestoday/nbkr-exchange-rate';

const pair = await getRate('USD', 'KGS', { apiKey: 'art_live_...' });
console.log(pair.rate, pair.rate_date); // the official National Bank of the Kyrgyz Republic rate, on the central bank's own date
```

## 📚 API reference

- [Latest pair rate](#latest-pair-rate) — one pair from the latest official table
- [Full official table](#full-official-table) — everything the central bank printed, in one call
- [Table for a date](#table-for-a-date) — the official table for an invoice or filing date
- [Daily time series](#daily-time-series) — one pair across a date range

---

### Latest pair rate

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).

```js
const pair = await getRate('USD', 'KGS', { apiKey: 'art_live_...' });
```

**Response:**

```javascript
{
  bank: 'nbkr',
  name: 'National Bank of the Kyrgyz Republic',
  rate_date: '2026-11-12',   // National Bank of the Kyrgyz Republic's own publication date
  source: 'USD',
  target: 'KGS',
  rate: 87.4496,
  rate_type: 'reference',
  derived: false,
  method: 'published',
  disclaimer: 'Official rates as published by the named central bank. On weekends/holidays the most recent published rate_date is returned.'
}
```

### Full official table

Free plan and up. The complete table for the latest publication date.

```js
import { getLatestRates } from '@allratestoday/nbkr-exchange-rate';

const table = await getLatestRates({ apiKey: 'art_live_...' });
console.log(table.rate_date, table.rates.length);
```

**Response:**

```javascript
{
  bank: 'nbkr',
  name: 'National Bank of the Kyrgyz Republic',
  rate_date: '2026-11-12',
  rates: [
    { "base": "USD", "quote": "KGS", "type": "reference", "value": 87.4496 },
    // … the rest of the official table (48 currencies vs KGS)
  ],
  disclaimer: '…'
}
```

### Table for a date

Paid plans. The official table for any date since 2026 — 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.

```js
import { getRatesForDate } from '@allratestoday/nbkr-exchange-rate';

const day = await getRatesForDate('2026-06-30', { apiKey: 'art_live_...' });
// Optionally narrow to one pair:
const one = await getRatesForDate('2026-06-30', { apiKey: 'art_live_...', source: 'USD', target: 'KGS' });
```

**Response:**

```javascript
{
  bank: 'nbkr',
  requested_date: '2026-06-30',
  rate_date: '2026-06-30',                // the date actually published
  published_on_requested_date: true,      // false when a weekend/holiday fell back
  rates: [ /* the full table for that date */ ],
  disclaimer: '…'
}
```

### Daily time series

Paid plans. One resolved rate per publication date — ready for charting, revaluation runs, or audit workpapers.

```js
import { getHistory } from '@allratestoday/nbkr-exchange-rate';

const series = await getHistory(
  { source: 'USD', target: 'KGS', from: '2026-01-01', to: '2026-11-12' },
  { apiKey: 'art_live_...' }
);
```

**Response:**

```javascript
{
  bank: 'nbkr',
  source: 'USD',
  target: 'KGS',
  from: '2026-01-01',
  to: '2026-11-12',
  count: 152,
  rates: [
    // one entry per publication date
    { date: '2026-11-12', rate: 87.4496, rate_type: 'reference', derived: false, method: 'published' },
    // …
  ],
  disclaimer: '…'
}
```

Pass `{ symbol: 'USD' }` instead of `source`/`target` to get the raw published rows for one currency (all rate types, no pair resolution).

---

## 🗺️ Currencies covered

National Bank of the Kyrgyz Republic currently publishes rates covering **48 currencies** against the KGS (as of the latest table):

🇦🇪 `AED` · 🇦🇫 `AFN` · 🇦🇲 `AMD` · 🇦🇺 `AUD` · 🇦🇿 `AZN` · 🇧🇭 `BHD` · 🇧🇷 `BRL` · 🇧🇾 `BYN` · 🇧🇾 `BYR` · 🇨🇦 `CAD` · 🇨🇭 `CHF` · 🇨🇳 `CNY` · 🇨🇿 `CZK` · 🇩🇰 `DKK` · 🇪🇺 `EUR` · 🇬🇧 `GBP` · 🇬🇪 `GEL` · 🇭🇰 `HKD` · 🇭🇺 `HUF` · 🇮🇩 `IDR` · 🇮🇳 `INR` · 🇮🇷 `IRR` · 🇯🇵 `JPY` · 🇰🇷 `KRW` · 🇰🇼 `KWD` · 🇰🇿 `KZT` · 🇲🇩 `MDL` · 🇲🇳 `MNT` · 🇲🇾 `MYR` · 🇳🇴 `NOK` · 🇳🇿 `NZD` · 🇴🇲 `OMR` · 🇵🇰 `PKR` · 🇵🇱 `PLN` · 🇷🇺 `RUB` · 🇸🇦 `SAR` · 🇸🇪 `SEK` · 🇸🇬 `SGD` · 🇹🇭 `THB` · 🇹🇯 `TJS` · 🇹🇲 `TMT` · 🇹🇷 `TRY` · 🇹🇼 `TWD` · 🇺🇦 `UAH` · 🇺🇸 `USD` · 🇺🇿 `UZS` · 🇻🇳 `VND` · `XDR`

## 🏛️ Source

The National Bank of the Kyrgyz Republic sets official som exchange rates each working day for the five major currencies, plus a weekly table of around 43 more. Like the Bank of Russia's, each setting is dated for the following day — and it is the rate Kyrgyz accounting, customs and tax legislation reference.

- Publisher's own page: [Official exchange rates](https://www.nbkr.kg/index1.jsp?item=1562&lang=ENG) · [www.nbkr.kg](https://www.nbkr.kg)
- Publication: every business day; the exact schedule, freshness status and any current delay are on the [National Bank of the Kyrgyz Republic rates page](https://allratestoday.com/central-bank-rates-api/nbkr/)
- In the API: usually by **10:20 UTC** (measured over the last 12 publications). Schedule a sync at or after that time and retry hourly until `rate_date` moves; every response carries the same figure as `available_by_utc` — see [when to poll](https://allratestoday.com/docs/#when-to-poll)
- Values are stored unmodified, with the publisher's own `rate_date` on every row — see the [methodology](https://allratestoday.com/official-rates-methodology/)

## 🧭 Reading the numbers

- `value` is always **quote currency per 1 unit of base currency** (`base: "EUR", quote: "USD", value: 1.15` means 1 EUR = 1.15 USD).
- National Bank of the Kyrgyz Republic quotes **KGS per 1 unit of foreign currency** (e.g. `base: "USD", quote: "KGS"` means KGS per one US dollar).
- 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.
- `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.

## 🧩 ERP & accounting systems

Loading the official National Bank of the Kyrgyz Republic rate into an accounting system is a supported workflow, not a hack. Step-by-step guides with the direction each system expects:

- [Dynamics 365 Business Central](https://allratestoday.com/docs/integrations/business-central/) — built-in Currency Exchange Rate Service, no code
- [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/)

The 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:

```bash
curl "https://allratestoday.com/api/v1/central-bank/nbkr/latest?format=xml&api_key=art_live_..."
```

## 🤖 AI agents

- 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
- 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('nbkr')` 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
- Claude Code plugin (no key): `/plugin marketplace add AllRates-Today/claude-code-plugin` then `/plugin install allratestoday@allratestoday` — bundles both MCP servers plus an `/official-rate nbkr ...` command
- 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`
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) · [for-ai-agents](https://allratestoday.com/for-ai-agents/)

## ⚖️ Official vs derived rates

If National Bank of the Kyrgyz Republic 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:

| `method` | `derived` | Meaning |
| --- | --- | --- |
| `published` | `false` | The central bank printed this pair directly |
| `inverse` | `true` | Computed as 1 ÷ the published opposite direction |
| `cross` | `true` | Computed via KGS from two published rates |

## 🛡️ Error handling

Errors are thrown as `Error` with `status` (HTTP code) and `body` (the API's JSON error) attached:

```js
try {
  const pair = await getRate('USD', 'XXX', { apiKey: 'art_live_...' });
} catch (err) {
  console.log(err.message); // human-readable reason
  console.log(err.status);  // e.g. 404
}
```

| Status | Meaning |
| ------ | ------- |
| — | Missing `apiKey` (thrown before any request) |
| `400` | Malformed date or parameters |
| `401` | Invalid API key |
| `403` | Endpoint needs a [paid plan](https://allratestoday.com/pricing/) (historical dates & series) |
| `404` | Pair or date range not covered by National Bank of the Kyrgyz Republic |
| `429` | Monthly quota exceeded |

## 🔷 TypeScript

Full definitions ship with the package — no `@types` install:

```ts
import type { LatestRates, PairRate, DatedRates, RateEntry, HistoryQuery, RequestOptions } from '@allratestoday/nbkr-exchange-rate';
```

## 📦 CommonJS

```javascript
const { getRate } = require('@allratestoday/nbkr-exchange-rate');

getRate('USD', 'KGS', { apiKey: 'art_live_...' }).then((pair) => console.log(pair.rate));
```

## 💡 Quota tips

- Rates change once per business day — cache the official table locally and a small monthly quota goes a long way.
- Every request counts toward your AllRatesToday quota, shared across all AllRatesToday endpoints on your key.

## 📖 Methods reference

| Method | Plan | Description |
| ------ | ---- | ----------- |
| `getRate(source, target, { apiKey })` | Free | Latest rate for one pair, resolved from the official table |
| `getLatestRates({ apiKey })` | Free | The central bank's full latest official table |
| `getRatesForDate(date, { apiKey, source?, target? })` | Paid | The official table (or one pair) for a YYYY-MM-DD date |
| `getHistory({ symbol \| source+target, from?, to? }, { apiKey })` | Paid | Daily series since 2026 |

## 📥 Bulk data (no key)

Need the whole archive rather than an API call? The same official tables are mirrored daily as open data:

- Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) — one CSV per institution (`rates/nbkr.csv`)
- Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
- Raw JSON on GitHub: `https://raw.githubusercontent.com/AllRates-Today/central-bank-exchange-rates/main/data/nbkr/latest.json`

## 🔗 Links

- **Website:** [allratestoday.com](https://allratestoday.com)
- [National Bank of the Kyrgyz Republic rates page](https://allratestoday.com/central-bank-rates-api/nbkr/) — live table, publication cadence, FAQ
- [All central bank sources](https://allratestoday.com/central-bank-rates-api/) · [Full list of 120+ central banks and 50+ tax authorities](https://allratestoday.com/central-bank-rates-api/institutions/) — one API, the same response shape for every source
- [Download central bank rates](https://allratestoday.com/download-central-bank-rates/) — every bank's latest table and history as Excel, CSV or JSON
- [Bank Exchange Rate API](https://allratestoday.com/bank-exchange-rate-api/) — live buy and sell rates from 1,200+ commercial banks in 120+ countries · [npm](https://www.npmjs.com/package/bank-exchange-rates) · [GitHub](https://github.com/AllRates-Today/bank-exchange-rates)
- [Package docs on the site](https://allratestoday.com/docs/sdk/nbkr-exchange-rate/) · [ERP integration guides](https://allratestoday.com/docs/integrations/)
- [API documentation](https://allratestoday.com/docs/#central-bank) · [Interactive reference](https://allratestoday.com/api-reference/) · [Methodology](https://allratestoday.com/official-rates-methodology/)
- [Register (Free)](https://allratestoday.com/register) · [Dashboard](https://allratestoday.com/profile) · [Pricing](https://allratestoday.com/pricing/)
- [Status](https://allratestoday.com/status)
- [Postman collection](https://allratestoday.com/postman/)
- [ChatGPT app](https://chatgpt.com/plugins/plugin_asdk_app_6ae1e76098f48191a285ac3f5ab7a83b) — ask ChatGPT for live and official central bank rates
- [OpenAPI reference on Bump.sh](https://bump.sh/allratestoday/doc/allratestoday-api) — also on [SwaggerHub](https://app.swaggerhub.com/apis-docs/allratestoday/allratestoday-exchange-rate-central-bank-rates-api/2.2.0)
- [GitHub](https://github.com/AllRates-Today/nbkr-exchange-rate)

## 📜 License

MIT
