# National Bank of Moldova API
> Live official exchange-rate data from the National Bank of Moldova (BNM), the central bank of the Republic of Moldova, for the Moldovan leu (MDL): the BNM official rate for every published currency (normalised to one unit), a single currency's leu-per-unit rate and inverse, a currency's official rate on a specific past date, and currency conversion between any two published currencies (including MDL) 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/bnm-api/..."
```

## Pricing
- **Free** (Free) — 13,000 calls/Mo, 3 req/s
- **Basic** ($7/Mo) — 168,000 calls/Mo, 8 req/s
- **Pro** ($18/Mo) — 1,030,000 calls/Mo, 15 req/s
- **Scale** ($48/Mo) — 5,450,000 calls/Mo, 35 req/s

## Endpoints

### Rates

#### `GET /v1/rate` — One currency leu-per-unit 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/bnm-api/v1/rate?currency=USD"
```

**Response:**
```json
{
    "data": {
        "base": "MDL",
        "date": "2026-06-10",
        "name": "US Dollar",
        "source": "National Bank of Moldova",
        "nominal": 1,
        "currency": "USD",
        "code_numeric": 840,
        "mdl_per_unit": 17.3528,
        "unit_per_mdl": 0.05762759
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:59.439Z",
        "request_id": "6a1e27ed-b123-486e-99af-d3cbc511ca95"
    },
    "status": "ok",
    "message": "Rate retrieved successfully",
    "success": true
}
```

#### `GET /v1/rates` — BNM official rate for every currency vs the leu

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

**Response:**
```json
{
    "data": {
        "base": "MDL",
        "date": "2026-06-10",
        "count": 40,
        "rates": [
            {
                "name": "U.A.E. Dirham",
                "value": 4.7244,
                "nominal": 1,
                "currency": "AED",
                "code_numeric": 784,
                "mdl_per_unit": 4.7244
            },
            {
                "name": "Albanian lek",
                "value": 2.1067,
                "nominal": 10,
                "currency": "ALL",
                "code_numeric": 8,
                "mdl_per_unit": 0.21067
            },
            {
                "name": "Armenian Dram",
                "value": 0.4705,
                "nominal": 10,
                "currency": "AMD",
                "code_numeric": 51,
                "mdl_per_unit": 0.04705
            },
            {
                "name": "Australian Dollar",
                "value": 12.2459,
                "nominal": 1,
                "currency": "AUD",
                "code_numeric": 36,
                "mdl_per_unit": 12.2459
            },
            {
                "name": "Azerbaijanian Manat",
                "value": 10.2074,
                "nominal": 1,
                "currency": "AZN",
                "code_numeric": 944,
                "mdl_per_unit": 10.2074
            },
            {
                "name": "Belarussian Ruble",
                "value": 6.2729,
                "nominal": 1,
                "currency": "BYN",
 
…(truncated, see openapi.json for full schema)
```

### History

#### `GET /v1/history` — A currency official 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/bnm-api/v1/history?currency=USD&date=2026-05-15"
```

**Response:**
```json
{
    "data": {
        "base": "MDL",
        "date": "2026-05-15",
        "name": "US Dollar",
        "source": "National Bank of Moldova",
        "nominal": 1,
        "currency": "USD",
        "mdl_per_unit": 17.2084,
        "unit_per_mdl": 0.05811116
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:59.773Z",
        "request_id": "f8a22203-fa60-4593-988c-4c686f0e0172"
    },
    "status": "ok",
    "message": "History retrieved successfully",
    "success": true
}
```

### Convert

#### `GET /v1/convert` — Convert an amount between two currencies at BNM 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/bnm-api/v1/convert?from=USD&to=EUR&amount=100"
```

**Response:**
```json
{
    "data": {
        "to": "EUR",
        "date": "2026-06-10",
        "from": "USD",
        "rate": 0.86460093,
        "amount": 100,
        "result": 86.460093,
        "source": "National Bank of Moldova",
        "mdl_per_to": 20.0703,
        "mdl_per_from": 17.3528
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:59.935Z",
        "request_id": "0c2c70ee-11b2-4c79-b6da-6891215af49a"
    },
    "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/bnm-api/v1/meta"
```

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


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