API Reference

/drawdown Endpoint

Find a currency's worst peak-to-trough decline against a base, with peak, trough, and recovery dates plus clear null semantics.


Endpoint

GET https://api.currency-core.com/v1/drawdown

Finds the worst peak-to-trough decline (maximum drawdown) of a currency against a base over a window: the deepest fall from a high to a subsequent low, plus the peak, trough, and recovery dates. Use it for questions such as “what was EUR’s worst decline against USD?” or “which currencies had the largest drawdowns?” This endpoint requires the Growth plan or higher.

Plan requirement

/v1/drawdown uses the same historical-analytics entitlement as /history/analysis. Free and Starter keys receive HTTP 403 forbidden. Live keys require a paid plan.

Query parameters

ParameterTypeRequiredDefaultNotes
currencystringNononeCurrency to measure, or a comma-separated list. Omit to rank the universe. currencies is accepted as an alias. Maximum 40 codes.
basestringNoUSDBase currency to measure against.
fromstringNo365 days before toWindow start YYYY-MM-DD (UTC). Must be a real date.
tostringNoToday (UTC)Window end YYYY-MM-DD (UTC). Future dates clamp to today.
sortstringNodeepestRanking direction: deepest (largest decline first) or recovery (fastest recovery first).
universestringNoliquidRanking universe: liquid or majors.
limitnumberNo10Ranking: how many to return. Maximum 50.

sort and universe only affect ranking mode. In compare mode, results follow the order of the currencies you named, minus the base itself.

How it is calculated

The drawdown is measured on the currency’s price against the base, not on the raw units-per-base rate. The series is inverted before the peak-to-trough scan, so a weakening currency shows a negative drawdown and a strengthening currency does not show a false decline.

  • maxDrawdownPct is signed. A value of -18.4 means the currency fell 18.4% from its peak.
  • peakDate is the date of the high before the worst decline.
  • troughDate is the date of the low.
  • recoveryDate is the first date the price returned to the prior peak, or null when it had not recovered by to.
  • recoveryDays is the number of calendar days from trough to recovery, or null when there was no recovery.

Null and recovery semantics

A null maxDrawdownPct does not always mean zero risk. Read the note:

  • null with a note about no history means the currency had no data in the window.
  • null with a note that the currency never weakened means there was no peak-to-trough decline in the window.
  • null with a note about a redenomination means the currency was excluded because its window spans a unit change, which is not a market decline.

When recoveryDate is null, recoveryDays is also null. In sort=recovery rankings, currencies that never recovered are placed after those that did, so the fastest recoveries come first.

Choosing a base and window

Measure against the currency your readers care about. A US audience usually wants a USD base; a European audience may want EUR. Keep the window long enough to include a real cycle, but not so long that a redenomination or a regime change dominates the result. One year is a common default for recent risk, while five to ten years captures more stress events.

Response

{
  "base": "USD",
  "from": "2016-06-17",
  "to": "2026-06-17",
  "mode": "compare",
  "results": [
    {
      "currency": "EUR",
      "maxDrawdownPct": -18.4,
      "peakDate": "2018-02-15",
      "troughDate": "2022-09-27",
      "recoveryDate": null,
      "recoveryDays": null
    }
  ]
}

Response fields

FieldTypeDescription
basestringBase currency the decline is measured against.
fromstringWindow start used (YYYY-MM-DD, UTC).
tostringWindow end used (YYYY-MM-DD, UTC).
modestringcompare when currencies were named, ranking otherwise.
sortstringRanking direction, present in ranking mode.
universestringUniverse ranked, present in ranking mode.
resultsarrayPer-currency maximum drawdown.
results[].currencystringThe currency code.
results[].maxDrawdownPctnumberWorst peak-to-trough move as a signed percent; null when none or unavailable.
results[].peakDatestringDate of the peak the worst drawdown fell from.
results[].troughDatestringDate of the trough.
results[].recoveryDatestringFirst date the price recovered to the prior peak, or null or absent when it had not recovered by to or no drawdown is available.
results[].recoveryDaysnumberCalendar days from trough to recovery, or null or absent when not recovered or no drawdown is available.
results[].notestringWhy the drawdown is null, when applicable.

Example

EUR’s worst decline against USD over the last 10 years:

curl "https://api.currency-core.com/v1/drawdown?currency=EUR&base=USD&from=2016-11-10&to=2026-11-10" \
  -H "Authorization: Bearer cc_live_your_key"

Which currencies had the largest drawdowns (ranking):

curl "https://api.currency-core.com/v1/drawdown?base=USD&sort=deepest&limit=10" \
  -H "Authorization: Bearer cc_live_your_key"

Fastest recoveries:

curl "https://api.currency-core.com/v1/drawdown?base=USD&sort=recovery&limit=10" \
  -H "Authorization: Bearer cc_live_your_key"

Errors

StatusCodeWhen
400invalid_inputBad base, currency, sort, or universe; more than 40 currencies; from after to; span over 20 years; or the base has no history in the window.
401unauthorizedThe API key is missing or invalid.
403forbiddenThe plan is below Growth, the key is disabled, or billing is past due.
429rate_limitedThe per-minute rate limit was exceeded. Honor Retry-After.
  • Up to 40 named currencies per request.
  • Ranking limit is capped at 50.
  • The window cannot exceed 20 years.
  • Each request consumes one monthly request and one per-minute rate-limit unit.

Related pages: