API Reference
/mean-reversion Endpoint
Ranks currencies by how strongly they revert to their mean, by crossing frequency, reversion half-life, and current deviation.
Endpoint
GET https://api.currency-core.com/v1/mean-reversion
Ranks currencies by how strongly they return to their mean (“fair value”)
over the window, yielding a composite score (0-100, higher = more mean-reverting) from
two transparent components measured vs base:
- crossing frequency: how often the rate crosses its window mean (more = it oscillates around fair value rather than trending),
- reversion half-life: the estimated time for a deviation to halve, from the AR(1) coefficient of the demeaned series (shorter = faster reversion).
Each result also reports the current deviation from the mean, so you can see which currencies are currently stretched.
Plan requirement
/v1/mean-reversion is available on the Growth plan and higher. Free / Starter
keys receive HTTP 403 forbidden.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
currencies | string | No | Comma-separated currencies to score, e.g. EUR,GBP. Omit to rank the liquid set. |
base | string | No | Base currency to measure against. Default USD. |
from | string | No | Window start YYYY-MM-DD (UTC). Default: ~2 years before to (enough points for a stable estimate). |
to | string | No | Window end YYYY-MM-DD (UTC). Default: today. |
limit | number | No | How many to return (default 10, max 50). |
Example
Most mean-reverting currencies vs USD:
curl "https://api.currency-core.com/v1/mean-reversion?base=USD&limit=5" \
-H "Authorization: Bearer cc_live_your_key"const res = await fetch("https://api.currency-core.com/v1/mean-reversion?base=USD&limit=5", {
headers: { Authorization: "Bearer cc_live_your_key" },
});
console.log((await res.json()).results);import requests
res = requests.get(
"https://api.currency-core.com/v1/mean-reversion",
params={"base": "USD", "limit": 5},
headers={"Authorization": "Bearer cc_live_your_key"},
)
print(res.json()["results"]){
"base": "USD", "from": "2024-06-17", "to": "2026-06-17",
"results": [
{ "currency": "EUR", "score": 71.5, "deviationPct": -1.2, "reversionFrequency": 0.32, "halfLifeDays": 18.4 },
{ "currency": "GBP", "score": 64.0, "deviationPct": 0.8, "reversionFrequency": 0.27, "halfLifeDays": 24.1 }
]
}
Errors
| Status | Code | When |
|---|---|---|
400 | invalid_input | bad base/currencies, or from after to. |
403 | forbidden | Your plan is below Growth (Free / Starter). |