# Central Bank of Azerbaijan API
> Live official exchange-rate data from the Central Bank of the Republic of Azerbaijan (CBAR), the central bank of Azerbaijan, for the Azerbaijani manat (AZN) — uniquely also publishing official bank metal prices: the CBAR official rate for every published currency (normalised to one unit), a single currency's manat-per-unit rate and inverse, the official price of gold, silver, platinum and palladium per troy ounce in manat, and currency conversion between any two published currencies (including AZN) cross-computed through the manat.

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

## Pricing
- **Free** (Free) — 12,000 calls/Mo, 3 req/s
- **Basic** ($6/Mo) — 166,000 calls/Mo, 8 req/s
- **Pro** ($22/Mo) — 1,040,000 calls/Mo, 12 req/s
- **Scale** ($52/Mo) — 5,450,000 calls/Mo, 30 req/s

## Endpoints

### Rates

#### `GET /v1/rate` — One currency manat-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/cbar-api/v1/rate?currency=USD"
```

**Response:**
```json
{
    "data": {
        "base": "AZN",
        "date": "2026-06-10",
        "name": "1 ABŞ dolları",
        "source": "Central Bank of Azerbaijan",
        "nominal": 1,
        "currency": "USD",
        "azn_per_unit": 1.7,
        "unit_per_azn": 0.58823529
    },
    "meta": {
        "timestamp": "2026-06-10T14:00:19.735Z",
        "request_id": "b97a7ae7-75cc-401e-8ddb-770d98048970"
    },
    "status": "ok",
    "message": "Rate retrieved successfully",
    "success": true
}
```

#### `GET /v1/rates` — CBAR official rate for every currency vs the manat

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

**Response:**
```json
{
    "data": {
        "base": "AZN",
        "date": "2026-06-10",
        "count": 38,
        "rates": [
            {
                "name": "1 BƏƏ dirhəmi",
                "rate": 0.4628,
                "nominal": 1,
                "currency": "AED",
                "azn_per_unit": 0.4628
            },
            {
                "name": "1 Avstraliya dolları",
                "rate": 1.1929,
                "nominal": 1,
                "currency": "AUD",
                "azn_per_unit": 1.1929
            },
            {
                "name": "1 Belarus rublu",
                "rate": 0.6223,
                "nominal": 1,
                "currency": "BYN",
                "azn_per_unit": 0.6223
            },
            {
                "name": "1 Kanada dolları",
                "rate": 1.2188,
                "nominal": 1,
                "currency": "CAD",
                "azn_per_unit": 1.2188
            },
            {
                "name": "1 İsveçrə frankı",
                "rate": 2.1273,
                "nominal": 1,
                "currency": "CHF",
                "azn_per_unit": 2.1273
            },
            {
                "name": "1 Çin yuanı",
                "rate": 0.2509,
                "nominal": 1,
                "currency": "CNY",
                "azn_per_unit": 0.2509
            },
            {
                "name": "1 Çexiya kronu",
                "rate": 0.0812,
                "nominal": 1,
            
…(truncated, see openapi.json for full schema)
```

### Metals

#### `GET /v1/metals` — Official gold, silver, platinum and palladium prices in manat

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

**Response:**
```json
{
    "data": {
        "base": "AZN",
        "date": "2026-06-10",
        "count": 4,
        "metals": [
            {
                "code": "XAG",
                "unit": "troy ounce",
                "metal": "Silver",
                "azn_per_ounce": 107.8813
            },
            {
                "code": "XAU",
                "unit": "troy ounce",
                "metal": "Gold",
                "azn_per_ounce": 7096.1485
            },
            {
                "code": "XPD",
                "unit": "troy ounce",
                "metal": "Palladium",
                "azn_per_ounce": 2041.598
            },
            {
                "code": "XPT",
                "unit": "troy ounce",
                "metal": "Platinum",
                "azn_per_ounce": 2817.393
            }
        ],
        "source": "Central Bank of Azerbaijan"
    },
    "meta": {
        "timestamp": "2026-06-10T14:00:20.192Z",
        "request_id": "8d0ddb16-f99b-4d16-b6fa-91fdaadc33a9"
    },
    "status": "ok",
    "message": "Metals retrieved successfully",
    "success": true
}
```

### Convert

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

**Response:**
```json
{
    "data": {
        "to": "EUR",
        "date": "2026-06-10",
        "from": "USD",
        "rate": 0.86610964,
        "amount": 100,
        "result": 86.610964,
        "source": "Central Bank of Azerbaijan",
        "azn_per_to": 1.9628,
        "azn_per_from": 1.7
    },
    "meta": {
        "timestamp": "2026-06-10T14:00:20.412Z",
        "request_id": "76b70237-96fb-4abe-b480-0a1e3c47b35b"
    },
    "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/cbar-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "source": "Central Bank of Azerbaijan daily rate file (cbar.az, live)",
        "service": "cbar-api",
        "usd_azn": 1.7,
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/rate": "One currency's official rate, manat-per-unit and inverse (currency=USD).",
            "GET /v1/rates": "The CBAR official rate for every currency vs the manat.",
            "GET /v1/metals": "Official gold, silver, platinum and palladium prices per troy ounce in manat.",
            "GET /v1/convert": "Convert an amount between two currencies at CBAR rates (from=USD, to=EUR, amount=100)."
        },
        "description": "Live official exchange-rate data from the Central Bank of the Republic of Azerbaijan (CBAR), the central bank of Azerbaijan, for the Azerbaijani manat (AZN), via its public daily rate file — uniquely also publishing official bank metal prices. The rates endpoint returns the CBAR's official rate for every published currency against the manat, normalised to one unit; the rate endpoint returns a single currency's official rate (manat-per-unit and the inverse); the metals endpoint returns the official price of gold, silver, platinum and palladium per troy ounce in manat; the convert endpoint converts an amount between any two published currencies (including AZN) at the CBAR's official rates, cross-computed through the manat. Live, no key, nothing stored. Distinct from the ECB, SNB, NBU, HNB, NBG, NBRB, CBU and ot
…(truncated, see openapi.json for full schema)
```


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