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 against base, and the top limit are 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

ParameterTypeRequiredDefaultNotes
basestringNoUSDCurrency everything is measured against (3-letter ISO 4217).
currenciesstringNononeComma-separated list to compare, e.g. GBP,EUR,AED. Omit for movers. Maximum 100 codes.
fromstringNo20 years before toWindow start YYYY-MM-DD (UTC). Must be a real date. Values before 1949-12-30 clamp.
tostringNoToday (UTC)Window end YYYY-MM-DD (UTC). Future dates clamp to today.
periodstringNononeShorthand for from: 10y, 6m, 30d, ytd, or max. Ignored if from is set.
sortstringNostrengthenedMovers ranking: strengthened or weakened.
assetClassstringNofiatMovers universe: fiat, metals, all, or crypto. See the note below.
limitnumberNo10Movers: how many to return. Maximum 200.
intervalstringNononeAttach a trend series per named currency: daily, weekly, monthly, or yearly (compare mode only). A daily series is limited to a 20-year span.
statsbooleanNotrueInclude 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.
  • metals selects precious-metal codes, but the rate source has no metal prices, so it returns no rows.
  • all ranks every currency in the dataset, including illiquid and frontier codes.
  • crypto returns 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

FieldTypeDescription
basestringCurrency everything is measured against.
fromstringWindow start used (YYYY-MM-DD, UTC).
tostringWindow end used (YYYY-MM-DD, UTC).
modestringcompare when currencies were named, movers when ranking.
sortstringRanking direction, present in movers mode.
assetClassstringAsset class used for movers, present in movers mode.
intervalstringTrend-series interval, present when requested.
statsbooleanWhether min/max/avg were computed.
resultsarrayPer-currency analysis, ranked and limited in movers mode.
results[].currencystringThe currency code.
results[].startDatestringSnapshot date used for the window start (carry-back resolved).
results[].endDatestringSnapshot date used for the window end.
results[].startRatenumberRate at the start, in units of the currency per 1 base; null when no data.
results[].endRatenumberRate at the end; null when no data.
results[].changePctnumberPercent change in the quoted rate over the window; null when start or end is missing.
results[].strengthenedPctnumberPercent the currency appreciated against base (positive means stronger); null when missing.
results[].statsobject{ min, max, avg } over the window when stats=true.
results[].seriesobjectPeriod to average rate, when interval is set in compare mode.
results[].volatilitynumberAnnualized volatility over the window, present in compare mode when interval is set.
results[].notestringWhy a value is missing, when applicable.

Reading the metrics

Rates are units of currency per 1 base, the same convention as /rates and /history.

  • changePct is the percent change in that quoted rate. A positive value means the rate rose.
  • strengthenedPct is 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.
  • startDate and endDate are the actual snapshot dates used, so a “since 2015” query tells you exactly which trading day it anchored to.
  • stats summarizes 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"

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

StatusCodeWhen
400invalid_inputBad 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.
401unauthorizedThe API key is missing or invalid.
403forbiddenThe plan is below Growth, the key is disabled, or billing is past due.
404rate_not_foundNo rate data exists at or before the requested start or end date.
429rate_limitedThe per-minute rate limit was exceeded. Honor Retry-After.
  • Compare mode accepts up to 100 currencies. A trend series is attached to at most 25 named currencies.
  • period=max is allowed for full-history queries, except when interval=daily is combined with named currencies and the span exceeds 20 years.
  • limit is capped at 200 in movers mode.
  • Each request consumes one monthly request and one per-minute rate-limit unit.

Related pages: