# Deep price history

`GET https://firm.wealthnow.io/api/v3/prices/history/{ticker}`

- Plan: Starter and up
- Price: 4 credits per call (failed requests are free)
- MCP tool: `prices_history`
- Source: https://app.wealthnow.io/docs/reference/prices-history

Survivorship-bias-free daily price history: archive daily closes, returns, volume and cumulative split adjustment factors (cfacpr/cfacshr) 2000-2024 (archive_through 2024-12-31), stitched with live daily bars 2025→today, plus the delisting record. The archive's 2000-2024 years hold only US common stock listed on NYSE, NYSE American or Nasdaq, so an ETF, fund, ADR or other listing has no archive rows in them: its series can start in 2025, or jump from 1999 to 2025. history_coverage says where rows are missing (firmPricesHistoryCoverage.v1): gaps lists each stretch, earliest first and at most 16 (gaps_truncated, n_gaps), with last_before, first_after and its reason: archive_holds_no_rows_for_this_symbol where the archive holds no rows for the window's archive years (before the first row, or the whole window), archive_live_boundary where the archive's rows stop and the next row is a live bar more than 31 calendar days later, no_rows_in_served_window where two consecutive rows from one source are more than 31 calendar days apart. The block's reason is the first of those three that any gap carries, and a warning names it. None of them means the security did not trade on the missing days. Absent when there is no such stretch. ONE basis on every row: prc is the price as traded, prc/cfacpr is on today's share basis (vol*cfacshr likewise); price_basis says which live rows were restored to as-traded, and a step no split explains is refused (503 price_series_discontinuous), never served. ret is the total return (dividends on their ex-date) and retx the price return, on archive and live rows alike; if the live dividend record cannot be read, live ret is null and returns_basis says why. On live rows a spin-off or other non-cash distribution is not added to ret or retx: a day the distribution record names is withheld (null), and returns_basis.live_distributions says how far it checks. Rows before 2000 carry null cfacpr/cfacshr; an adjustment block then names them, and ret/retx stay valid. interval defaults to 1d. Omit it or pass interval=1d. A missing grain used to 504; the route is daily-only. A small limit (e.g. 5) returns the newest live daily bars without scanning the archive. Intraday intervals 422 to /api/v3/tape/bars/{ticker}?date=YYYY-MM-DD. Not /fundamentals/prices (vendor OHLCV) and not /reference/history (identifier timeline). A symbol another issuer traded under before its current holder (PARA, GORO, CASK, CTVA and others) is refused for a window that starts before the holder took it: 422 policy_withheld, error_code symbol_reused, which is not an empty result; ask again from symbol_reuse.serve_from. With no start, a default window that would begin before the change begins on serve_from instead (symbol_reuse.window_started_at_change); with an end before the change, it is the 422.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `ticker` | path | string | yes |  |
| `start` | query | string | no | First day YYYY-MM-DD (default: the last 365 days; the archive starts 2000-01-01) |
| `end` | query | string | no | Last day YYYY-MM-DD (default today) |
| `limit` | query | integer | no | Max daily rows, newest first (5 = last week; 15000 ≈ 60y). Small limits skip the archive scan. Default `15000`. Range 1 to 15000. |
| `interval` | query | string | no | Daily bars only. Default 1d. Pass 1d for the research-grade-style series (permno, ret, cfacpr). A missing grain used to 504. 1m/5m/15m/1h → 422; use /api/v3/tape/bars?date=. One of `1d`, `day`, `daily`. Default `1d`. |

## Example request

```bash
curl -H "Authorization: Bearer $WEALTHNOW_API_KEY" \
  "https://firm.wealthnow.io/api/v3/prices/history/AAPL?start=2020-01-01&end=2024-12-31"
```

## Errors

| Status | Code | Meaning |
|---|---|---|
| 400 | `invalid_ticker` | The request is malformed, for example a ticker that is not a symbol: `invalid_ticker`, refused before any credit is reserved, with `param` naming the parameter. Not billed. |
| 401 | `unauthorized` | Missing or invalid API key. |
| 402 | `plan_required` | Your plan does not include this tool, you are out of credits, or your workspace's spend cap paused its keys. `plan_required` names the plan that unlocks the tool; `usage_exceeded` means the credit balance is spent; `spend_cap_reached` means the key is paused until the cap resets or is raised: `detail` names the cap and the reset, `cap_usd` and `resets_at` (ISO 8601) carry them, and `doc_url` links pricing and credits. Not billed. |
| 403 | `scope_denied` | This API key is limited to some products and this tool is not one of them. `product` names the tool's product and `scopes` the key's products. An upgrade does not change it: use a key whose scopes include the product, or change this key's scopes. Not billed. |
| 404 | `unknown_ticker` | No data source lists this ticker, active or delisted: the market-data listing and the security master both say it does not exist. `param` names the parameter. Not billed. Best-effort: it is answered only when the route itself found nothing, and after 20 lookups of new symbols per API key per minute the route's own answer stands. |
| 422 | `validation` | A parameter is missing, out of range or the wrong type; `param` names it. Not billed. |
| 429 | `rate_limited` | Your plan's rate limit is spent for this window. Retry after `Retry-After` seconds. Not billed. |
| 503 | `paid_data_unavailable` | The data could not be served completely right now; retry later. Not billed. |
| 504 | `request_timeout` | The request ran past the server's time budget; retry. Not billed. |
