Docs / Endpoints
Drawdowns
POST/v1/drawdownsunits: 2intraday
Every drawdown episode: peak, trough, depth, bars to the trough and to recovery, the current drawdown and the share of time spent under water.
Add "async": true to run it as a job, and "webhook_url" to be called when it finishes (Jobs & async). Calls estimated above 1,000 units run as jobs automatically. Supports interval for intraday bars at 5× the units (Intraday).
Parameters
| Field | Type | Default | Description |
|---|---|---|---|
symbolrequired | string | — | Ticker. |
start_date | date | — | YYYY-MM-DD. First date to include. Default: the full history available. |
end_date | date | — | YYYY-MM-DD. Last date to include. Default: the latest bar. |
limit | integer | 10 | How many of the deepest episodes to return. |
min_depth | number | 0.05 | Ignore declines shallower than this (0.05 = 5%). |
interval | string | "1day" | "1day" | "1hour" | "30min" | "15min" | "5min" | "1min". Intraday costs 5× the units; see Intraday. |
Example request
QQQ's worst drawdowns and how long they took to recover Read the walkthrough →
Request
POST /v1/drawdowns{ "symbol": "QQQ", "limit": 5, "min_depth": 0.1 }
The same call with curl, Python and JavaScript
curl https://clickapis.com/v1/drawdowns \
-H "Authorization: Bearer $CLICKAPIS_KEY" \
-H "Content-Type: application/json" \
-d '{"symbol":"QQQ","limit":5,"min_depth":0.1}'import os, requests
r = requests.post(
"https://clickapis.com/v1/drawdowns",
headers={"Authorization": f"Bearer {os.environ['CLICKAPIS_KEY']}"},
json={
"symbol": "QQQ",
"limit": 5,
"min_depth": 0.1
},
timeout=60,
)
print(r.json()["data"])const r = await fetch("https://clickapis.com/v1/drawdowns", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.CLICKAPIS_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"symbol": "QQQ",
"limit": 5,
"min_depth": 0.1
}),
});
console.log((await r.json()).data);Example response
Response 200 OK
{ "ok": true, "data": { "symbol": "QQQ", "start": "1999-03-10", "end": "2026-11-12", "current_drawdown": -0.095148, "all_time_high": 759.66, "all_time_high_date": "2026-10-06", "min_depth": 0.1, "episodes_total": 208, "episodes_count": 22, "deepest": [ { "peak_date": "2000-03-24", "peak": 99.49, "trough_date": "2002-10-09", "trough": 16.93, "depth": -0.829832, "recovery_date": "2015-02-23", "bars_to_trough": 637, "bars_to_recover": 3113, "total_bars": 3750, "recovered": true }, { "peak_date": "2021-12-27", "peak": 392.51, "trough_date": "2022-11-03", "trough": 254.66, "depth": -0.351201, "recovery_date": "2023-12-13", "bars_to_trough": 216, "bars_to_recover": 278, "total_bars": 494, "recovered": true }, { "peak_date": "2020-02-19", "peak": 227.79, "trough_date": "2020-03-16", "trough": 162.73, "depth": -0.285614, "recovery_date": "2020-06-03", "bars_to_trough": 18, "bars_to_recover": 55, "total_bars": 73, "recovered": true }, { "peak_date": "2018-08-29", "peak": 177.21, "trough_date": "2018-12-24", "trough": 136.81, "depth": -0.227978, "recovery_date": "2019-04-12", "bars_to_trough": 80, "bars_to_recover": 75, "total_bars": 155, "recovered": true }, { "peak_date": "2025-02-19", "peak": 535.54, "trough_date": "2025-04-08", "trough": 413.61, "depth": -0.227677, "recovery_date": "2025-06-24", "bars_to_trough": 34, "bars_to_recover": 52, "total_bars": 86, "recovered": true } ], "time_in_drawdown_pct": 0.931648, "interval": "1day" }, "meta": { "op": "drawdowns", "units": 2, "cost_usd": 0.0, "billing": "internal", "free_call": false, "free_calls_left": 0, "balance_usd": 5.0, "ms": 7, "interval": "1day", "data_as_of": "2026-11-12", "partial_last_bar": false } }
Every response has the same envelope: ok, data and meta (op, units, cost_usd, ms, interval, billing, balance_usd, data_as_of, partial_last_bar). Numbers are decimals (0.05 = 5%), dates ISO, and a value that cannot be computed is null.