API Reference
/correlation Endpoint
Correlation of currencies' daily returns with a base currency, over a window, in one call.
Endpoint
GET https://api.currency-core.com/v1/correlation
Measures how currencies move together: the Pearson correlation of each
currency’s daily returns with a reference base currency’s, over a window
(measured against USD). +1 = move in lockstep, 0 = unrelated, −1 = opposite.
Plan requirement
/v1/correlation is available on the Growth plan and higher. Free / Starter
keys receive HTTP 403 forbidden.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
currencies | string | Yes | Comma-separated currencies to correlate with base, e.g. GBP,CHF,SEK. |
base | string | No | Reference currency (3-letter ISO 4217). Default USD, but a non-USD base is more meaningful (vs USD the base series is constant → null). |
from | string | No | Window start YYYY-MM-DD (UTC). Default: 365 days before to. |
to | string | No | Window end YYYY-MM-DD (UTC). Default: today. |
Example
Correlation of GBP, CHF and SEK with EUR over the last year:
curl "https://api.currency-core.com/v1/correlation?base=EUR¤cies=GBP,CHF,SEK" \
-H "Authorization: Bearer cc_live_your_key"const res = await fetch(
"https://api.currency-core.com/v1/correlation?base=EUR¤cies=GBP,CHF,SEK",
{ headers: { Authorization: "Bearer cc_live_your_key" } },
);
console.log((await res.json()).results);import requests
res = requests.get(
"https://api.currency-core.com/v1/correlation",
params={"base": "EUR", "currencies": "GBP,CHF,SEK"},
headers={"Authorization": "Bearer cc_live_your_key"},
)
print(res.json()["results"]){
"base": "EUR", "from": "2025-06-17", "to": "2026-06-17",
"results": [
{ "currency": "GBP", "correlation": 0.94, "observations": 365 },
{ "currency": "CHF", "correlation": 0.88, "observations": 365 },
{ "currency": "SEK", "correlation": 0.81, "observations": 365 }
]
}
Errors
| Status | Code | When |
|---|---|---|
400 | invalid_input | currencies missing, a bad code, or from after to. |
403 | forbidden | Your plan is below Growth (Free / Starter). |