# Currency Correlation API
> A live forex correlation analytic as an API, computed from European Central Bank daily reference rates. It measures how the world's currencies move together: each currency's daily appreciation is correlated against every other, so you can see which currencies move in lock-step (don't double up the same risk) and which move opposite (natural hedges). Get one currency's correlations to all others ranked, the coefficient for any pair, or a full correlation matrix for a basket. Risk and diversification input for forex, portfolio and trading apps. Live, no key. Distinct from currency-strength (direction) and FX-volatility (magnitude) — this is co-movement.

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

## Pricing
- **Free** (Free) — 300 calls/Mo, 3 req/s
- **Trader** ($8/Mo) — 10,000 calls/Mo, 10 req/s
- **Pro** ($22/Mo) — 52,000 calls/Mo, 25 req/s
- **Business** ($52/Mo) — 260,000 calls/Mo, 45 req/s

## Endpoints

### Correlation

#### `GET /v1/currency` — One currency correlations to all others

**Parameters:**
- `code` (query, required, string) — 3-letter currency code Example: `AUD`
- `period` (query, optional, string) — 1m | 3m | 6m | 1y Example: `3m`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/currencycorrelation-api/v1/currency?code=AUD&period=3m"
```

**Response:**
```json
{
    "data": {
        "count": 28,
        "period": "3m",
        "to_date": "2026-06-08",
        "currency": "AUD",
        "from_date": "2026-03-06",
        "correlations": [
            {
                "currency": "ZAR",
                "correlation": 0.619,
                "relationship": "moderate positive"
            },
            {
                "currency": "MXN",
                "correlation": 0.498,
                "relationship": "moderate positive"
            },
            {
                "currency": "NZD",
                "correlation": 0.497,
                "relationship": "moderate positive"
            },
            {
                "currency": "PLN",
                "correlation": 0.419,
                "relationship": "moderate positive"
            },
            {
                "currency": "BRL",
                "correlation": 0.401,
                "relationship": "moderate positive"
            },
            {
                "currency": "GBP",
                "correlation": 0.401,
                "relationship": "moderate positive"
            },
            {
                "currency": "SEK",
                "correlation": 0.365,
                "relationship": "moderate positive"
            },
            {
                "currency": "CZK",
                "correlation": 0.28,
                "relationship": "weak"
            },
            {
                "currency": "CHF",
                "correlation": 0.27,
              
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/matrix` — Correlation matrix for a basket

**Parameters:**
- `currencies` (query, optional, string) — Comma-separated codes (or default basket) Example: `USD,JPY,GBP,AUD,CAD`
- `period` (query, optional, string) — 1m | 3m | 6m | 1y Example: `3m`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/currencycorrelation-api/v1/matrix?currencies=USD%2CJPY%2CGBP%2CAUD%2CCAD&period=3m"
```

**Response:**
```json
{
    "data": {
        "matrix": {
            "AUD": {
                "AUD": 1,
                "CAD": -0.066,
                "GBP": 0.401,
                "JPY": -0.179,
                "USD": -0.33
            },
            "CAD": {
                "AUD": -0.066,
                "CAD": 1,
                "GBP": 0.081,
                "JPY": 0.254,
                "USD": 0.74
            },
            "GBP": {
                "AUD": 0.401,
                "CAD": 0.081,
                "GBP": 1,
                "JPY": -0.011,
                "USD": -0.141
            },
            "JPY": {
                "AUD": -0.179,
                "CAD": 0.254,
                "GBP": -0.011,
                "JPY": 1,
                "USD": 0.397
            },
            "USD": {
                "AUD": -0.33,
                "CAD": 0.74,
                "GBP": -0.141,
                "JPY": 0.397,
                "USD": 1
            }
        },
        "period": "3m",
        "to_date": "2026-06-08",
        "from_date": "2026-03-06",
        "currencies": [
            "USD",
            "JPY",
            "GBP",
            "AUD",
            "CAD"
        ],
        "observations": 64
    },
    "meta": {
        "timestamp": "2026-06-09T03:03:35.414Z",
        "request_id": "3e16a7f4-4e63-41e8-ae3a-4f7d7ce68b6f"
    },
    "status": "ok",
    "message": "Correlation matrix retrieved successfully",
    "success": true
}
```

#### `GET /v1/pair` — Correlation coefficient for a pair

**Parameters:**
- `base` (query, required, string) — First currency Example: `AUD`
- `quote` (query, required, string) — Second currency Example: `NZD`
- `period` (query, optional, string) — 1m | 3m | 6m | 1y Example: `3m`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/currencycorrelation-api/v1/pair?base=AUD&quote=NZD&period=3m"
```

**Response:**
```json
{
    "data": {
        "base": "AUD",
        "quote": "NZD",
        "period": "3m",
        "to_date": "2026-06-08",
        "from_date": "2026-03-06",
        "correlation": 0.497,
        "observations": 64,
        "relationship": "moderate positive"
    },
    "meta": {
        "timestamp": "2026-06-09T03:03:35.515Z",
        "request_id": "6c9cc491-df60-49a2-9dba-388fef7a4e4b"
    },
    "status": "ok",
    "message": "Pair correlation retrieved successfully",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "method": "Pearson correlation of daily appreciation (vs EUR) log-returns",
        "source": "ECB daily reference rates via Frankfurter (live)",
        "periods": [
            "1m",
            "3m",
            "6m",
            "1y"
        ],
        "service": "currencycorrelation-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/pair": "Correlation coefficient for a pair (base=USD&quote=JPY, period=).",
            "GET /v1/matrix": "Correlation matrix for a basket (currencies=USD,JPY,GBP… or default, period=).",
            "GET /v1/currency": "One currency's correlations to all others, ranked (code=USD, period=1m|3m|6m|1y)."
        },
        "description": "Live FX correlation analytic from ECB reference rates (Frankfurter): how currencies' daily moves co-vary. Get one currency's correlations to all others, the coefficient for any pair, or a full correlation matrix for a basket. Live, no key. Distinct from currency-strength (direction) and FX-volatility (magnitude).",
        "default_basket": [
            "USD",
            "JPY",
            "GBP",
            "AUD",
            "CAD",
            "CHF",
            "CNY",
            "NZD",
            "SEK",
            "NOK"
        ],
        "currencies_live": 29
    },
    "meta": {
        "timestamp": "2026-06-09T03:03:35.680Z",
        "request_id": "d0dc73f7-f5b6-478a-b374-2272b33efc07"
    },
    "status": "ok",
    "message": "M
…(truncated, see openapi.json for full schema)
```


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