# Riksbank API
> Live monetary and exchange-rate data from Sveriges Riksbank, the world's oldest central bank, for the Swedish krona (SEK), via its public SWEA API. Get the Riksbank's current policy rate (styrränta) — the rate that steers the Swedish economy — with its date. Read the krona's exchange rate against any of 40-plus currencies, the official daily krona fixing, both as krona-per-unit and the inverse. Pull the daily time series of any Riksbank series, an FX pair or the policy rate, over a date range. List every currency the Riksbank publishes a krona rate for. Live, no key, nothing stored. Distinct from the ECB, SNB, Bank of Canada, Norges Bank, NBP, CNB, BCB and CBR feeds and from market mid-rates — this is the Riksbank's own krona policy rate and official exchange-rate fixing. Perfect for FX, treasury and analytics 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/riksbank-api/..."
```

## Pricing
- **Free** (Free) — 9,000 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 166,000 calls/Mo, 5 req/s
- **Pro** ($21/Mo) — 925,000 calls/Mo, 12 req/s
- **Business** ($48/Mo) — 5,050,000 calls/Mo, 30 req/s

## Endpoints

### FX

#### `GET /v1/currencies` — Every currency with a krona rate

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

**Response:**
```json
{
    "data": {
        "count": 52,
        "source": "Sveriges Riksbank",
        "currencies": [
            {
                "currency": "ATS",
                "series_id": "SEKATSPMI",
                "description": "ATS"
            },
            {
                "currency": "AUD",
                "series_id": "SEKAUDPMI",
                "description": "AUD"
            },
            {
                "currency": "BEF",
                "series_id": "SEKBEFPMI",
                "description": "BEF"
            },
            {
                "currency": "BGN",
                "series_id": "SEKBGNPMI",
                "description": "BGN"
            },
            {
                "currency": "BRL",
                "series_id": "SEKBRLPMI",
                "description": "BRL"
            },
            {
                "currency": "CAD",
                "series_id": "SEKCADPMI",
                "description": "CAD"
            },
            {
                "currency": "CHF",
                "series_id": "SEKCHFPMI",
                "description": "CHF"
            },
            {
                "currency": "CNY",
                "series_id": "SEKCNYPMI",
                "description": "CNY"
            },
            {
                "currency": "CYP",
                "series_id": "SEKCYPPMI",
                "description": "CYP"
            },
            {
                "currency": "CZK",
                "series_id": "SEKCZKPMI",
                "descr
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/fx` — Krona exchange rate vs a currency

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

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/riksbank-api/v1/fx?currency=USD"
```

**Response:**
```json
{
    "data": {
        "base": "SEK",
        "date": "2026-06-09",
        "quote": "USD",
        "source": "Sveriges Riksbank",
        "series_id": "SEKUSDPMI",
        "sek_per_unit": 9.40551,
        "unit_per_sek": 0.10632066
    },
    "meta": {
        "timestamp": "2026-06-10T14:01:52.833Z",
        "request_id": "896389f6-0bee-4526-a51c-9592d1166f9e"
    },
    "status": "ok",
    "message": "FX rate retrieved successfully",
    "success": true
}
```

#### `GET /v1/history` — Daily time series of a series or FX pair

**Parameters:**
- `currency` (query, optional, string) — Currency for the SEK pair Example: `USD`
- `series` (query, optional, string) — Riksbank series id Example: `SEKUSDPMI`
- `from` (query, optional, string) — Start date YYYY-MM-DD Example: `2026-05-01`
- `to` (query, optional, string) — End date YYYY-MM-DD Example: `2026-05-31`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/riksbank-api/v1/history?currency=USD&series=SEKUSDPMI&from=2026-05-01&to=2026-05-31"
```

**Response:**
```json
{
    "data": {
        "to": "2026-05-31",
        "from": "2026-05-01",
        "count": 19,
        "source": "Sveriges Riksbank",
        "series_id": "SEKUSDPMI",
        "observations": [
            {
                "date": "2026-05-04",
                "value": 9.26068
            },
            {
                "date": "2026-05-05",
                "value": 9.27606
            },
            {
                "date": "2026-05-06",
                "value": 9.21059
            },
            {
                "date": "2026-05-07",
                "value": 9.19711
            },
            {
                "date": "2026-05-08",
                "value": 9.2186
            },
            {
                "date": "2026-05-11",
                "value": 9.24479
            },
            {
                "date": "2026-05-12",
                "value": 9.28054
            },
            {
                "date": "2026-05-13",
                "value": 9.31711
            },
            {
                "date": "2026-05-15",
                "value": 9.44444
            },
            {
                "date": "2026-05-18",
                "value": 9.39775
            },
            {
                "date": "2026-05-19",
                "value": 9.38812
            },
            {
                "date": "2026-05-20",
                "value": 9.37716
            },
            {
                "date": "2026-05-21",
                "value": 9.36417
            },
       
…(truncated, see openapi.json for full schema)
```

### Rates

#### `GET /v1/policy-rate` — The Riksbank policy rate (styrranta)

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

**Response:**
```json
{
    "data": {
        "date": "2026-06-10",
        "source": "Sveriges Riksbank",
        "rate_pct": 1.75,
        "indicator": "Riksbank policy rate (styrränta)",
        "series_id": "SECBREPOEFF"
    },
    "meta": {
        "timestamp": "2026-06-10T14:01:53.161Z",
        "request_id": "93fddd2f-5700-4086-a896-8b91843a2c88"
    },
    "status": "ok",
    "message": "Policy rate retrieved successfully",
    "success": true
}
```


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