Finance & Market Data
Historical Stock Price API: 5 Best Options (2026)
Compare historical stock price APIs for adjusted OHLCV, intraday history, corporate actions, Python integration, licensing, data quality, and backtesting.
Published: April 13, 2026 · By the QVeris Team


TL;DR
Start with Alpha Vantage or Tiingo when the core requirement is documented daily OHLCV plus corporate-action context.
Massive is the stronger shortlist candidate when you need U.S. aggregates, trades, quotes, or bulk-oriented delivery.
Compare Twelve Data for global multi-asset workflows and FMP when historical prices must sit beside company fundamentals.
Benchmark the exact endpoint, history window, adjustment policy, quota, correction behavior, and license your application needs.
Historical stock price API types and search intent
“Historical stock price API” covers four different buying intents: end-of-day bars for charts, adjusted daily history for returns, intraday bars for strategy research, and trades or quotes for market microstructure. Write down the output contract and decision horizon first; only then compare providers.
| Data type | Typical fields | Best use | Main risk |
|---|---|---|---|
| EOD / daily | OHLCV, date, adjusted close | Charts, portfolio returns, screening | Adjustment policy and delayed corrections |
| Intraday bars | 1m–4h OHLCV, session, VWAP | Backtesting, alerts, execution research | History limits, missing bars, session rules |
| Trades and quotes | Price, size, exchange, conditions, timestamp | Liquidity and microstructure analysis | Large volume and exchange licensing |
| Corporate actions | Splits, dividends, ex-date, factors | Adjusted history and total-return analysis | Revisions and provider methodology differences |
Daily data or intraday historical bars?
Choose daily bars when decisions are made over days, weeks, or months; they are cheaper to store and easier to reconcile against splits and dividends. Choose intraday bars only when entry timing, session boundaries, or execution assumptions materially change the result. Minute data adds missing-bar rules, pre/post-market policy, daylight-saving changes, and much heavier validation.
Fields every historical stock data API should expose
Treat the response as a data contract, not a bag of numbers. Every bar must identify the instrument, exchange calendar, currency, timezone, interval, adjustment state, and source. A close value without that context cannot be reproduced or safely compared across providers.
Ticker plus a stable identifier, exchange, currency, asset type, and active/delisted status.
Trading date, timezone, session, interval, and whether the timestamp marks bar open or close.
Open, high, low, close, volume, and optionally VWAP, trade count, bid, and ask.
Adjusted close or adjusted OHLCV, split factor, dividend amount, and methodology.
Source, update time, revision status, exchange conditions, and provider-specific quality flags.
Next cursor, result limit, total count, sort direction, and deterministic date boundaries.
Adjusted close vs raw close
Raw close is the observed session close; adjusted close rewrites earlier values for corporate actions. The word “adjusted” is incomplete unless the provider states whether it covers splits, dividends, or both. Preserve raw bars and action events whenever possible. Tiingo, for example, documents raw and adjusted OHLCV beside dividend and split factors in its official end-of-day API documentation.
5 best historical stock price API options
The five options below solve different jobs; this is a decision shortlist, not a permanent price ranking. Capabilities are based on current public documentation. Test the exact endpoint and verify plan entitlements, exchange coverage, adjustment logic, quotas, and data rights before committing.
| API | Documented strengths | Best fit | Verify before use |
|---|---|---|---|
| Alpha Vantage | Documents 20+ years of daily stock history, plus raw OHLCV, adjusted close, split and dividend events, JSON, and CSV. | Prototypes, notebooks, simple daily-history integrations | Adjusted endpoint entitlement, full output access, rate limits |
| Massive | Custom U.S. stock OHLC bars, adjustable intervals, split-adjusted output, trades, quotes, and pagination-oriented pipelines. | U.S. intraday research and larger ingestion pipelines | Plan history, empty intervals, session policy, data rights |
| Twelve Data | A time-series contract across equities and other asset classes, flexible intervals, metadata, REST, and SDK access. | Global or multi-asset dashboards and research tools | Per-market coverage, credit consumption, exchange entitlement |
| Tiingo | Raw and adjusted EOD OHLCV, cash dividends, split factors, metadata, and documented correction handling. | Adjusted daily history, return series, portfolio analytics | Ticker universe, update timing, storage and redistribution rights |
| FMP | Full and light EOD endpoints, unadjusted and dividend-adjusted variants, intraday intervals, VWAP, and adjacent fundamentals. | Research products combining price and company data | Endpoint differences, adjustment variant, plan availability |
Comparison basis: public provider documentation reviewed August 3, 2026. This table does not guarantee QVeris availability for every provider and does not replace current plans, exchange terms, or licenses.
What about a free historical stock price API?
Free access is useful for validating schemas, chart rendering, and small personal datasets. It is not a proxy for production suitability. Check whether the free plan includes the endpoint you need, how much history it returns, whether data is delayed, whether adjusted prices are included, and whether commercial storage or redistribution is permitted. Do not design a production database around a quota that you have not load-tested.
How to get historical stock prices with an API in Python
Put provider-specific request and parsing logic behind an adapter. The rest of the application should receive one normalized bar contract even when upstream field names, authentication, pagination, or adjustment flags differ. This example keeps the endpoint and key configurable and validates required fields before storage.
import os
from datetime import date
import requests
API_URL = os.environ["HISTORICAL_STOCK_API_URL"]
API_KEY = os.environ["HISTORICAL_STOCK_API_KEY"]
response = requests.get(
API_URL,
params={
"symbol": "AAPL",
"start": "2025-01-01",
"end": date.today().isoformat(),
"interval": "1day",
"adjusted": "true",
},
headers={"Authorization": f"Bearer {API_KEY}"},
timeout=20,
)
response.raise_for_status()
payload = response.json()
# Implement this adapter from the inspected provider schema.
bars = extract_bars(payload)
required = {"timestamp", "open", "high", "low", "close", "volume"}
for bar in bars:
missing = required.difference(bar)
if missing:
raise ValueError(f"Missing fields: {sorted(missing)}")
print(f"validated {len(bars)} historical bars")
Normalize before storing the response
Normalize symbol identifiers, timestamps, timezone, interval labels, numeric precision, null values, and adjustment flags before storage. Preserve the provider name and retrieval timestamp for lineage. Use a unique key such as instrument ID + interval + bar timestamp, and make ingestion idempotent so corrected bars can be safely upserted.
Handle pagination, retries, and rate limits
Request bounded date windows, persist the last successful cursor, retry only transient failures, and add jittered backoff for 429 and 5xx responses. Do not retry authentication, entitlement, or invalid-symbol errors indefinitely. Cache immutable historical windows, but schedule a short correction window for recent sessions because vendors may update late trades or corporate actions.
Historical market data quality checklist
A 200 response proves transport, not research quality. Before accepting a provider, run a fixed validation set containing known splits, dividends, holidays, missing sessions, symbol changes, and delisted securities.
Confirm that bars align with the listing exchange, holidays, half-days, daylight-saving changes, and pre/post-market policy.
Test known split and dividend dates. Compare raw and adjusted values and verify whether volume is adjusted consistently.
Detect gaps against the expected calendar, duplicate timestamps, zero-volume anomalies, impossible OHLC relationships, and outlier returns.
Backtests need the data that would have been knowable on each date, not today's cleaned universe projected backward.
Exclude them and survivorship bias appears. Store stable identifiers and symbol-effective dates instead of treating tickers as permanent IDs.
Confirm whether your plan permits internal storage, customer display, derived analytics, redistribution, or model training.
Avoid look-ahead and survivorship bias
Do not build a 2018 backtest from the companies that survive in an index today. Use point-in-time constituents, include delisted securities, and separate event date from the date your system could have received the event. Corporate-action corrections can also rewrite historical bars, so keep ingestion timestamps and dataset versions for reproducibility.
Use QVeris to discover and call historical stock data capabilities
QVeris does not replace market-data due diligence. It gives an agent a consistent workflow for discovering candidate capabilities, inspecting the current input/output contract and cost signals, and calling the selected tool without baking discovery logic into the application.
Important: QVeris is not presented here as the original exchange data source. Available providers, schemas, fields, prices, and entitlements are dynamic. Use Discover to find candidates, Inspect to verify the current contract, and Call only after the capability fits your task.
Describe the outcome: “daily adjusted OHLCV for U.S. equities with split and dividend context,” rather than searching only by provider name.
Review required parameters, output schema, adjustment fields, date limits, cost signals, and examples before writing production logic.
Submit structured parameters, validate the returned dates and fields, and record the selected capability and execution identifier in your lineage log.
Start with the QVeris REST API reference, review the Python SDK, or browse related guidance on free stock APIs and real-time stock price APIs.
Historical stock price API selection checklist
- Coverage: exchanges, countries, asset types, delisted securities, ETFs, and identifier history.
- Depth: earliest date, daily vs intraday retention, and whether complete history requires another plan.
- Adjustments: split-only or split-and-dividend, adjusted close or adjusted OHLCV, and revision policy.
- Delivery: REST, SDK, CSV, bulk files, pagination, compression, and multi-symbol requests.
- Operations: quotas, timeout behavior, status visibility, support, corrections, and versioning.
- Rights: internal use, commercial display, storage, redistribution, derived data, and model training.
- Migration: stable internal schema, provider adapter, cached raw payloads, and a tested fallback plan.
Historical stock price API FAQ
It returns time-series market data for a security, usually timestamps and OHLCV. Depending on the provider, it may also include adjusted prices, dividends, splits, trades, quotes, or metadata.
Require symbol, stable identifier, exchange, currency, timestamp, interval, open, high, low, close, volume, and adjustment status. Backtests usually need corporate actions and delisted securities too.
It is a historical close restated for corporate actions. Providers differ on whether they adjust for splits only or also dividends, so verify the methodology.
Yes for many prototypes and small research tasks. Before production use, check limits, history depth, delayed data, commercial rights, corrections, and support.
Call a dated REST endpoint, validate the status and schema, normalize the returned bars, and store them with provider and retrieval metadata. Keep keys in environment variables.
No. You also need point-in-time universes, corporate actions, delisted names, market calendars, trading costs, and controls for look-ahead and survivorship bias.
Use daily bars for longer-horizon analysis and reporting. Use intraday bars only when the strategy depends on within-session timing and you can model execution realistically.
QVeris helps agents discover candidate capabilities, inspect their current schemas and cost signals, and call a selected capability through one protocol.
Official documentation and related guides
A verified profile link does not guarantee entitlement, field availability, price or current execution success; inspect the current contract before calling.
