# National Bank of Romania API
> Live official reference exchange-rate data from the National Bank of Romania (BNR), the central bank of Romania, for the leu (RON): the BNR official reference rate for every published currency (normalised to one unit), a single currency's leu-per-unit rate and inverse, a currency's reference rate on a specific past date from the BNR yearly archive, and currency conversion between any two published currencies (including RON) cross-computed through the leu.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/bnr-api/..."
```

## Pricing
- **Free** (Free) — 11,000 calls/Mo, 3 req/s
- **Basic** ($7/Mo) — 163,000 calls/Mo, 8 req/s
- **Pro** ($18/Mo) — 1,020,000 calls/Mo, 15 req/s
- **Scale** ($51/Mo) — 5,350,000 calls/Mo, 35 req/s

## Endpoints

### Rates

#### `GET /v1/rate` — One currency leu-per-unit reference rate and inverse

**Parameters:**
- `currency` (query, required, string) — 3-letter ISO currency code Example: `USD`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bnr-api/v1/rate?currency=USD"
```

**Response:**
```json
{
    "data": {
        "base": "RON",
        "date": "2026-06-10",
        "source": "National Bank of Romania",
        "currency": "USD",
        "multiplier": 1,
        "ron_per_unit": 4.5286,
        "unit_per_ron": 0.2208188
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:46.920Z",
        "request_id": "7176b85b-c624-4407-a700-617c294ea237"
    },
    "status": "ok",
    "message": "Rate retrieved successfully",
    "success": true
}
```

#### `GET /v1/rates` — BNR reference rate for every currency vs the leu

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bnr-api/v1/rates"
```

**Response:**
```json
{
    "data": {
        "base": "RON",
        "date": "2026-06-10",
        "count": 37,
        "rates": [
            {
                "value": 1.233,
                "currency": "AED",
                "multiplier": 1,
                "ron_per_unit": 1.233
            },
            {
                "value": 3.1742,
                "currency": "AUD",
                "multiplier": 1,
                "ron_per_unit": 3.1742
            },
            {
                "value": 0.8757,
                "currency": "BRL",
                "multiplier": 1,
                "ron_per_unit": 0.8757
            },
            {
                "value": 3.2522,
                "currency": "CAD",
                "multiplier": 1,
                "ron_per_unit": 3.2522
            },
            {
                "value": 5.6717,
                "currency": "CHF",
                "multiplier": 1,
                "ron_per_unit": 5.6717
            },
            {
                "value": 0.6681,
                "currency": "CNY",
                "multiplier": 1,
                "ron_per_unit": 0.6681
            },
            {
                "value": 0.2165,
                "currency": "CZK",
                "multiplier": 1,
                "ron_per_unit": 0.2165
            },
            {
                "value": 0.7003,
                "currency": "DKK",
                "multiplier": 1,
                "ron_per_unit": 0.7003
            },
            {
                "value": 0.
…(truncated, see openapi.json for full schema)
```

### History

#### `GET /v1/history` — A currency reference rate on a specific past date

**Parameters:**
- `currency` (query, required, string) — 3-letter ISO currency code Example: `USD`
- `date` (query, required, string) — Date YYYY-MM-DD Example: `2026-05-15`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bnr-api/v1/history?currency=USD&date=2026-05-15"
```

**Response:**
```json
{
    "data": {
        "base": "RON",
        "date": "2026-05-15",
        "source": "National Bank of Romania",
        "currency": "USD",
        "multiplier": 1,
        "ron_per_unit": 4.4801,
        "unit_per_ron": 0.2232093
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:47.374Z",
        "request_id": "8474c075-4be7-4bfa-94ff-ecfe1d9d78a7"
    },
    "status": "ok",
    "message": "History retrieved successfully",
    "success": true
}
```

### Convert

#### `GET /v1/convert` — Convert an amount between two currencies at BNR rates

**Parameters:**
- `from` (query, required, string) — Source currency Example: `USD`
- `to` (query, required, string) — Target currency Example: `EUR`
- `amount` (query, optional, string) — Amount to convert Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bnr-api/v1/convert?from=USD&to=EUR&amount=100"
```

**Response:**
```json
{
    "data": {
        "to": "EUR",
        "date": "2026-06-10",
        "from": "USD",
        "rate": 0.86516124,
        "amount": 100,
        "result": 86.516124,
        "source": "National Bank of Romania",
        "ron_per_to": 5.2344,
        "ron_per_from": 4.5286
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:47.538Z",
        "request_id": "75086ad0-89e4-46c4-bda8-a68168863d0d"
    },
    "status": "ok",
    "message": "Conversion completed successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata and endpoint catalog

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bnr-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "source": "National Bank of Romania reference rate file (bnr.ro, live)",
        "service": "bnr-api",
        "usd_ron": 4.5286,
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/rate": "One currency's reference rate, leu-per-unit and inverse (currency=USD).",
            "GET /v1/rates": "The BNR reference rate for every currency vs the leu.",
            "GET /v1/convert": "Convert an amount between two currencies at BNR rates (from=USD, to=EUR, amount=100).",
            "GET /v1/history": "A currency's reference rate on a specific past date (currency=USD, date=2026-05-15)."
        },
        "description": "Live official reference exchange-rate data from the National Bank of Romania (BNR), the central bank of Romania, for the leu (RON), via its public daily rate file. The rates endpoint returns the BNR's official reference rate for every published currency against the leu, normalised to one unit; the rate endpoint returns a single currency's reference rate (leu-per-unit and the inverse); the history endpoint returns a currency's reference rate on a specific past date from the BNR's yearly archive; the convert endpoint converts an amount between any two published currencies (including RON) at the BNR's reference rates, cross-computed through the leu. Live, no key, nothing stored. Distinct from the ECB, SNB, NBU, HNB, NBG, NBRB, CBU, CBAR, BOI, NBK, BNM, NBT and other central-bank feeds and from market mid-ra
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/bnr-api
OpenAPI spec: https://www.oanor.com/api/bnr-api/openapi.json
