API Reference
/history/analysis Endpoint
Trends, comparisons and "movers", with % change, currency strength, and min/max/avg over a window, in one call.
Endpoint
GET https://api.currency-core.com/v1/history/analysis
Answers analytical questions over the historical rates in a single call: how a
currency performed, which currencies moved most against a base, and side-by-side
comparisons, each with % change, a strengthenedPct, and optional min/max/avg.
For the raw day-by-day series use /v1/history.
Plan requirement
/v1/history/analysis is available on the Growth plan and higher (same
entitlement as /history). Free / Starter keys receive HTTP 403 forbidden.
Two modes
- Compare: pass
currencies(a comma-separated list). You get one result per currency, in the order requested. - Movers: omit
currencies. Every currency is ranked againstbaseand the toplimitare returned (sorted bysort).
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
base | string | No | Currency everything is measured against (3-letter ISO 4217). Default USD. |
currencies | string | No | Comma-separated list to compare, e.g. GBP,EUR,AED. Omit for movers. |
from | string | No | Window start YYYY-MM-DD (UTC). Default: 20 years (2 decades) before to. |
to | string | No | Window end YYYY-MM-DD (UTC). Default: today; future clamps to today. |
period | string | No | Shorthand for from: 10y, 6m, 30d, ytd, max. Ignored if from is set. |
sort | string | No | Movers ranking: strengthened (default) or weakened. |
assetClass | string | No | Movers universe: fiat (default) or all (incl. illiquid/frontier). Precious metals aren’t covered. |
limit | number | No | Movers: how many to return (default 10, max 200). |
interval | string | No | Attach a trend series per named currency: weekly/monthly/yearly (compare mode). |
stats | boolean | No | Include min/max/avg over the window. Default true; pass false to skip. |
Ranking quality (movers)
So a “best/worst performing currency” ranking returns real currencies:
assetClassdefaults tofiat, which is the liquid, tradeable currency set (G10 + actively-traded EM), so “strongest currencies” returns real winners (CHF/SGD/ILS) rather than illiquid frontier currencies (SYP/SOS/AFN) with sparse or extreme data. Precious metals (XAU/XAG/XPT/XPD) aren’t covered at all (the rate source is fiat-only), and synthetic units (SDR) are excluded. PassassetClass=allto rank every currency including illiquid/frontier ones.- Redenomination artifacts are always dropped. A currency stitched across a
redenomination (e.g. Belarus’s
BYN÷10,000 in 2016, which shows an impossible +217,845% “since 2010”) is excluded whenever the ranking window spans the redenomination date. This check is window-aware, so it also catches small unit changes (e.g. Mauritania’sMRU÷10), and currencies whose modern window is clean (e.g.TRYsince 2015) are kept. A backstop also drops any impossible move in either direction. To inspect such a currency deliberately, name it in compare mode.
Metrics
Rates are units of currency per 1 base (same convention as /rates and
/history). For each currency:
changePct: % change in that quoted rate over the window.strengthenedPct: how much the currency appreciated againstbase(positive = stronger). This is the intuitive “who went up” number; a currency strengthens when it takes fewer of its units to buy onebase.stats:{ min, max, avg }over the window’s trading days (whenstats=true).startDate/endDate: the actual snapshot dates used (carry-back resolved), so “since 2015” tells you exactly which day it anchored to.
Examples
Which currencies strengthened most against INR since 2015 (movers):
curl "https://api.currency-core.com/v1/history/analysis?base=INR&from=2015-01-01&sort=strengthened&limit=10" \
-H "Authorization: Bearer cc_live_your_key"const res = await fetch(
"https://api.currency-core.com/v1/history/analysis?base=INR&from=2015-01-01&sort=strengthened&limit=10",
{ headers: { Authorization: "Bearer cc_live_your_key" } },
);
const { results } = await res.json();
console.log(results[0].currency, results[0].strengthenedPct);import requests
res = requests.get(
"https://api.currency-core.com/v1/history/analysis",
params={"base": "INR", "from": "2015-01-01", "sort": "strengthened", "limit": 10},
headers={"Authorization": "Bearer cc_live_your_key"},
)
print(res.json()["results"][0]){
"base": "INR", "from": "2015-01-02", "to": "2026-06-16",
"mode": "movers", "sort": "strengthened", "stats": true,
"results": [
{ "currency": "CHF", "startDate": "2015-01-02", "endDate": "2026-06-16",
"startRate": 0.79, "endRate": 0.92, "changePct": 16.4, "strengthenedPct": 38.1,
"stats": { "min": 0.74, "max": 0.95, "avg": 0.86 } }
]
}
Compare USD, GBP, EUR, AED over 20 years, with a yearly trend:
curl "https://api.currency-core.com/v1/history/analysis?currencies=GBP,EUR,AED&period=20y&interval=yearly" \
-H "Authorization: Bearer cc_live_your_key"
How did EUR perform vs USD over the last decade (with monthly trend):
curl "https://api.currency-core.com/v1/history/analysis?currencies=EUR&period=10y&interval=monthly" \
-H "Authorization: Bearer cc_live_your_key"
When interval is set in compare mode each result also carries a series
(period → average rate) for charting.
Errors
| Status | Code | When |
|---|---|---|
400 | invalid_input | bad base/currencies/sort/interval/period, or from after to, or the base has no data in the window. |
403 | forbidden | Your plan is below Growth (Free / Starter). |
404 | rate_not_found | No rate data exists at or before from / to. |