# Central Bank of Bosnia and Herzegovina (CBBH) FX API
> Official convertible-mark (BAM) exchange rates from the Central Bank of Bosnia and Herzegovina (CBBH), with no key. Get the latest official buy/middle/sell rate for every quoted currency, a single-currency rate, a currency converter and the list of quoted currencies. The bank publishes a unit count (1 or 100) per currency, so every rate is normalised to a per-unit BAM value (middle ÷ units) and conversions are correct. The BAM is pegged to the euro at 1.95583. The Bosnia-FX layer for treasury, pricing and FX dashboards.

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

## Pricing
- **Free** (Free) — 1,300 calls/Mo, 2 req/s
- **Basic** ($8/Mo) — 39,800 calls/Mo, 5 req/s
- **Pro** ($25/Mo) — 161,000 calls/Mo, 14 req/s
- **Business** ($54/Mo) — 668,000 calls/Mo, 38 req/s

## Endpoints

### FX

#### `GET /v1/convert` — Convert an amount between two currencies via BAM

**Parameters:**
- `from` (query, required, string) — Source ISO code (or BAM) Example: `USD`
- `to` (query, required, string) — Target ISO code (or BAM) Example: `BAM`
- `amount` (query, optional, string) — Amount to convert Example: `100`

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

**Response:**
```json
{
    "data": {
        "to": "BAM",
        "base": "BAM",
        "date": "2026-06-13",
        "from": "USD",
        "rate": 1.690871,
        "amount": 100,
        "result": 169.0871
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:31.772Z",
        "request_id": "0775f202-fade-4f23-8f01-6c06a9ed3e6d"
    },
    "status": "ok",
    "message": "Conversion retrieved successfully",
    "success": true
}
```

#### `GET /v1/currencies` — All currencies quoted by the CBBH

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

**Response:**
```json
{
    "data": {
        "base": "BAM",
        "date": "2026-06-13",
        "count": 17,
        "currencies": [
            "AUD",
            "CAD",
            "CHF",
            "CNY",
            "CZK",
            "DKK",
            "EUR",
            "GBP",
            "HUF",
            "JPY",
            "NOK",
            "RSD",
            "RUB",
            "SEK",
            "TRY",
            "USD",
            "XDR"
        ]
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:31.866Z",
        "request_id": "95764784-fc85-47b1-9c6c-e04b0041d4e6"
    },
    "status": "ok",
    "message": "Currencies retrieved successfully",
    "success": true
}
```

#### `GET /v1/latest` — Latest official BAM rates (all or selected)

**Parameters:**
- `symbols` (query, optional, string) — Comma-separated ISO codes Example: `EUR,USD,GBP`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bosnia-fx-api/v1/latest?symbols=EUR%2CUSD%2CGBP"
```

**Response:**
```json
{
    "data": {
        "base": "BAM",
        "date": "2026-06-13",
        "count": 3,
        "rates": [
            {
                "buy": 1.95583,
                "iso": "EUR",
                "sell": 1.95583,
                "units": 1,
                "middle": 1.95583,
                "country": "EMU",
                "per_unit_bam": 1.95583
            },
            {
                "buy": 2.260519,
                "iso": "GBP",
                "sell": 2.271849,
                "units": 1,
                "middle": 2.266184,
                "country": "G.Britain",
                "per_unit_bam": 2.266184
            },
            {
                "buy": 1.686644,
                "iso": "USD",
                "sell": 1.695098,
                "units": 1,
                "middle": 1.690871,
                "country": "USA",
                "per_unit_bam": 1.690871
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:32.002Z",
        "request_id": "34ec0637-f76d-45e8-b5f8-a59cb6166c7a"
    },
    "status": "ok",
    "message": "Latest rates retrieved successfully",
    "success": true
}
```

#### `GET /v1/rate` — Single-currency BAM rate

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

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bosnia-fx-api/v1/rate?symbol=EUR"
```

**Response:**
```json
{
    "data": {
        "buy": 1.95583,
        "iso": "EUR",
        "base": "BAM",
        "date": "2026-06-13",
        "sell": 1.95583,
        "units": 1,
        "middle": 1.95583,
        "country": "EMU",
        "per_unit_bam": 1.95583
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:32.087Z",
        "request_id": "af15f991-2e13-42fb-ab90-c24854f05cc2"
    },
    "status": "ok",
    "message": "Rate retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Bank metadata & endpoint guide

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

**Response:**
```json
{
    "data": {
        "bank": "Central Bank of Bosnia and Herzegovina (CBBH)",
        "note": "per_unit_bam = middle / units; the BAM (convertible mark) is pegged to the euro at 1.95583. Conversions are correct even when a currency is quoted per 100 units.",
        "source": "CBBH XML feed (cbbh.ba/CurrencyExchange/GetXml), keyless",
        "country": "Bosnia and Herzegovina",
        "examples": {
            "rate": "/v1/rate?symbol=USD",
            "latest": "/v1/latest?symbols=EUR,USD,GBP",
            "convert": "/v1/convert?from=USD&to=BAM&amount=100",
            "currencies": "/v1/currencies"
        },
        "endpoints": {
            "/v1/rate": "single-currency rate with buy/middle/sell, units and per-unit BAM value (symbol=EUR)",
            "/v1/latest": "latest official BAM buy/middle/sell rates for all (or selected) currencies (symbols optional)",
            "/v1/convert": "convert an amount between any two quoted currencies via BAM (from, to, amount)",
            "/v1/currencies": "all currencies quoted by the CBBH"
        },
        "cache_ttl_ms": 300000,
        "base_currency": "BAM"
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:32.175Z",
        "request_id": "d7098ac0-e3e3-4f56-afee-1e3b3b2de301"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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