QVeris

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

Historical price charts and market analysis across multiple screens
Historical price charts and market analysis across multiple screens
Historical price charts and market analysis across multiple screens

TL;DR

Best for simple daily history

Start with Alpha Vantage or Tiingo when the core requirement is documented daily OHLCV plus corporate-action context.

Best for U.S. intraday pipelines

Massive is the stronger shortlist candidate when you need U.S. aggregates, trades, quotes, or bulk-oriented delivery.

Best for broad product coverage

Compare Twelve Data for global multi-asset workflows and FMP when historical prices must sit beside company fundamentals.

No universal winner

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 typeTypical fieldsBest useMain risk
EOD / dailyOHLCV, date, adjusted closeCharts, portfolio returns, screeningAdjustment policy and delayed corrections
Intraday bars1m–4h OHLCV, session, VWAPBacktesting, alerts, execution researchHistory limits, missing bars, session rules
Trades and quotesPrice, size, exchange, conditions, timestampLiquidity and microstructure analysisLarge volume and exchange licensing
Corporate actionsSplits, dividends, ex-date, factorsAdjusted history and total-return analysisRevisions 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.

Identity

Ticker plus a stable identifier, exchange, currency, asset type, and active/delisted status.

Time

Trading date, timezone, session, interval, and whether the timestamp marks bar open or close.

Price

Open, high, low, close, volume, and optionally VWAP, trade count, bid, and ask.

Adjustments

Adjusted close or adjusted OHLCV, split factor, dividend amount, and methodology.

Lineage

Source, update time, revision status, exchange conditions, and provider-specific quality flags.

Pagination

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.

APIDocumented strengthsBest fitVerify before use
Alpha VantageDocuments 20+ years of daily stock history, plus raw OHLCV, adjusted close, split and dividend events, JSON, and CSV.Prototypes, notebooks, simple daily-history integrationsAdjusted endpoint entitlement, full output access, rate limits
MassiveCustom U.S. stock OHLC bars, adjustable intervals, split-adjusted output, trades, quotes, and pagination-oriented pipelines.U.S. intraday research and larger ingestion pipelinesPlan history, empty intervals, session policy, data rights
Twelve DataA time-series contract across equities and other asset classes, flexible intervals, metadata, REST, and SDK access.Global or multi-asset dashboards and research toolsPer-market coverage, credit consumption, exchange entitlement
TiingoRaw and adjusted EOD OHLCV, cash dividends, split factors, metadata, and documented correction handling.Adjusted daily history, return series, portfolio analyticsTicker universe, update timing, storage and redistribution rights
FMPFull and light EOD endpoints, unadjusted and dividend-adjusted variants, intraday intervals, VWAP, and adjacent fundamentals.Research products combining price and company dataEndpoint 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.

Python · request and validate
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.

Trading calendar and timezone

Confirm that bars align with the listing exchange, holidays, half-days, daylight-saving changes, and pre/post-market policy.

Corporate-action reconciliation

Test known split and dividend dates. Compare raw and adjusted values and verify whether volume is adjusted consistently.

Missing and duplicate bars

Detect gaps against the expected calendar, duplicate timestamps, zero-volume anomalies, impossible OHLC relationships, and outlier returns.

Point-in-time integrity

Backtests need the data that would have been knowable on each date, not today's cleaned universe projected backward.

Delisted securities and symbol history

Exclude them and survivorship bias appears. Store stable identifiers and symbol-effective dates instead of treating tickers as permanent IDs.

Licensing and retention

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.

1. Discover

Describe the outcome: “daily adjusted OHLCV for U.S. equities with split and dividend context,” rather than searching only by provider name.

2. Inspect

Review required parameters, output schema, adjustment fields, date limits, cost signals, and examples before writing production logic.

3. Call and validate

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

What is a historical stock price API?

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.

What fields should the API return?

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.

What is adjusted close?

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.

Can I use a free API?

Yes for many prototypes and small research tasks. Before production use, check limits, history depth, delayed data, commercial rights, corrections, and support.

How do I get prices in Python?

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.

Is price history enough for backtesting?

No. You also need point-in-time universes, corporate actions, delisted names, market calendars, trading costs, and controls for look-ahead and survivorship bias.

Daily data or minute bars?

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.

How does QVeris help?

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.