# Swiss National Bank (SNB) FX & Rates API
> Live official Swiss monetary data, served straight from the Swiss National Bank's open data portal — no key, nothing cached. The Swiss franc is one of the world's premier safe-haven and reserve currencies, and this exposes the SNB's own published numbers as clean JSON. The rates endpoint returns the SNB foreign-exchange fixing — the monthly-average value in francs of around 25 world currencies (the euro fixed near 0.92 francs in mid-2026), each normalised to the franc value of a single unit. The currency endpoint returns one currency's franc rate with its recent history. The policy-rate endpoint returns the SNB policy rate, the headline interest rate the Swiss National Bank sets to steer the economy, with its history. The saron endpoint returns SARON, the Swiss Average Rate Overnight — the franc benchmark that replaced CHF LIBOR and underpins Swiss financial contracts — with its recent path. Everything is the central bank's own published data, live, nothing stored; figures are monthly. This is the Swiss franc rates-and-FX layer for any forex, treasury, payments or macro app exposed to Switzerland. Distinct from the ECB, Fed, Bank of Canada, Norges Bank, Bank of England, Brazil, Poland and Czech central-bank APIs — this is the franc, the SNB policy rate and SARON. 5 endpoints, no key on our side.

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

## Pricing
- **Free** (Free) — 1,800 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 28,000 calls/Mo, 6 req/s
- **Pro** ($22/Mo) — 160,000 calls/Mo, 15 req/s
- **Mega** ($54/Mo) — 880,000 calls/Mo, 40 req/s

## Endpoints

### SNB

#### `GET /v1/currency` — One currency CHF rate + history

**Parameters:**
- `code` (query, required, string) — Currency code Example: `EUR`
- `history` (query, optional, string) — Number of past months (default 12) Example: `6`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/snb-api/v1/currency?code=EUR&history=6"
```

**Response:**
```json
{
    "data": {
        "base": "CHF",
        "code": "EUR",
        "date": "2026-05",
        "label": "Europe - EUR 1",
        "amount": 1,
        "source": "Schweizerische Nationalbank",
        "history": [
            {
                "date": "2025-12",
                "value_chf": 0.93313,
                "unit_rate_chf": 0.93313
            },
            {
                "date": "2026-01",
                "value_chf": 0.92732,
                "unit_rate_chf": 0.92732
            },
            {
                "date": "2026-02",
                "value_chf": 0.91406,
                "unit_rate_chf": 0.91406
            },
            {
                "date": "2026-03",
                "value_chf": 0.90912,
                "unit_rate_chf": 0.90912
            },
            {
                "date": "2026-04",
                "value_chf": 0.92116,
                "unit_rate_chf": 0.92116
            },
            {
                "date": "2026-05",
                "value_chf": 0.91503,
                "unit_rate_chf": 0.91503
            }
        ],
        "frequency": "monthly average",
        "value_chf": 0.91503,
        "unit_rate_chf": 0.91503
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:14.793Z",
        "request_id": "bfda0658-392c-474a-a14e-f521cbcc9e93"
    },
    "status": "ok",
    "message": "Currency retrieved successfully",
    "success": true
}
```

#### `GET /v1/policy_rate` — SNB policy rate

**Parameters:**
- `history` (query, optional, string) — Number of past months (default 12) Example: `6`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/snb-api/v1/policy_rate?history=6"
```

**Response:**
```json
{
    "data": {
        "date": "2026-04",
        "unit": "% per year",
        "source": "Schweizerische Nationalbank",
        "country": "Switzerland",
        "history": [
            {
                "date": "2025-11",
                "rate_pct": 0
            },
            {
                "date": "2025-12",
                "rate_pct": 0
            },
            {
                "date": "2026-01",
                "rate_pct": 0
            },
            {
                "date": "2026-02",
                "rate_pct": 0
            },
            {
                "date": "2026-03",
                "rate_pct": 0
            },
            {
                "date": "2026-04",
                "rate_pct": 0
            }
        ],
        "rate_pct": 0,
        "frequency": "monthly",
        "indicator": "SNB policy rate"
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:15.006Z",
        "request_id": "4d6fea79-10bb-4941-b58a-07356030a008"
    },
    "status": "ok",
    "message": "Policy rate retrieved successfully",
    "success": true
}
```

