# Central Bank of Türkiye FX API
> Live official exchange-rate data for the Turkish lira (TRY) from the Central Bank of the Republic of Türkiye (TCMB) — straight from its public daily rate XML as clean JSON. Unusually, the TCMB publishes four rates per currency: forex buying, forex selling, banknote buying and banknote selling. Get all of these for every published currency against the lira, for the latest or any past business day, normalised to one unit; pull a single currency's four rates, mid and the inverse; convert an amount between any two published currencies (including TRY) at the forex mid rate; or list the quoted currencies. Read live from the TCMB, nothing cached. This is the official Turkish-lira central-bank rate, with the forex/banknote split few other feeds expose — distinct from the ECB, BCRA, BCRP, NRB and other central-bank feeds and from market mid-rates: the TCMB's own lira 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/tcmb-api/..."
```

## Pricing
- **Free** (Free) — 550 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 25,000 calls/Mo, 8 req/s
- **Pro** ($24/Mo) — 125,000 calls/Mo, 20 req/s
- **Business** ($58/Mo) — 620,000 calls/Mo, 40 req/s

## Endpoints

### Rates

#### `GET /v1/rates` — TCMB forex + banknote buy/sell for every currency vs the lira

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

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

**Response:**
```json
{
    "data": {
        "base": "TRY",
        "date": "2026-06-09",
        "count": 22,
        "rates": [
            {
                "name": "UNITED ARAB EMIRATES DIRHAM",
                "unit": 1,
                "currency": "AED",
                "forex_mid": 12.5448,
                "forex_buying": 12.4633,
                "forex_selling": 12.6263,
                "banknote_buying": null,
                "banknote_selling": null
            },
            {
                "name": "AUSTRALIAN DOLLAR",
                "unit": 1,
                "currency": "AUD",
                "forex_mid": 32.50505,
                "forex_buying": 32.3994,
                "forex_selling": 32.6107,
                "banknote_buying": 32.2504,
                "banknote_selling": 32.8063
            },
            {
                "name": "AZERBAIJANI NEW MANAT",
                "unit": 1,
                "currency": "AZN",
                "forex_mid": 27.10255,
                "forex_buying": 26.9264,
                "forex_selling": 27.2787,
                "banknote_buying": null,
                "banknote_selling": null
            },
            {
                "name": "CANADIAN DOLLAR",
                "unit": 1,
                "currency": "CAD",
                "forex_mid": 33.0653,
                "forex_buying": 32.9909,
                "forex_selling": 33.1397,
                "banknote_buying": 32.8689,
                "banknote_selling": 33.2656
            },
         
…(truncated, see openapi.json for full schema)
```

### Rate

#### `GET /v1/rate` — One currency's four rates, mid and inverse

**Parameters:**
- `currency` (query, required, string) — ISO 4217 currency code Example: `USD`
- `date` (query, optional, string) — Business day YYYY-MM-DD Example: `2026-06-09`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/tcmb-api/v1/rate?currency=USD&date=2026-06-09"
```

**Response:**
```json
{
    "data": {
        "base": "TRY",
        "date": "2026-06-09",
        "name": "US DOLLAR",
        "unit": 1,
        "source": "Türkiye Cumhuriyet Merkez Bankası (TCMB)",
        "currency": "USD",
        "forex_mid": 46.0743,
        "forex_buying": 46.0328,
        "try_per_unit": 46.0743,
        "unit_per_try": 0.02170407,
        "forex_selling": 46.1158,
        "banknote_buying": 46.0006,
        "banknote_selling": 46.185
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:46.306Z",
        "request_id": "10e3022c-aefa-4c4d-beb9-24f3339ea87b"
    },
    "status": "ok",
    "message": "Rate retrieved successfully",
    "success": true
}
```

### Convert

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

**Response:**
```json
{
    "data": {
        "to": "EUR",
        "date": "2026-06-10",
        "from": "USD",
        "rate": 0.86576973,
        "amount": 100,
        "result": 86.576973,
        "source": "Türkiye Cumhuriyet Merkez Bankası (TCMB)",
        "try_per_to": 53.2365,
        "try_per_from": 46.09055
    },
    "meta": {
        "timestamp": "2026-06-10T22:58:46.481Z",
        "request_id": "dd9bec46-7966-4ba4-99ff-4998a0f840d6"
    },
    "status": "ok",
    "message": "Conversion completed successfully",
    "success": true
}
```

### Currencies

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

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

**Response:**
```json
{
    "data": {
        "count": 22,
        "source": "Türkiye Cumhuriyet Merkez Bankası (TCMB)",
        "currencies": [
            {
                "name": "UNITED ARAB EMIRATES DIRHAM",
                "unit": 1,
                "currency": "AED"
            },
            {
                "name": "AUSTRALIAN DOLLAR",
                "unit": 1,
                "currency": "AUD"
            },
            {
                "name": "AZERBAIJANI NEW MANAT",
                "unit": 1,
                "currency": "AZN"
            },
            {
                "name": "CANADIAN DOLLAR",
                "unit": 1,
                "currency": "CAD"
            },
            {
                "name": "SWISS FRANK",
                "unit": 1,
                "currency": "CHF"
            },
            {
                "name": "CHINESE RENMINBI",
                "unit": 1,
                "currency": "CNY"
            },
            {
                "name": "DANISH KRONE",
                "unit": 1,
                "currency": "DKK"
            },
            {
                "name": "EURO",
                "unit": 1,
                "currency": "EUR"
            },
            {
                "name": "POUND STERLING",
                "unit": 1,
                "currency": "GBP"
            },
            {
                "name": "JAPENESE YEN",
                "unit": 100,
                "currency": "JPY"
            },
            {
                "name": "SOUTH
…(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/tcmb-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "date": "2026-06-10",
        "source": "TCMB daily exchange-rate XML (tcmb.gov.tr, live)",
        "service": "tcmb-api",
        "usd_try": 46.132,
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/rate": "One currency's four rates, mid and inverse (currency=USD).",
            "GET /v1/rates": "TCMB forex + banknote buy/sell for every currency vs the lira (optional date=YYYY-MM-DD).",
            "GET /v1/convert": "Convert an amount between two currencies at TCMB forex mid rates (from=USD, to=EUR, amount=100).",
            "GET /v1/currencies": "TCMB list of quoted currencies."
        },
        "description": "Live official exchange-rate data for the Turkish lira (TRY) from the Central Bank of the Republic of Türkiye (TCMB), via its public daily rate XML. The TCMB publishes four rates per currency — forex buying, forex selling, banknote buying and banknote selling. The rates endpoint returns all of these for every published currency against the lira, for the latest or any past business day, normalised to one unit; the rate endpoint returns one currency's four rates and the inverse; the convert endpoint converts an amount between any two published currencies (including TRY) at the forex mid rate; the currencies endpoint lists the quoted currencies. Live, no key, nothing stored. Distinct from the ECB, BCRA, BCRP, NRB and other central-bank feeds and from market mid-rates — this is the TCMB's own forex a
…(truncated, see openapi.json for full schema)
```


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