BYTETOOLS

National Bank of Ukraine API

Free National Bank of Ukraine API with no key: official hryvnia exchange rates for every quoted currency in one request, current or historical. Tested example and live response.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the National Bank of Ukraine API?

The National Bank of Ukraine publishes its official hryvnia exchange rates through a free open-data API that needs no key. A single request returns the rate for every quoted currency on a given date, with permissive CORS headers.

The NBU's statistics directory is one of the more straightforward central bank feeds: append `?json` to the endpoint and you get a flat array, one object per currency, with no envelope and no pagination. That flatness is why it shows up so often in currency widgets — there is nothing to unwrap before you can filter for the code you want.

Watch the date format. `exchangedate` comes back as `DD.MM.YYYY`, while the `date` query parameter expects `YYYYMMDD` with no separators at all. The two are not interchangeable, and a value round-tripped from response to request without conversion will quietly return today's list instead of the one you asked for.

Quick facts

Base URL
https://bank.gov.ua/NBUStatService/v1/statdirectory
Authentication
No key or registration. Published under Ukraine's open data programme.
Rate limit
No documented limit. Rates are set once per working day.
Pricing
Free.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the National Bank of Ukraine API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Official UAH rates for every quoted currency

GET https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?json

curl
curl 'https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?json'
JavaScript (fetch)
const res = await fetch("https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?json", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
[
  {
    "r030": 12,
    "txt": "Алжирський динар",
    "rate": 0.33592,
    "cc": "DZD",
    "exchangedate": "21.08.2026",
    "special": null
  },
  {
    "r030": 36,
    "txt": "Австралійський долар",
    "rate": 31.7217,
    "cc": "AUD",
    "exchangedate": "21.08.2026",
    "special": null
  },
  {
    "r030": 50,
    "txt": "Така",
    "rate": 0.36472,
    "cc": "BDT",
    "exchangedate": "21.08.2026",
    "special": null
  },
  {
    "r030": 124,
    "txt": "Канадський долар",
    "rate": 32.403,
    "cc": "CAD",
    "exchangedate": "21.08.2026",
    "special": null
  },
  {
    "r030": 156,
    "txt": "Юань Женьміньбі",
    "rate": 6.6349,
    "cc": "CNY",
    "exchangedate": "21.08.2026",
    "special": null
  },
  {
    "r030": 203,
    "txt": "Чеська крона",
    "rate": 2.1585,
    "cc": "CZK",
    "exchangedate": "21.08.2026",
    "special": null
  },
  {
    "r030": 208,
    "txt": "Данська крона",
    "rate": 6.9732,
    "cc": "DKK",
    "exchangedate": "21.08.2026",
    "special": null
  },
  {
    "r030": 344,
    "txt": "Гонконгівський долар",
    "rate": 5.688,
    "cc": "HKD",
    "exchangedate": "21.08.2026",
    "special": null
  },
  {
    "r030": 348,
    "txt": "Форинт",
    "rate": 0.142793,
    "cc": "HUF",
    "exchangedate": "21.08.2026",
    "special": null
  },
  {
    "r030": 356,
    "txt": "Індійська рупія",
    "rate": 0.46613,
    "cc": "INR",
    "exchangedate": "21.08.2026",
    "special": null
  },
  {
    "r030": 360,
    "txt": "Рупія",
    "rate": 0.0025141,
    "cc": "IDR",
    "exchangedate": "21.08.2026",
    "special": null
  },

Parameters

ParameterTypeRequiredDescription
jsonqueryRequiredPresence of this flag switches the response from XML to JSON. It takes no value. json
valcodequeryOptionalISO 4217 code to return a single currency instead of the full list. USD
datequeryOptionalDate in `YYYYMMDD` with no separators. Defaults to today. 20260820

Response fields

ccstring
ISO 4217 alphabetic currency code — the field to key on.
ratenumber
Hryvnia per one unit of the currency, as a JSON number.
r030integer
ISO 4217 numeric code, useful when joining against banking data that uses numeric codes.
txtstring
Currency name in Ukrainian. Display only.
exchangedatestring
Date the rate applies to, formatted `DD.MM.YYYY` — note this differs from the `date` parameter format.
specialnumber|null
Populated only for a handful of special drawing entries; null for ordinary currencies.

What you can build with the National Bank of Ukraine API

  • Convert hryvnia amounts using the official NBU rate for a booking date
  • Build a UAH currency widget that calls the API directly from the browser
  • Backfill a historical hryvnia series one working day at a time
  • Join banking records that carry ISO numeric codes via the `r030` field

Common errors and how to fix them

XML instead of JSON

The `json` flag was omitted.

Fix: Append `?json` or `&json`. It is a bare flag with no value, which some query-string builders drop.

Wrong day returned

`date` was sent as `2026-08-20`.

Fix: The parameter wants `20260820` with no dashes. Convert explicitly rather than reusing `exchangedate`, which uses a third format.

Empty array

No rates published for that date.

Fix: Weekends and Ukrainian public holidays have no publication; fall back to the previous working day.

National Bank of Ukraine API — frequently asked questions

Is the National Bank of Ukraine API free to use?

Yes. It is part of Ukraine's open data programme, requires no key or registration, and returns permissive CORS headers so browser code can call it directly.

How do I get a single currency instead of the whole list?

Add `valcode=USD` alongside the `json` flag. Without it the API returns every quoted currency, which is a small enough payload that filtering client-side is also reasonable.

What format does the date parameter take?

`YYYYMMDD` with no separators, for example `20260820`. The `exchangedate` field in the response uses `DD.MM.YYYY` instead, so the two need converting between.

How far back does the historical data go?

The directory serves official rates for past working days going back many years, one date per request. There is no bulk range parameter on this endpoint.

Tools that pair with this API

National Bank of Ukraine is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.