# Price history (QuantSet API)

> Read daily OHLCV for one listing across US, international, crypto and index markets. The latest available window comes first, with ascending dates within each page. Use latest quotes for a batch of recent daily observations.

> ## 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/prices` · `get_price_history`

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: 1 credit for every 250 bars returned.

## Research questions

### What did Nvidia close at over its last five available trading days?

```http
GET https://api.quantset.dev/api/v1/prices?ticker=NVDA&limit=5
```

Read date, close and quote_currency together. The page presents those five observations in ascending order.

### Does my split-window comparison have a consistent share basis?

```http
GET https://api.quantset.dev/api/v1/prices?ticker=NVDA&basis=comparable&start=2024-06-03&end=2024-06-14
```

Inspect the adjustment labels and comparable_from against the requested window. Use verified adjusted fields when the calculation requires them.

## Reading the results

For a chart across splits, inspect adjustment and split_adj_close. For a return series including cash dividends, check adj_close and adjusted_as_of before using it.


## Coverage and limits

The limit counts observed bars. Holidays, missing sessions and a comparable-basis boundary can shorten the requested window.


## 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.
- `basis` (raw | comparable, optional): raw preserves all bars; comparable starts at the latest split or unit discontinuity.
- `format` (json | csv, optional): Response format: json or csv.
- `start` (string, optional): First date to include, as an ISO date (YYYY-MM-DD).
- `end` (string, optional): Last date to include, as an ISO date (YYYY-MM-DD).
- `limit` (integer, 1 to 20,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.
- `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.
- `quote_currency` (string): The currency prices are quoted in. London listings quote in pence, shown as GBp.
- `date` (string): The trading day or observation date, YYYY-MM-DD.
- `open` (number): The first traded price of the day.
- `high` (number): The highest traded price of the day.
- `low` (number): The lowest traded price of the day.
- `close` (number): The last traded price of the day, on the basis the adjustment label describes.
- `split_adj_close` (number): The close restated on today's share basis, so it is comparable across every split.
- `adj_close` (number): The close adjusted for splits and dividends. Published only for listings that pass all three evidence checks, and null otherwise.
- `adjusted_as_of` (string): The date the adjusted close series was last rebuilt. Adjusted values change after each new dividend or split.
- `change_pct` (number): The change from the previous close, in percent.
- `volume` (number): The amount traded that day, in the unit named by volume_unit.
- `dollar_volume` (number): The value traded that day in US dollars: close times volume.
- `market_cap` (number): The company's market value on that date, in US dollars.
- `shares_outstanding` (number): The number of shares in issue.
- `volume_unit` (shares | base_asset_units | index_points): What volume counts: shares, base asset units for crypto, or index points.
- `adjustment` (string): What has been established about splits in this price series: observed-continuous, observed-split-gap, provider-reported or unverified.

## Example

```
curl 'https://api.quantset.dev/api/v1/prices?ticker=NVDA&limit=5' -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.

## Which price endpoint to use

- `/api/v1/quotes` (Latest quotes): The latest daily bar for up to 100 listings in one call.
- `/api/v1/prices` (Price history): Daily history for one listing.
- `/api/v1/intraday` (Intraday bars): Hourly bars for a US listing.
- `/api/v1/market-session` (Live market session): The quote during today's session, or its 5-minute points.

## Questions

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

**What does Price history cost?** 1 credit 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. On the QuantSet MCP server it is the get_price_history tool, so Claude, ChatGPT, Cursor and other clients can call it with no code.

**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.

**Which close should I use for returns?** Use split_adj_close to compare prices across splits. Use adj_close for returns that include dividends, where it is published. The adjustment label says what has been established about the series.

Group: Prices and sessions
Docs page: https://quantset.dev/docs/api/prices
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
