Find a Free Historical Stock Market Data API
for Research and Backtesting寻找适合研究与回测的
免费历史股票市场数据 API
Compare free historical stock APIs by time span, market coverage, adjustments, frequency, limits, and licensing before you backfill a dataset.
回填历史数据集之前,应比较各免费历史股票市场数据 API 的历史跨度、市场覆盖范围、复权规则、数据频率、使用限额和许可条款。
Quick answer: what “free historical stock market data API” means快速解答:什么是免费历史股票市场数据 API
A free historical stock market data API should support more than one ticker’s price history. For market-wide research it must help reconstruct which securities were listed on each date, their identifiers and venues, daily or intraday OHLCV, corporate actions, and the calendar or benchmark context needed to compare them. A useful free tier exposes enough history and breadth for the intended universe, documents adjustments, and permits the planned use.
免费历史股票市场数据 API 不应只提供单只股票的价格历史。用于全市场研究时,它还应帮助还原每个历史日期有哪些证券上市、对应标识和交易场所、日线或盘中 OHLCV、公司行为,以及进行横向比较所需的交易日历或基准背景。实用的免费套餐应在历史跨度和市场广度上覆盖目标样本,清楚说明复权方法,并允许计划中的数据用途。
Backtests, factor research, screeners, portfolio analytics, model training, and reproducible market studies.
Start dates, bar intervals, delisted symbols, and corporate-action treatment vary by provider and exchange.
Expect caps on lookback, calls, symbols, intraday history, bulk export, redistribution, or commercial use.
适合回测、因子研究、选股、组合分析、模型训练和可复现的市场研究。
最早可用日期、K 线周期、是否覆盖退市证券以及公司行为的处理方式,会因服务商和交易所而异。
常见限制包括历史数据回溯期限、请求次数、可查询标的数量、日内历史数据跨度、批量导出、再分发和商业用途。
This page is about building a point-in-time market panel for cross-sectional backtests, factor research, breadth statistics, and universe screening. If the requirement is only one security’s raw or adjusted price series, a historical stock price API is the narrower fit. Market-wide work adds a harder problem: the universe itself changes through IPOs, delistings, mergers, ticker changes, share-class events, and exchange transfers.
本页关注的是构建历史时点的全市场面板,用于横截面回测、因子研究、市场宽度统计和股票池筛选。如果只需要单只证券的原始或复权价格序列,更窄的历史股票价格 API 即可满足需求。全市场研究还多了一项更困难的任务:股票池会随 IPO、退市、并购、代码变更、股份类别调整和转板不断变化。
What historical stock data should include历史股票数据应包含哪些内容
| Field字段 | What it tells you含义 | What to verify需要核对 |
|---|---|---|
| OHLCV | Price bars across the requested date range.指定日期范围内各周期的开盘价、最高价、最低价、收盘价和成交量。 | Interval, timezone, calendar, and missing sessions.时间粒度、时区、交易日历以及缺失的交易时段。 |
| Coverage覆盖范围 | Exchanges, securities, first available date, and granularity.覆盖的交易所与证券、最早可用日期及数据粒度。 | Delisted assets and survivorship bias.是否包含退市证券,以及是否存在幸存者偏差。 |
| Adjusted close复权收盘价 | A series normalized for splits and sometimes dividends.经过拆股调整、有时还计入分红影响的收盘价序列。 | Adjustment method and revision timing.复权计算方法及历史数据修订的生效时点。 |
| Symbol metadata证券代码与资产元数据 | Ticker, exchange, currency, and asset identity.证券代码、所属交易所、计价币种和对应资产的唯一标识。 | Delisted tickers and symbol changes.退市证券的历史代码及证券代码变更记录。 |
| Point-in-time universe历史时点股票池 | Listing, delisting, security type, primary venue, and status effective dates.上市、退市、证券类型、主要交易场所和状态生效日期。 | Today’s survivors are not substituted for the historical market.不能用今天仍存续的股票替代历史市场样本。 |
| Corporate actions公司行为 | Splits, dividends, mergers, spin-offs, symbol and share-class changes.拆股、分红、并购、分拆、证券代码及股份类别变更。 | Effective date, factor, cash amount, currency, and successor mapping.生效日期、调整因子、现金金额、币种和后续证券映射。 |
| Market context市场背景 | Venue calendar, market status, benchmarks, sectors, and classifications.交易场所日历、市场状态、基准、板块和分类体系。 | Taxonomy and index membership are versioned point in time.分类体系和指数成分均按历史时点建立版本。 |
| Provenance数据来源 | Provider, endpoint, source time, retrieval time, and dataset version.服务商、接口、来源时间、获取时间和数据集版本。 | Corrections and later backfills remain explainable.后续更正和数据回填都能够解释。 |
Reproduce one adjustment before trusting the series先复算一次复权,再决定是否采用该序列
Assume a stock closes at $100 and completes a 2-for-1 split before the next session. A raw series may show the next comparable price near $50; a split-adjusted series should restate the earlier $100 close to $50 so the chart does not report a false 50% loss. If the provider adjusts volume consistently, one million pre-split shares become two million split-adjusted shares. Price and volume factors move in opposite directions, so applying the price factor to both fields corrupts turnover and liquidity research.
假设某股票收于 100 美元,并在下一个交易日前完成 1 股拆为 2 股。原始价格序列中的下一可比价格可能接近 50 美元;拆股复权序列则应把此前的 100 美元重述为 50 美元,避免图表错误显示 50% 的亏损。如果供应商对成交量也做一致调整,拆股前的 100 万股会换算为 200 万股。价格和成交量的调整方向相反,若把价格因子直接套到成交量上,换手率和流动性研究都会失真。
| Series序列 | Example result示例结果 | Appropriate use适合用途 |
|---|---|---|
| Raw close原始收盘价 | $100 before split, about $50 after split拆股前 100 美元,拆股后约 50 美元 | Reconstructing the price actually printed on each date还原每个日期实际记录的市场价格 |
| Split-adjusted close拆股复权收盘价 | Earlier close restated from $100 to $50此前收盘价由 100 美元重述为 50 美元 | Price continuity and return calculations that exclude cash dividends保持价格连续,并计算不含现金分红的价格收益 |
| Total-return series总回报序列 | A $50 close followed by a $49 ex-dividend close plus a $1 dividend gives 0% total return, not −2%50 美元收盘后除息价为 49 美元并派息 1 美元,总回报为 0%,而不是 −2% | Performance analysis that reinvests or credits distributions计入现金分配或分红再投资的业绩分析 |
Do not accept a field named adjusted_close until the documentation states whether it includes splits, cash dividends, special dividends, rights issues, and later corrections. Save the raw bar, corporate-action record, provider factor, and dataset version so the adjusted value can be reproduced after a revision.
不能仅凭字段名 adjusted_close 就认定口径正确。文档必须说明它是否包含拆股、现金分红、特别股息、配股以及后续更正。应同时保存原始 K 线、公司行为记录、供应商调整因子和数据集版本,确保历史值被修订后仍能重新计算。
How to evaluate a free historical stock market data API如何评估免费历史股票市场数据 API
Check the exact exchanges, countries, ETFs, indices, and delisted securities you need. “Global” can still exclude important venues.
Know whether adjusted prices account for splits, dividends, or both, and whether historical values may be revised.
Translate per-minute and daily limits into your symbol count, backfill depth, retry policy, and update schedule.
Free access may permit personal research but restrict redistribution, display, caching, or commercial products.
Request listing and status history, not only current symbols. Test IPOs, bankruptcies, mergers, exchange transfers, foreign listings, ADRs, ETFs, and multiple share classes with stable IDs.
For several historical dates, compare expected and returned security counts by venue and type. Track missing-price rates, stale observations, null volume, currency gaps, and concentration in the covered universe.
Industry, sector, country, index membership, and primary listing can change. Confirm whether the API provides effective dates or only today’s classification.
Convert quotas, pagination, rows per response, and history windows into the cost and time to rebuild the entire market panel, including retries and daily updates.
逐项核对是否覆盖你需要的交易所、国家或地区、ETF、指数以及退市证券。即使服务商声称“覆盖全球”,仍可能遗漏某些重要交易场所。
确认复权价格是否计入拆股、分红或两者的影响,并了解已发布的历史数值日后是否可能修订。
结合证券代码数量、历史数据回填跨度、重试策略和更新计划,判断每分钟及每日请求限额实际能够支持多少数据请求。
免费访问或许允许个人研究,但可能限制数据再分发、公开展示、缓存或用于商业产品。
查询上市和状态历史,而不只是当前证券代码。使用稳定 ID 测试 IPO、破产退市、并购、转板、境外上市、ADR、ETF 和多类股份。
选取多个历史日期,按交易场所和证券类型比较预期与实际返回的证券数量,并统计缺失价格率、陈旧记录、成交量空值、币种缺口和覆盖样本集中度。
行业、板块、国家或地区、指数成分和主要上市地都可能变化。应确认 API 提供有效日期,还是只返回今天的分类结果。
将配额、分页、单次响应记录数和历史窗口换算为重建完整市场面板所需的时间与成本,并计入重试和每日增量更新。
A reliable historical-data ingestion workflow可靠的历史数据接入流程
- Backfill a small group of symbols and compare dates, OHLCV values, and adjustments with an exchange or issuer reference.
- Store raw responses separately from normalized bars so revisions remain auditable.
- Backfill in bounded date windows, checkpoint each batch, and resume safely after throttling or transient failures.
- Validate duplicates, gaps, zero volume, impossible prices, currency changes, and split discontinuities before analysis.
- Build the security master first, with company, listing, share-class, ticker, venue, currency, and status effective dates.
- Create dated universe snapshots from listing status and eligibility rules; never derive past constituents from the current endpoint.
- Join prices, corporate actions, classifications, and benchmark membership by stable IDs and valid-time intervals rather than ticker text alone.
- Publish a coverage report for every research date, including expected securities, returned rows, missing prices, stale values, exclusions, and dataset version.
- 先选取少量证券代码回填历史数据,再与交易所或证券发行人提供的参考数据对照,核对日期、OHLCV 数值及复权数据。
- 将 API 原始响应与标准化后的 K 线数据分开保存,确保后续的数据修订都有据可查。
- 将日期范围拆分为跨度可控的时间窗口,分批回填并为每批数据保存检查点,以便在触发请求频率限制或遇到临时故障后从中断处恢复。
- 分析前检查重复记录、数据缺口、零成交量、不合理的价格、计价币种变更,以及拆股引起的价格序列跳变。
- 先建立证券主数据,分别保存公司、上市地、股份类别、股票代码、交易场所、币种和状态的有效日期。
- 根据历史上市状态和资格规则生成按日期保存的股票池快照,不能使用当前接口反推出过去的成分。
- 通过稳定 ID 和有效时间区间关联价格、公司行为、行业分类和基准成分,不能只依靠股票代码文本。
- 为每个研究日期生成覆盖报告,列明预期证券数、实际记录数、缺失价格、陈旧数据、排除原因和数据集版本。
Validate the universe with two dated snapshots用两个日期的股票池快照验证点时逻辑
Use a deliberately small test universe. On January 31, securities A, B, and C are eligible. B delists on February 15, D completes its IPO on March 1, and C changes ticker while retaining the same stable security ID. The January snapshot must remain A, B, and C; the March snapshot should contain A, C under its new ticker, and D. Building January from today’s active-symbol endpoint would wrongly remove B and insert D—the exact survivorship and look-ahead errors a market-wide API must prevent.
可以用一个刻意缩小的股票池做验收:1 月 31 日,A、B、C 三只证券符合条件;B 于 2 月 15 日退市,D 于 3 月 1 日完成 IPO,C 更换了股票代码但稳定证券 ID 不变。1 月快照必须仍是 A、B、C;3 月快照则应包含 A、使用新代码的 C,以及 D。如果用今天的活跃证券接口重建 1 月股票池,就会错误删掉 B、提前加入 D,这正是市场级历史数据必须避免的幸存者偏差和前视偏差。
Acceptance output: for each snapshot, retain the effective date, stable security ID, ticker valid on that date, venue, listing status, eligibility reason, exclusion reason, price availability, and source dataset version. A missing bar is not permission to remove a security; it must remain in the universe with a reason such as halt, no trade, feed gap, or unavailable history.
验收输出:每个快照都应保存生效日期、稳定证券 ID、当日有效代码、交易场所、上市状态、纳入依据、排除原因、价格可用状态和来源数据集版本。某日缺少 K 线并不意味着可以把证券从股票池删除;它仍应保留,并标注停牌、无成交、数据源缺口或历史数据不可用等原因。
Use QVeris to discover stock data capabilities使用 QVeris 查找股票数据接口
QVeris helps agents discover and inspect callable historical market-data capabilities without hardcoding one provider first. Compare market coverage, identifier inputs, date-range and bulk behavior, returned fields, access requirements, and documented limits before routing a request. The application still owns point-in-time universe construction, security-master history, adjustments, classification versions, coverage reporting, licensing, and reproducibility.
QVeris 可帮助智能体查找并检查可调用的历史市场数据能力,无需预先绑定某一家服务商。路由请求前,可以比较市场覆盖、标识输入、日期范围与批量行为、返回字段、接入条件和公开限制。历史时点股票池构建、证券主数据历史、复权、分类版本、覆盖报告、许可和结果复现,仍由应用方负责。
FAQ常见问题
Some providers offer free tiers, but limits and licenses vary. Verify exchanges, history, adjustments, request caps, and permitted use.
Not always. Some APIs return raw and adjusted series; others require a separate endpoint or paid plan.
部分服务商提供免费套餐,但使用限额和许可条款各不相同。应核对交易所覆盖范围、可用历史跨度、复权规则、请求次数上限及允许的使用范围。
不一定。有些 API 会同时返回未复权价格序列和复权价格序列,另一些则需要调用独立接口或升级到付费套餐。
A price API can answer one symbol and date range. Market-wide research also needs the point-in-time security universe, identifier history, listings, delistings, classifications, corporate actions, and coverage evidence.
Removing failures and acquired companies leaves only survivors, which can inflate returns and distort factor distributions. Retain delisting dates, final prices, successor mappings, and the reason coverage ended.
No. Index membership changes through additions, deletions, mergers, and methodology reviews. Use effective-dated constituent history or describe the universe as a present-day cohort study.
For each date and venue, report expected eligible securities, returned securities, missing and stale prices, excluded types, identifier failures, currency gaps, and the exact source version.
价格 API 可以回答某只证券在指定日期范围内的价格;全市场研究还需要历史时点证券范围、标识历史、上市与退市、分类、公司行为和覆盖证据。
如果失败企业和被收购企业从样本中消失,研究只剩幸存者,可能高估收益并扭曲因子分布。应保留退市日期、最后价格、后续证券映射和覆盖终止原因。
不可以。指数会因调入、调出、并购和方法审查而改变。应使用带生效日期的历史成分;否则必须明确说明研究对象只是今天成分股的历史表现。
每个日期和交易场所都应报告预期合格证券数、实际返回证券数、缺失与陈旧价格、被排除的证券类型、标识失败、币种缺口和确切数据来源版本。
