# Turkey Market API
> Live Turkish market prices for the lira (TRY): foreign currencies, the famous Turkish gold market (gram, quarter/half/full and Republic coins, 14/18/22-carat, silver) and key market instruments (the BIST 100 index, Bitcoin in lira, Brent crude and the gold ounce). Turkey's high-inflation economy makes physical gold a primary store of value, and the gram-altın and coin prices quoted here are what the bazaar trades on. The currencies endpoint returns every foreign currency against the lira with buy/sell and daily change; the gold endpoint returns the full Turkish gold/silver market; the quote endpoint returns any single instrument by code (also BIST 100, Bitcoin, Brent); the convert endpoint converts between any currency and the lira. Read live, nothing stored. This is Turkey's own live market FX + gold-bazaar layer — distinct from the central bank's official reference 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/turkey-api/..."
```

## Pricing
- **Free** (Free) — 3,000 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 75,000 calls/Mo, 12 req/s
- **Pro** ($22/Mo) — 380,000 calls/Mo, 35 req/s
- **Scale** ($50/Mo) — 2,400,000 calls/Mo, 110 req/s

## Endpoints

### Quote

#### `GET /v1/quote` — Any single instrument by code

**Parameters:**
- `symbol` (query, required, string) — Instrument code (usd, gram, bist100, btc, brent …) Example: `gram`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/turkey-api/v1/quote?symbol=gram"
```

### Currencies

#### `GET /v1/currencies` — Every foreign currency vs the lira

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

### Gold

#### `GET /v1/gold` — Full Turkish gold & silver market

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

### Convert

#### `GET /v1/convert` — Convert between any currency and the lira

**Parameters:**
- `amount` (query, required, string) — Amount to convert Example: `100`
- `from` (query, optional, string) — From currency code Example: `USD`
- `to` (query, optional, string) — To currency code Example: `TRY`

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

### Meta

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

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

**Response:**
```json
{
    "data": {
        "note": "Prices in TRY; buy = Buying, sell = Selling. quote also serves BIST100 (XU100), Bitcoin (DBITCOIN) and Brent.",
        "source": "finans.truncgil.com (Turkish market feed, live)",
        "service": "turkey-api",
        "usd_try": null,
        "endpoints": {
            "GET /v1/gold": "Full Turkish gold & silver market (gram, coins, carat bars, silver, ounce).",
            "GET /v1/meta": "This document.",
            "GET /v1/quote": "Any single instrument by code (symbol=usd, gram, bist100, btc, brent …).",
            "GET /v1/convert": "Convert between any currency and the lira (amount=100, from=USD, to=TRY).",
            "GET /v1/currencies": "Every foreign currency vs the lira with buy/sell and daily change."
        },
        "description": "Live Turkish market prices for the lira (TRY): foreign currencies, the famous Turkish gold market (gram, quarter/half/full and Republic coins, 14/18/22-carat, silver) and key instruments (BIST 100 index, Bitcoin in lira, Brent crude, gold ounce). Turkey's high-inflation economy makes physical gold a primary store of value, and the gram-altın and coin prices quoted here are what the bazaar trades on. The currencies endpoint returns every foreign currency against the lira with buy/sell and daily change; the gold endpoint returns the full Turkish gold/silver market; the quote endpoint returns any single instrument by code; the convert endpoint converts between any currency and the lira. Live,
…(truncated, see openapi.json for full schema)
```


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