API Reference
/history/analysis Endpoint
Compare currencies or rank the biggest movers over a window, with change, strength, stats, and optional trend series in one call.
Endpoint
GET https://api.currency-core.com/v1/history/analysis
Answers analytical questions over historical rates in one call: how a currency performed, which currencies moved most against a base, and side-by-side comparisons, each with a percent change, a strengthenedPct, and optional min/max/avg. For the raw day-by-day series use /v1/history.
Plan requirement
/v1/history/analysis requires the Growth plan or higher. Free and Starter keys receive HTTP 403 forbidden. The raw /v1/history series is available on every plan (Free is limited to the last 30 days); the analysis endpoint is not. Live keys require a paid plan.
Two modes
- Compare: pass
currencies(a comma-separated list). You get one result per currency, in the order requested. - Movers: omit
currencies. Every currency in the selected asset class is ranked againstbase, and the toplimitare returned.
Choosing compare or movers
Use compare when you already know which currencies matter, such as the markets in your portfolio or the currencies on your invoice. Use movers when you want discovery, such as “which currencies gained the most against the dollar this year”. Movers applies the assetClass universe and drops redenomination artifacts automatically; compare keeps exactly the currencies you name, so it is the right mode for inspecting a specific code.
Query parameters
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
base | string | No | USD | Currency everything is measured against (3-letter ISO 4217). |
currencies | string | No | none | Comma-separated list to compare, e.g. GBP,EUR,AED. Omit for movers. Maximum 100 codes. |
from | string | No | 20 years before to | Window start YYYY-MM-DD (UTC). Must be a real date. Values before 1949-12-30 clamp. |
to | string | No | Today (UTC) | Window end YYYY-MM-DD (UTC). Future dates clamp to today. |
period | string | No | none | Shorthand for from: 10y, 6m, 30d, ytd, or max. Ignored if from is set. |
sort | string | No | strengthened | Movers ranking: strengthened or weakened. |
assetClass | string | No | fiat | Movers universe: fiat, metals, all, or crypto. See the note below. |
limit | number | No | 10 | Movers: how many to return. Maximum 200. |
interval | string | No | none | Attach a trend series per named currency: daily, weekly, monthly, or yearly (compare mode only). A daily series is limited to a 20-year span. |
stats | boolean | No | true | Include min, max, and avg over the window. Pass false to skip. |
Asset classes in movers mode
fiat(default) ranks the liquid, tradeable currency set, not every code. This avoids illiquid frontier currencies with sparse data.metalsselects precious-metal codes, but the rate source has no metal prices, so it returns no rows.allranks every currency in the dataset, including illiquid and frontier codes.cryptoreturns no rows; the FX dataset contains no crypto assets.
Redenomination artifacts are always dropped in movers mode. A currency whose window spans a unit change (for example, a redenomination) is excluded rather than shown as an impossible move. Name it explicitly in compare mode if you need to inspect it.
Response
{
"base": "USD",
"from": "2015-01-02",
"to": "2026-06-16",
"mode": "movers",
"sort": "strengthened",
"assetClass": "fiat",
"stats": true,
"results": [
{
"currency": "CHF",
"startDate": "2015-01-02",
"endDate": "2026-06-16",
"startRate": 0.92,
"endRate": 0.79,
"changePct": -14.1,
"strengthenedPct": 16.5,
"stats": { "min": 0.74, "max": 0.95, "avg": 0.86 }
}
]
}
Response fields
| Field | Type | Description |
|---|---|---|
base | string | Currency everything is measured against. |
from | string | Window start used (YYYY-MM-DD, UTC). |
to | string | Window end used (YYYY-MM-DD, UTC). |
mode | string | compare when currencies were named, movers when ranking. |
sort | string | Ranking direction, present in movers mode. |
assetClass | string | Asset class used for movers, present in movers mode. |
interval | string | Trend-series interval, present when requested. |
stats | boolean | Whether min/max/avg were computed. |
results | array | Per-currency analysis, ranked and limited in movers mode. |
results[].currency | string | The currency code. |
results[].startDate | string | Snapshot date used for the window start (carry-back resolved). |
results[].endDate | string | Snapshot date used for the window end. |
results[].startRate | number | Rate at the start, in units of the currency per 1 base; null when no data. |
results[].endRate | number | Rate at the end; null when no data. |
results[].changePct | number | Percent change in the quoted rate over the window; null when start or end is missing. |
results[].strengthenedPct | number | Percent the currency appreciated against base (positive means stronger); null when missing. |
results[].stats | object | { min, max, avg } over the window when stats=true. |
results[].series | object | Period to average rate, when interval is set in compare mode. |
results[].volatility | number | Annualized volatility over the window, present in compare mode when interval is set. |
results[].note | string | Why a value is missing, when applicable. |
Reading the metrics
Rates are units of currency per 1 base, the same convention as /rates and /history.
changePctis the percent change in that quoted rate. A positive value means the rate rose.strengthenedPctis the intuitive “who went up” number. It is positive when the currency appreciated against the base, which happens when it takes fewer of its units to buy one base.startDateandendDateare the actual snapshot dates used, so a “since 2015” query tells you exactly which trading day it anchored to.statssummarizes the window’s trading days, not calendar days.
Example requests
Which currencies strengthened most against INR since 2015:
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])Compare GBP, EUR, and AED 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 against USD over the last decade:
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 for charting.
Errors
| Status | Code | When |
|---|---|---|
400 | invalid_input | Bad base, currencies, sort, assetClass, interval, period, or from/to; more than 100 compared currencies; from after to; span over 20 years without period=max; or dense daily data requested for named currencies over a span over 20 years. |
401 | unauthorized | The API key is missing or invalid. |
403 | forbidden | The plan is below Growth, the key is disabled, or billing is past due. |
404 | rate_not_found | No rate data exists at or before the requested start or end date. |
429 | rate_limited | The per-minute rate limit was exceeded. Honor Retry-After. |
Limits and related
- Compare mode accepts up to 100 currencies. A trend
seriesis attached to at most 25 named currencies. period=maxis allowed for full-history queries, except wheninterval=dailyis combined with named currencies and the span exceeds 20 years.limitis capped at 200 in movers mode.- Each request consumes one monthly request and one per-minute rate-limit unit.
Related pages:
/v1/historyfor the raw series/v1/ppp/analysisfor purchasing-power trends/v1/volatilityfor volatility, not just change- Pricing for Growth access
- Rate limits for per-minute limits