# Nepal Rastra Bank FX API
> Live official exchange-rate data for the Nepalese rupee (NPR) from Nepal Rastra Bank (NRB), the central bank of Nepal — straight from its public Foreign Exchange Rate API as clean JSON. Get the NRB's official buy and sell rate for every published currency against the rupee for the latest (or any past) day, normalised to one unit; pull a single currency's buy, sell and mid rate and the inverse; retrieve a currency's daily NRB buy/sell rate over a date range; convert an amount between any two quoted currencies (including NPR) at the NRB's mid rate; or list the NRB's quoted currencies. Read live from the NRB, nothing cached. Note the NRB quotes both a buy and a sell rate, and some currencies (such as the Indian rupee) are quoted per 100 units — every rate is also normalised to one unit for you. This is the official Nepalese-rupee central-bank rate — distinct from the ECB, BCRA, BCRP and other central-bank feeds and from market mid-rates: the NRB's own published rupee buy/sell rates.

## 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/nrb-api/..."
```

## Pricing
- **Free** (Free) — 500 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 24,000 calls/Mo, 8 req/s
- **Pro** ($22/Mo) — 120,000 calls/Mo, 20 req/s
- **Business** ($53/Mo) — 600,000 calls/Mo, 40 req/s

## Endpoints

### Rates

#### `GET /v1/rates` — NRB official buy/sell for every currency vs the rupee

**Parameters:**
- `date` (query, optional, string) — Day YYYY-MM-DD (defaults to latest) Example: `2026-06-09`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nrb-api/v1/rates?date=2026-06-09"
```

**Response:**
```json
{
    "data": {
        "base": "NPR",
        "date": "2026-06-09",
        "count": 22,
        "rates": [
            {
                "name": "UAE Dirham",
                "unit": 1,
                "buy_raw": 41.61,
                "currency": "AED",
                "sell_raw": 41.77,
                "npr_buy_per_unit": 41.61,
                "npr_mid_per_unit": 41.69,
                "npr_sell_per_unit": 41.77
            },
            {
                "name": "Australian Dollar",
                "unit": 1,
                "buy_raw": 108.12,
                "currency": "AUD",
                "sell_raw": 108.54,
                "npr_buy_per_unit": 108.12,
                "npr_mid_per_unit": 108.33,
                "npr_sell_per_unit": 108.54
            },
            {
                "name": "Bahrain Dinar",
                "unit": 1,
                "buy_raw": 405.3,
                "currency": "BHD",
                "sell_raw": 406.89,
                "npr_buy_per_unit": 405.3,
                "npr_mid_per_unit": 406.095,
                "npr_sell_per_unit": 406.89
            },
            {
                "name": "Canadian Dollar",
                "unit": 1,
                "buy_raw": 109.7,
                "currency": "CAD",
                "sell_raw": 110.13,
                "npr_buy_per_unit": 109.7,
                "npr_mid_per_unit": 109.915,
                "npr_sell_per_unit": 110.13
            },
            {
                "name": "Swiss Franc",
  
…(truncated, see openapi.json for full schema)
```

### Rate

#### `GET /v1/rate` — One currency's buy, sell, mid and inverse

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

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

**Response:**
```json
{
    "data": {
        "base": "NPR",
        "date": "2026-06-10",
        "name": "U.S. Dollar",
        "unit": 1,
        "source": "Nepal Rastra Bank",
        "buy_raw": 152.27,
        "currency": "USD",
        "sell_raw": 152.87,
        "unit_per_npr": 0.00655437,
        "npr_buy_per_unit": 152.27,
        "npr_mid_per_unit": 152.57,
        "npr_sell_per_unit": 152.87
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:06.758Z",
        "request_id": "7a8a083f-6100-4ff0-9ea1-f07adfdf34aa"
    },
    "status": "ok",
    "message": "Rate retrieved successfully",
    "success": true
}
```

### History

#### `GET /v1/history` — A currency's daily buy/sell rate over a date range

