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 against base and the top limit are returned (sorted by sort).

Query parameters

ParameterTypeRequiredDescription
basestringNoCurrency everything is measured against (3-letter ISO 4217). Default USD.
currenciesstringNoComma-separated list to compare, e.g. GBP,EUR,AED. Omit for movers.
fromstringNoWindow start YYYY-MM-DD (UTC). Default: 20 years (2 decades) before to.
tostringNoWindow end YYYY-MM-DD (UTC). Default: today; future clamps to today.
periodstringNoShorthand for from: 10y, 6m, 30d, ytd, max. Ignored if from is set.
sortstringNoMovers ranking: strengthened (default) or weakened.
assetClassstringNoMovers universe: fiat (default) or all (incl. illiquid/frontier). Precious metals aren’t covered.
limitnumberNoMovers: how many to return (default 10, max 200).
intervalstringNoAttach a trend series per named currency: weekly/monthly/yearly (compare mode).
statsbooleanNoInclude 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:

  • assetClass defaults to fiat, 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. Pass assetClass=all to 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’s MRU ÷10), and currencies whose modern window is clean (e.g. TRY since 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 against base (positive = stronger). This is the intuitive “who went up” number; a currency strengthens when it takes fewer of its units to buy one base.
  • stats: { min, max, avg } over the window’s trading days (when stats=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"
{
  "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

StatusCodeWhen
400invalid_inputbad base/currencies/sort/interval/period, or from after to, or the base has no data in the window.
403forbiddenYour plan is below Growth (Free / Starter).
404rate_not_foundNo rate data exists at or before from / to.