# Drawdowns (QuantSet API)

> Closing drawdown from the running peak within each uninterrupted segment from start.

> ## For AI agents
> The QuantSet API is at https://api.quantset.dev. Send the key in the `X-API-Key` header. The sandbox key `mw_demo` needs no signup and reads the sample listings.
> No key yet? An agent can open an account on its own: https://api.quantset.dev/skill.md
> Connect an MCP client to https://api.quantset.dev/mcp. Client setup is at https://api.quantset.dev/agents.md.
> Start with https://api.quantset.dev/llms.txt or read the full reference at https://api.quantset.dev/llms-full.txt. The OpenAPI file is https://api.quantset.dev/openapi.json. Add `.md` to any docs URL to get that page as Markdown.

`GET https://api.quantset.dev/api/v1/drawdowns` · `get_drawdowns`

Send a key in the `X-API-Key` header. Try `mw_demo` with the sample selectors.
Add `format=csv` to get a UTF-8 table.
Price: 3 credits for every 250 bars returned.

## Research questions

### How far did Apple fall from its highest close since the chosen start?

```http
GET https://api.quantset.dev/api/v1/drawdowns?ticker=us:AAPL&start=2026-10-02&limit=10
```

Compare drawdown_pct, peak_date and segment_start_date on the row of interest.

### How deep was the decline from a dividend-adjusted closing peak?

```http
GET https://api.quantset.dev/api/v1/drawdowns?ticker=AAPL&basis=total&start=2024-01-02&end=2024-03-28
```

Use the most negative usable drawdown in the returned window and retain its peak_date and segment_start_date.

## Reading the results

The reference peak is established inside the selected window. Moving start can change the drawdown on the same observation date.


## Coverage and limits

Gaps and unusable returns break the series into segments. Keep start fixed when paging and avoid comparing peaks across a break.


## Related guides

- [Choose a listing across exchanges](https://quantset.dev/docs/guides/instrument-ids)
- [Continue a snapshot-pinned read](https://quantset.dev/docs/guides/pagination)
- [Interpret raw and adjusted prices](https://quantset.dev/docs/guides/adjusted-close-splits-api)

## Parameters

- `ticker` (string, required): Catalog selector, such as NVDA, 7203.T, or a canonical ID such as us:NVDA.
- `start` (string, required): First date to include, as an ISO date (YYYY-MM-DD).
- `basis` (price | total, optional)
- `end` (string, optional): Last date to include, as an ISO date (YYYY-MM-DD).
- `limit` (integer, 1 to 2,000, optional): Maximum number of rows to return.
- `cursor` (string, optional): Opaque continuation. Pass it unchanged with the original filters and snapshot_id.
- `snapshot_id` (string, optional): Pin the request to one immutable snapshot so a read across several pages stays consistent.
- `format` (json | csv, optional): Return a JSON page or UTF-8 CSV rows.
- `X-Max-Credits` (integer, 0 to 999,999,999,999, optional, in header): Refuse the request if its maximum charge exceeds this ceiling.
- `X-Workflow-Id` (string, optional, in header): Optional printable identifier for grouping charges in a research workflow.

## Response fields

- `instrument_id` (string): The listing's ID: a market prefix, a colon, then the ticker. For example us:NVDA, global:SHEL.L, crypto:BTCUSDT or index:SPX.
- `date` (string): The trading day or observation date, YYYY-MM-DD.
- `return_basis` (price | total): Whether the return counts price only or includes dividends.
- `drawdown_pct` (number): The fall from the running peak to this close, in percent.
- `peak_date` (string): The date of the running peak the drawdown is measured from.
- `segment_start_date` (string): A date, YYYY-MM-DD.
- `status` (available | new_segment | adjusted_close_unavailable): The current state of the record.
- `adjusted_as_of` (string): The date the adjusted close series was last rebuilt. Adjusted values change after each new dividend or split.

## Example

```
curl 'https://api.quantset.dev/api/v1/drawdowns?ticker=us:AAPL&start=2026-10-02&limit=10' -H 'X-API-Key: mw_demo'
```

## Responses

- 200 Successful Response
- 400 Supply one credential.
- 401 Supply a valid API key.
- 402 Reduce the request ceiling or refill your credits.
- 403 Your key does not have the required access.
- 404 The requested listing is absent from the catalog.
- 409 Start the read again with the current snapshot.
- 413 Reduce the page size before requesting CSV again.
- 422 Correct the named parameter and retry.
- 429 Wait for Retry-After seconds.
- 500 The request could not be completed.
- 503 Retry safe reads after a short delay.

## Questions

**Can I try Drawdowns without signing up?** Yes. Use the sandbox key mw_demo and the sample selectors on this page.

**What does Drawdowns cost?** 3 credits for every 250 bars returned. A request that fails costs nothing.

**Which plan includes it?** Every account. Free credits, credit packs and subscriptions all read this data.

**How do I read more than one page?** When next_cursor is not null, send it back as cursor together with the same snapshot_id, and repeat until it is null.

**Can I get it as CSV or in a spreadsheet?** Yes. Add format=csv to the request. In Google Sheets, put that URL inside IMPORTDATA with a data-only key in apikey.

**Can an AI agent use this?** Yes. An agent calls it over HTTP like any client. Add .md to this page's address for a version written for agents.

**What does null mean in the response?** The value could not be confirmed. It is never a zero, so treat it as missing in your own calculations.

Group: Returns, risk and historical multiples
Docs page: https://quantset.dev/docs/api/drawdowns
Integrations & Ecosystem: https://quantset.dev/integrations (Claude/Cursor MCP, LangGraph, PydanticAI, CrewAI, Agno, Vercel AI SDK, Mastra, Sheets =QUANTSET(), Excel, Notion & x402)
Full API guide: https://api.quantset.dev/llms-full.txt
