Endpoints / Returns, risk and historical multiples
Daily returns
Price or total return between consecutive US sessions, with explicit reason codes when withheld.
/api/v1/returnsSandbox3 credits per 250 bars Try the sample free with mw_demo.
Parameters
tickerstringrequiredCatalog selector, such as NVDA, 7203.T, or a canonical ID such as us:NVDA.
limitinteger, 1 to 2,000Maximum number of rows to return.
Optional parameters (6)
basisprice | totalstartstringFirst date to include, as an ISO date (YYYY-MM-DD).
endstringLast date to include, as an ISO date (YYYY-MM-DD).
cursorstringOpaque continuation. Pass it unchanged with the original filters and snapshot_id.
snapshot_idstringPin the request to one immutable snapshot so a read across several pages stays consistent.
formatjson | csvReturn a JSON page or UTF-8 CSV rows.
Response
Each row has these fields. Rows arrive in data, next to schema_version, snapshot_id, total_count, next_cursor, provenance.
instrument_idstringThe listing's ID: a market prefix, a colon, then the ticker. For example us:NVDA, global:SHEL.L, crypto:BTCUSDT or index:SPX.
datestringThe trading day or observation date, YYYY-MM-DD.
previous_datestringThe trading day before this one.
session_countintegerHow many trading days the figure covers.
return_basisprice | totalWhether the return counts price only or includes dividends.
return_pctnumberThe return over the period, in percent.
statusavailable | no_previous_close | session_gap | split_boundary | adjusted_close_unavailableThe current state of the record.
adjusted_as_ofstringThe date the adjusted close series was last rebuilt. Adjusted values change after each new dividend or split.
Research questions
Which daily moves in Apple can I use in a return calculation?
GET https://api.quantset.dev/api/v1/returns?ticker=us:AAPL&limit=10Use return_pct only after checking status, previous_date and session_count for each observation.
How do returns change when verified dividend-adjusted prices are used?
GET https://api.quantset.dev/api/v1/returns?ticker=AAPL&basis=total&limit=10Match dates with the price-basis series, then compare only intervals with a usable status in both.
Reading the results
A price move across a split or a missing session can look like an ordinary daily gain. The status and return_basis tell you whether adjacent levels support the calculation.
Coverage and limits
Coverage requires a usable predecessor. Preserve withheld returns as missing when calculating averages or volatility.
Related guides
CSV, spreadsheets and agents
The same rows as a spreadsheet-ready table. Add format=csv to the request.
curl "https://api.quantset.dev/api/v1/returns?ticker=us:AAPL&limit=10&format=csv" -H "X-API-Key: mw_demo"
Or pull it straight into Google Sheets with one formula. Excel and larger pulls
=IMPORTDATA("https://api.quantset.dev/api/v1/returns?ticker=us:AAPL&limit=10&format=csv&apikey=mw_demo")AI agents call this endpoint over HTTP, or read its Markdown version. Connect Claude, ChatGPT, Cursor or your own agent
Errors
| Status | Code | What to do |
|---|---|---|
| 400 | conflicting_credentials | Supply one credential. |
| 401 | invalid_credentials | Supply a valid API key. |
| 402 | insufficient_credits | Reduce the request ceiling or refill your credits. |
| 403 | insufficient_access | Your key does not have the required access. |
| 404 | unknown_instrument | The requested listing is absent from the catalog. |
| 409 | snapshot_changed | Start the read again with the current snapshot. |
| 413 | export_too_large | Reduce the page size before requesting CSV again. |
| 422 | invalid_parameter, ambiguous_instrument | Correct the named parameter and retry. |
| 429 | rate_limited | Wait for Retry-After seconds. |
| 500 | internal_error | The request could not be completed. |
| 503 | temporarily_unavailable | Retry safe reads after a short delay. |
Questions
- Can I try Daily returns without signing up?
- Yes. Use the sandbox key mw_demo and the sample selectors on this page.
- What does Daily returns 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.
More in returns, risk and historical multiples
GET /api/v1/total-returnSandboxDrawdownsGET /api/v1/drawdownsSandboxMulti-asset correlations and riskGET /api/v1/analytics/correlationsSandboxHistorical trailing P/EGET /api/v1/historical-valuationsSandboxBenchmark-relative returnsGET /api/v1/benchmark-relative-returnsSandbox