#### `GET /v1/rates` — SNB FX fixing (all currencies in CHF)

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

**Response:**
```json
{
    "data": {
        "base": "CHF",
        "note": "value_chf = CHF per `amount` units; unit_rate_chf = CHF per 1 unit of the currency",
        "as_of": "2026-05",
        "count": 26,
        "rates": [
            {
                "code": "ARS",
                "date": "2026-05",
                "amount": 1,
                "value_chf": 0.00056,
                "unit_rate_chf": 0.00056
            },
            {
                "code": "AUD",
                "date": "2026-05",
                "amount": 1,
                "value_chf": 0.56248,
                "unit_rate_chf": 0.56248
            },
            {
                "code": "BRL",
                "date": "2026-05",
                "amount": 100,
                "value_chf": 15.74908,
                "unit_rate_chf": 0.157491
            },
            {
                "code": "CAD",
                "date": "2026-05",
                "amount": 1,
                "value_chf": 0.57107,
                "unit_rate_chf": 0.57107
            },
            {
                "code": "CNY",
                "date": "2026-05",
                "amount": 100,
                "value_chf": 11.52706,
                "unit_rate_chf": 0.115271
            },
            {
                "code": "CZK",
                "date": "2026-05",
                "amount": 100,
                "value_chf": 3.76308,
                "unit_rate_chf": 0.037631
            },
            {
                "code": "DKK",
                "
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/saron` — SARON overnight benchmark

**Parameters:**
- `history` (query, optional, string) — Number of past months (default 12) Example: `6`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/snb-api/v1/saron?history=6"
```

**Response:**
```json
{
    "data": {
        "date": "2026-05",
        "unit": "% per year",
        "source": "Schweizerische Nationalbank",
        "country": "Switzerland",
        "history": [
            {
                "date": "2025-12",
                "rate_pct": -0.079228
            },
            {
                "date": "2026-01",
                "rate_pct": -0.074428
            },
            {
                "date": "2026-02",
                "rate_pct": -0.076166
            },
            {
                "date": "2026-03",
                "rate_pct": -0.066425
            },
            {
                "date": "2026-04",
                "rate_pct": -0.046989
            },
            {
                "date": "2026-05",
                "rate_pct": -0.055974
            }
        ],
        "rate_pct": -0.055974,
        "frequency": "monthly",
        "indicator": "SARON — Swiss Average Rate Overnight (1 day)"
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:15.643Z",
        "request_id": "0f701ea8-dc35-4f98-b8d5-7f602ad46360"
    },
    "status": "ok",
    "message": "SARON retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

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

**Response:**
```json
{
    "data": {
        "source": "Schweizerische Nationalbank data portal (live)",
        "service": "snb-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/rates": "SNB FX fixing — all currencies in CHF (monthly average).",
            "GET /v1/saron": "SARON overnight benchmark + history.",
            "GET /v1/currency": "One currency's CHF rate + history (code=EUR).",
            "GET /v1/policy_rate": "SNB policy rate + history."
        },
        "description": "Live official Swiss monetary data from the Swiss National Bank's open data portal: the SNB foreign-exchange fixing (monthly-average franc value of ~25 world currencies, normalised to the franc value of a single unit); one currency's franc rate with history; the SNB policy rate with history; and SARON, the Swiss franc overnight benchmark that replaced CHF LIBOR, with its recent path. Live, no key, nothing stored; figures are monthly. Distinct from the ECB, Fed, Bank of Canada, Norges Bank, Bank of England, Brazil, Poland and Czech central-bank APIs — this is the franc, the SNB policy rate and SARON.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:16.015Z",
        "request_id": "cf5011a2-6bea-446c-a704-b1813aa5b22f"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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