**Parameters:**
- `currency` (query, required, string) — ISO 4217 currency code Example: `USD`
- `from` (query, required, string) — Start date YYYY-MM-DD Example: `2026-06-01`
- `to` (query, required, string) — End date YYYY-MM-DD Example: `2026-06-08`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nrb-api/v1/history?currency=USD&from=2026-06-01&to=2026-06-08"
```

**Response:**
```json
{
    "data": {
        "to": "2026-06-08",
        "base": "NPR",
        "from": "2026-06-01",
        "count": 8,
        "source": "Nepal Rastra Bank",
        "history": [
            {
                "date": "2026-06-01",
                "npr_buy_per_unit": 151.71,
                "npr_mid_per_unit": 152.01,
                "npr_sell_per_unit": 152.31
            },
            {
                "date": "2026-06-02",
                "npr_buy_per_unit": 151.69,
                "npr_mid_per_unit": 151.99,
                "npr_sell_per_unit": 152.29
            },
            {
                "date": "2026-06-03",
                "npr_buy_per_unit": 152.13,
                "npr_mid_per_unit": 152.43,
                "npr_sell_per_unit": 152.73
            },
            {
                "date": "2026-06-04",
                "npr_buy_per_unit": 152.84,
                "npr_mid_per_unit": 153.14,
                "npr_sell_per_unit": 153.44
            },
            {
                "date": "2026-06-05",
                "npr_buy_per_unit": 152.96,
                "npr_mid_per_unit": 153.26,
                "npr_sell_per_unit": 153.56
            },
            {
                "date": "2026-06-06",
                "npr_buy_per_unit": 151.62,
                "npr_mid_per_unit": 151.92,
                "npr_sell_per_unit": 152.22
            },
            {
                "date": "2026-06-07",
                "npr_buy_per_unit": 151.62,
                "npr_mid_per_unit
…(truncated, see openapi.json for full schema)
```

### Convert

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

**Response:**
```json
{
    "data": {
        "to": "EUR",
        "date": "2026-06-10",
        "from": "USD",
        "rate": 0.86412551,
        "amount": 100,
        "result": 86.412551,
        "source": "Nepal Rastra Bank",
        "npr_per_to": 176.56,
        "npr_per_from": 152.57
    },
    "meta": {
        "timestamp": "2026-06-10T13:59:09.021Z",
        "request_id": "ac9a7e0f-1937-4b29-9a7f-f8bb3cd25453"
    },
    "status": "ok",
    "message": "Conversion completed successfully",
    "success": true
}
```

### Currencies

#### `GET /v1/currencies` — NRB list of quoted currencies

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

**Response:**
```json
{
    "data": {
        "count": 22,
        "source": "Nepal Rastra Bank",
        "currencies": [
            {
                "name": "UAE Dirham",
                "unit": 1,
                "currency": "AED"
            },
            {
                "name": "Australian Dollar",
                "unit": 1,
                "currency": "AUD"
            },
            {
                "name": "Bahrain Dinar",
                "unit": 1,
                "currency": "BHD"
            },
            {
                "name": "Canadian Dollar",
                "unit": 1,
                "currency": "CAD"
            },
            {
                "name": "Swiss Franc",
                "unit": 1,
                "currency": "CHF"
            },
            {
                "name": "Chinese Yuan",
                "unit": 1,
                "currency": "CNY"
            },
            {
                "name": "Danish Kroner",
                "unit": 1,
                "currency": "DKK"
            },
            {
                "name": "European Euro",
                "unit": 1,
                "currency": "EUR"
            },
            {
                "name": "UK Pound Sterling",
                "unit": 1,
                "currency": "GBP"
            },
            {
                "name": "Hong Kong Dollar",
                "unit": 1,
                "currency": "HKD"
            },
            {
                "name": "Indian Rupee",
                "unit": 100,

…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

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

**Response:**
```json
{
    "data": {
        "date": "2026-06-10",
        "source": "Nepal Rastra Bank Foreign Exchange Rate API (nrb.org.np, live)",
        "service": "nrb-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/rate": "One currency's buy, sell, mid and inverse (currency=USD).",
            "GET /v1/rates": "NRB official buy/sell for every currency vs the rupee (optional date=YYYY-MM-DD).",
            "GET /v1/convert": "Convert an amount between two currencies at NRB mid rates (from=USD, to=EUR, amount=100).",
            "GET /v1/history": "A currency's daily buy/sell rate over a date range (currency=USD, from=2026-06-01, to=2026-06-09).",
            "GET /v1/currencies": "NRB list of quoted currencies."
        },
        "description": "Live official exchange-rate data for the Nepalese rupee (NPR) from Nepal Rastra Bank (NRB), the central bank of Nepal, via its public Foreign Exchange Rate API. The rates endpoint returns the NRB's official buy and sell rate for every published currency against the rupee for the latest (or any past) day, normalised to one unit; the rate endpoint returns a single currency's buy, sell and mid rate and the inverse; the history endpoint returns a currency's daily NRB buy/sell rate over a date range; the convert endpoint converts an amount between any two quoted currencies (including NPR) at the NRB's mid rate; the currencies endpoint returns the NRB's list of quoted currencies. Live, no key, nothing stor
…(truncated, see openapi.json for full schema)
```


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