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

ParameterTypeRequiredDescription
currenciesstringYesComma-separated currencies to correlate with base, e.g. GBP,CHF,SEK.
basestringNoReference currency (3-letter ISO 4217). Default USD, but a non-USD base is more meaningful (vs USD the base series is constant → null).
fromstringNoWindow start YYYY-MM-DD (UTC). Default: 365 days before to.
tostringNoWindow 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&currencies=GBP,CHF,SEK" \
  -H "Authorization: Bearer cc_live_your_key"
{
  "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

StatusCodeWhen
400invalid_inputcurrencies missing, a bad code, or from after to.
403forbiddenYour plan is below Growth (Free / Starter).