Exchange rate API

The rates published by the BNR and by the ECB, as JSON: free, no key, no registration.

  • GET
  • JSON
  • UTF-8
  • CORS
  • v1
  • free
  • no key

Base URL https://b24.ro/api/v1

Rules

  1. The base address is https://b24.ro/api/v1. Every request is a GET and every response is JSON (UTF-8). Requests from browsers are allowed from any origin (CORS).
  2. Limit per IP address: bursts of 60 requests, then 60 per minute. Every response carries the RateLimit-Limit and RateLimit-Remaining headers; over the limit the response is 429, with a Retry-After header.
  3. Rates change once per banking day. Keep responses locally and honour the Cache-Control header instead of repeating the same request.
  4. If you display the data, name its source: the National Bank of Romania or the European Central Bank.

The rates of a day

GET /api/v1/rates

The rates in effect on a date: those published that day or, on weekends and holidays, the last ones published before it.

Parameters
ParameterMeaning
dateThe date (YYYY-MM-DD). Default: the latest published day. The earliest is 2005-01-03; a date in the future is rejected.
sourceThe source: bnr (default; RON for one unit or for 100 units of each currency) or ecb (units of each currency for 1 euro).
currenciesOnly these currencies: three-letter codes separated by commas, for example EUR,USD. Default: all.
Example
$ curl "https://b24.ro/api/v1/rates?date=2026-09-18&currencies=EUR,USD,HUF"
ResponseHTTP 200 · application/json
{
  "source": "BNR",
  "quote_currency": "RON",
  "date": "2026-09-18",
  "requested_date": "2026-09-18",
  "rates": {
    "EUR": {
      "rate": 5.2644,
      "multiplier": 1,
      "unit_rate": 5.2644
    },
    "HUF": {
      "rate": 1.4472,
      "multiplier": 100,
      "unit_rate": 0.014472
    },
    "USD": {
      "rate": 4.5839,
      "multiplier": 1,
      "unit_rate": 4.5839
    }
  }
}

Conversion

GET /api/v1/convert

Converts an amount from one currency to another with exact arithmetic. The result is rounded as on the site: two decimals from 1 upwards, four significant digits below 1.

Parameters
ParameterMeaning
fromThe currency to convert from, a three-letter code (required).
toThe currency to convert to, a three-letter code (required).
amountThe amount, with a decimal point, for example 100 or 99.50. Default 1.
dateThe date (YYYY-MM-DD). Default: the latest published day. The earliest is 2005-01-03; a date in the future is rejected.
sourceThe source: bnr (default; RON for one unit or for 100 units of each currency) or ecb (units of each currency for 1 euro).
Example
$ curl "https://b24.ro/api/v1/convert?from=EUR&to=RON&amount=100&date=2026-09-18"
ResponseHTTP 200 · application/json
{
  "source": "BNR",
  "date": "2026-09-18",
  "requested_date": "2026-09-18",
  "from": "EUR",
  "to": "RON",
  "amount": 100,
  "rate": 5.2644,
  "result": 526.44,
  "basis": "direct"
}

Console

Send a real request to the API from this page: the answer received appears below, with its time. Without JavaScript, the form opens the JSON answer.

GET https://b24.ro/api/v1/convert?from=EUR&to=RON&amount=100&date=2026-09-18HTTP 200 · application/json
{
  "source": "BNR",
  "date": "2026-09-18",
  "requested_date": "2026-09-18",
  "from": "EUR",
  "to": "RON",
  "amount": 100,
  "rate": 5.2644,
  "result": 526.44,
  "basis": "direct"
}

Errors

An error has the fitting HTTP status and a JSON body shaped like {"error":{"code":"…","message":"…"}}. Messages are in English; programs should rely on the code field.

Errors
HTTPCodeWhen
400invalid_queryThe query string cannot be parsed.
400invalid_dateThe date is not YYYY-MM-DD or is given twice.
400date_in_futureThe requested date is after tomorrow.
404no_rates_for_dateThe date is before the first day of the history.
400invalid_sourceThe source is neither bnr nor ecb.
400invalid_currencyA currency code is missing or is not three letters.
400invalid_amountThe amount is not a positive number with a decimal point, or is too large.
404currency_not_quotedThe currency has no rate at the requested source and date.
429rate_limitedToo many requests; see the Retry-After header.
503data_incompleteThe history around the requested date is not fully imported yet.
503no_dataRates are not loaded yet; try again in a minute.
404not_foundThe address is not an endpoint of the API.