# Swissquote FX API
> Live real-time foreign-exchange and precious-metal quotes from Swissquote, the Swiss bank and broker, via its public BBO (best-bid-offer) price feed. Unlike a central bank's once-a-day reference fixing, this is a live dealing feed: for any currency pair it returns the current bid and ask with the spread, aggregated to the tightest available price across Swissquote's platforms. Get a pair's best bid, ask, mid and spread right now. Pull the full tiered breakdown — every platform and spread profile with its own bid, ask and spread, the data a broker uses to price clients. Convert any amount at the live mid rate. Get live gold, silver, platinum and palladium quotes against the dollar in one call. Live, no key, nothing stored. Distinct from central-bank and ECB daily-fixing FX APIs and from crypto feeds — this is a live broker bid/ask feed with real dealing spreads. Perfect for trading, pricing, remittance and treasury apps.

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

## Pricing
- **Free** (Free) — 12,000 calls/Mo, 3 req/s
- **Starter** ($8/Mo) — 165,000 calls/Mo, 8 req/s
- **Pro** ($25/Mo) — 930,000 calls/Mo, 20 req/s
- **Business** ($59/Mo) — 5,000,000 calls/Mo, 45 req/s

## Endpoints

### Quotes

#### `GET /v1/convert` — Convert at the live mid rate

**Parameters:**
- `base` (query, required, string) — Base currency Example: `EUR`
- `quote` (query, required, string) — Quote currency Example: `USD`
- `amount` (query, optional, string) — Amount to convert Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/swissquote-api/v1/convert?base=EUR&quote=USD&amount=100"
```

**Response:**
```json
{
    "data": {
        "ask": 1.15618,
        "bid": 1.15616,
        "base": "EUR",
        "note": "converted at the live mid rate",
        "rate": 1.15617,
        "quote": "USD",
        "amount": 100,
        "result": 115.617,
        "source": "Swissquote",
        "timestamp": "2026-06-10T14:02:41.341Z"
    },
    "meta": {
        "timestamp": "2026-06-10T14:02:41.528Z",
        "request_id": "d8526f8e-73bd-4d21-920e-51b6514fc143"
    },
    "status": "ok",
    "message": "Conversion completed successfully",
    "success": true
}
```

#### `GET /v1/quote` — Live best bid/ask/mid/spread

**Parameters:**
- `base` (query, required, string) — Base currency (3-letter) Example: `EUR`
- `quote` (query, required, string) — Quote currency (3-letter) Example: `USD`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/swissquote-api/v1/quote?base=EUR&quote=USD"
```

**Response:**
```json
{
    "data": {
        "ask": 1.15618,
        "bid": 1.15616,
        "mid": 1.15617,
        "base": "EUR",
        "quote": "USD",
        "source": "Swissquote",
        "spread": 2.0e-5,
        "timestamp": "2026-06-10T14:02:41.550Z",
        "instrument": "EUR/USD",
        "spread_pct": 0.00173
    },
    "meta": {
        "timestamp": "2026-06-10T14:02:41.669Z",
        "request_id": "edde2df0-f655-433a-b584-5b895a44a886"
    },
    "status": "ok",
    "message": "Quote retrieved successfully",
    "success": true
}
```

#### `GET /v1/spreads` — Per-platform tiered bid/ask breakdown

**Parameters:**
- `base` (query, required, string) — Base currency Example: `EUR`
- `quote` (query, required, string) — Quote currency Example: `USD`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/swissquote-api/v1/spreads?base=EUR&quote=USD"
```

**Response:**
```json
{
    "data": {
        "base": "EUR",
        "quote": "USD",
        "source": "Swissquote",
        "platforms": [
            {
                "server": "AT",
                "platform": "AT",
                "profiles": [
                    {
                        "ask": 1.15627,
                        "bid": 1.15608,
                        "profile": "standard",
                        "ask_spread": 0.85,
                        "bid_spread": 0.85
                    },
                    {
                        "ask": 1.15625,
                        "bid": 1.15609,
                        "profile": "premium",
                        "ask_spread": 0.7,
                        "bid_spread": 0.7
                    },
                    {
                        "ask": 1.15624,
                        "bid": 1.15611,
                        "profile": "prime",
                        "ask_spread": 0.55,
                        "bid_spread": 0.55
                    }
                ]
            },
            {
                "server": "Live5",
                "platform": "SwissquoteLtd",
                "profiles": [
                    {
                        "ask": 1.15625,
                        "bid": 1.1561,
                        "profile": "premium",
                        "ask_spread": 0.65,
                        "bid_spread": 0.65
                    },
                    {
                        "ask": 1.15623,
                        "b
…(truncated, see openapi.json for full schema)
```

### Metals

#### `GET /v1/metals` — Live gold/silver/platinum/palladium vs USD

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

**Response:**
```json
{
    "data": {
        "count": 4,
        "metals": [
            {
                "ask": 4173.182,
                "bid": 4172.678,
                "mid": 4172.93,
                "base": "XAU",
                "metal": "gold",
                "quote": "USD",
                "source": "Swissquote",
                "spread": 0.504,
                "symbol": "XAU",
                "timestamp": "2026-06-10T14:02:41.893Z",
                "instrument": "XAU/USD",
                "spread_pct": 0.012079
            },
            {
                "ask": 65.351,
                "bid": 65.3031,
                "mid": 65.32705,
                "base": "XAG",
                "metal": "silver",
                "quote": "USD",
                "source": "Swissquote",
                "spread": 0.0479,
                "symbol": "XAG",
                "timestamp": "2026-06-10T14:02:41.874Z",
                "instrument": "XAG/USD",
                "spread_pct": 0.07335
            },
            {
                "ask": 1696.662,
                "bid": 1693.438,
                "mid": 1695.05,
                "base": "XPT",
                "metal": "platinum",
                "quote": "USD",
                "source": "Swissquote",
                "spread": 3.224,
                "symbol": "XPT",
                "timestamp": "2026-06-10T14:02:41.892Z",
                "instrument": "XPT/USD",
                "spread_pct": 0.190382
            },
            {
                "ask": 1248.
…(truncated, see openapi.json for full schema)
```


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