Stock Data API Guide股票数据 API 指南

Find a Free EOD Stock Data API
for Daily OHLCV
查找适用于每日 OHLCV 的
免费 EOD 股票数据 API

Evaluate free end-of-day stock APIs by market coverage, close-price definition, finalization time, corporate-action treatment, history depth, rate limits, and export format before you build.

构建数据流程前,应从市场覆盖范围、收盘价口径、数据最终确认时间、公司行为处理方式、历史跨度、请求限额和导出格式等方面评估免费的股票日终数据 API。

Hand-drawn workflow from market close and daily OHLCV data through an API request to backtesting and reporting

Quick answer: what “free EOD stock data API” means快速解答:免费 EOD 股票数据 API 是什么

An EOD stock data API returns one daily observation for each completed trading session, usually as open, high, low, close, and volume (OHLCV). It is designed for nightly portfolio valuation, daily-factor research, screeners, reports, and backtests—not for intraday execution. A useful free tier must explain which exchanges and security types it covers, what its “close” represents, when a bar becomes final, and how splits, dividends, symbol changes, and late corrections affect history.

EOD 股票数据 API 通常为每个已经结束的交易日返回一条日线记录,包括开盘价、最高价、最低价、收盘价和成交量(OHLCV)。它适合夜间投资组合估值、日频因子研究、选股、报告和回测,并不适合盘中交易执行。真正可用的免费套餐还应说明覆盖哪些交易所和证券类型、“收盘价”采用什么口径、日线何时最终确认,以及拆股、分红、代码变更和盘后修订会如何影响历史数据。

Do not assume that the first number published after the bell is an immutable official close. Depending on the market and provider, the value may be the last eligible trade, a closing-auction price, a consolidated close, or a vendor-calculated reference price. Futures and some other instruments may use a settlement price instead. For a production workflow, this definition matters more than whether the endpoint responds in 100 or 500 milliseconds.

不要把收盘铃响后最先出现的数字直接当成不可变的官方收盘价。不同市场和供应商可能采用最后一笔合格成交、收盘竞价价、综合行情收盘价或供应商计算的参考价;期货等品种还可能使用结算价。对于生产级日线流程,这一口径通常比接口响应是 100 毫秒还是 500 毫秒更重要。

Best for

Backtests, screeners, research notebooks, portfolio reports, and dashboards that do not require live ticks.

Final, not merely late

A bar may appear soon after the close but remain provisional until auctions, late reports, and corrections are processed.

Free has limits

Expect caps on requests, history, exchanges, symbols, bulk downloads, redistribution, or commercial use.

适用场景

适合回测、选股器、研究笔记本、投资组合报告,以及不需要实时逐笔行情的仪表盘。

要最终值,不只是延迟值

日线可能在收盘后很快出现,但在竞价、迟报成交和修订处理完成前,它仍可能只是初步值。

免费并非无限

免费套餐通常会限制调用次数、历史跨度、交易所覆盖、标的数量、批量下载、再分发或商业用途。

What a daily stock data response should include日线股票数据接口应返回哪些字段

Field字段What it tells you字段含义What to verify核对事项
OHLCPrices formed during the regular session or another documented session window.常规交易时段或供应商明确说明的其他时段内形成的开高低收价格。Whether extended-hours trades are included and whether “close” means last trade, auction close, official close, or settlement.是否包含盘前盘后成交,以及“收盘价”究竟指最后成交价、收盘竞价价、官方收盘价还是结算价。
Session identity交易日标识Trading date, exchange, timezone, currency, and session status.交易日期、交易所、时区、计价币种和交易状态。Early closes, holidays, cross-listed securities, and date boundaries that differ from UTC.提前收盘、节假日、跨市场上市证券,以及与 UTC 日期不同的本地交易日边界。
Volume成交量Reported shares or contracts traded during the defined session.指定交易时段内报告的成交股数或合约数。Units, venue aggregation, odd lots, auction volume, and post-close corrections.计量单位、跨场所汇总、零股交易、竞价成交量和盘后修订规则。
Raw and adjusted values原始值与复权值Unadjusted market observations plus a series normalized for splits and, sometimes, dividends.未经处理的市场观测值,以及针对拆股、有时也包含分红调整后的连续序列。Adjustment scope, factor effective date, dividend convention, and whether all OHLC fields or only close are adjusted.复权范围、因子生效日、分红处理惯例,以及是调整全部 OHLC 字段还是只调整收盘价。
Publication status发布状态Whether the bar is provisional, corrected, or final, with source and update timestamps.日线是初步值、修订值还是最终值,并附带来源时间和更新时间。The provider’s correction window, restatement policy, and whether prior versions remain retrievable.供应商的修订窗口、重述规则,以及历史版本能否追溯。
Security identity证券身份Ticker, permanent identifier, listing venue, asset type, and active date range.证券代码、永久标识、上市地点、资产类型和有效日期范围。Delistings, ticker reuse, mergers, share-class changes, and point-in-time symbol mapping.退市、代码复用、并购、股份类别变更和按历史时点还原的代码映射。

Free EOD stock data API options worth testing值得测试的免费 EOD 股票数据 API

There is no single free endpoint that is best for every daily-data job. A small watchlist may fit a per-symbol API, while a global screener needs efficient multi-symbol access and a backtest needs more history than a recent compact response. The table below describes practical starting points using current official documentation; free-plan boundaries can change, so verify them again before deployment.

不存在适用于所有日线任务的唯一最佳免费接口。小型自选股可以使用按证券查询的 API;全球选股器更需要高效的多标的访问;回测则需要比近期紧凑响应更长的历史。下面根据当前官方资料整理了几个实用起点,但免费套餐边界可能变化,部署前仍应重新核验。

Provider服务商Useful free starting point免费起点的价值Important boundary关键限制Best first test优先测试
Alpha VantageThe documented TIME_SERIES_DAILY endpoint returns raw daily OHLCV for global equities with JSON or CSV output and a free API-key path.官方 TIME_SERIES_DAILY 接口通过免费 API Key 提供全球股票原始日线 OHLCV,并支持 JSON 或 CSV。The free compact response is limited to the latest 100 data points; full 20+ year output and the Daily Adjusted function are documented as premium capabilities.免费 compact 响应只返回最近 100 条;完整 20 多年历史以及 Daily Adjusted 接口在官方文档中属于付费能力。A small watchlist or nightly report that needs raw recent bars, not a full-universe historical backfill.需要近期原始日线的小型自选股或夜间报告,而不是全市场深度历史回填。
Twelve DataIts individual pricing page lists EOD global equities and ETFs on the free tier, while the time-series API returns chronological OHLC and volume where applicable.其个人套餐页面把全球股票与 ETF 的 EOD 数据列入免费范围,time series 接口可返回按时间排列的 OHLC,以及适用品种的成交量。Credits are charged by symbol even when symbols are batched, and quotas reset by the documented credit window. Coverage, history, exchange access, and redistribution still depend on the plan.即使批量请求,额度仍按标的消耗,并按官方信用额度窗口重置;覆盖范围、历史深度、交易所访问和再分发仍取决于套餐。A multi-asset or international prototype. Measure the credits required to update the entire universe once per session.多资产或国际市场原型,并实测每个交易日更新完整证券池所需的总额度。
MarketstackThe official FAQ states that the free plan supports end-of-day data with up to 1,000 API requests per month and up to 12 months of history.官方 FAQ 说明免费套餐支持 EOD 数据,每月最多 1,000 次 API 请求,并提供最长 12 个月历史。A 12-month window is not enough for long-horizon factor research, and a monthly request allowance can be exhausted quickly by one-request-per-symbol ingestion.12 个月不足以支持长期因子研究;如果每个标的单独请求,月度额度也可能很快耗尽。A recent-history dashboard or proof of concept with a deliberately small symbol list.标的数量经过严格控制的近期行情看板或概念验证。

Do not compare only the advertised history. Request the same split date, dividend date, early close, delisted symbol, and cross-listed security from every candidate. If the API cannot return the same security identity and explain why a bar changed, a larger headline symbol count will not make the dataset reliable.

不要只比较宣传中的历史跨度。用同一组拆股日、分红日、提前收盘日、退市证券和跨市场上市证券测试所有候选。如果接口不能稳定识别同一证券,也无法解释日线为何发生变化,那么再大的标的数量也不能让数据变得可靠。

A 30-minute acceptance sample30 分钟快速验收样本

Start with ten securities rather than a random hundred: two liquid U.S. stocks, one ETF, one ADR or foreign listing, one low-volume small cap, one symbol that changed, one delisted security if supported, one recent split, one cash-dividend ex-date, and one early-close session. For each candidate, record returned sessions, timezone, currency, raw versus adjusted values, missing fields, response time, requests consumed, and whether a second fetch changes the latest bars. This small evidence set reveals more than a successful request for a single current mega-cap.

先测试 10 个有代表性的证券,而不是随机抓 100 个:两只高流动性美股、一只 ETF、一只 ADR 或海外上市证券、一只低成交量小盘股、一只发生过代码变更的证券、一只已退市证券(若支持)、一个近期拆股案例、一个现金分红除息日,以及一个提前收盘交易日。记录每家接口返回的交易日、时区、币种、原始值与复权值、缺失字段、响应时间、额度消耗,以及第二次抓取时最近日线是否变化。这样的证据比只成功请求一只热门大盘股更有判断力。

How to evaluate a free EOD stock data API如何评估免费 EOD 股票数据 API

Define when a trading day becomes final

Check exchange timezone, early closes, auctions, late trades, and the provider’s publication window. Fetching at 16:01 local time may return a preliminary bar that is corrected later.

Keep raw and adjusted daily series together

Require unadjusted OHLCV plus split and dividend events or clearly documented adjustment factors. Do not mix adjusted close with unadjusted open, high, and low in one return calculation.

Schedule by exchange calendar

Run after each market’s expected completion window, skip holidays and unscheduled closures, and treat a missing session differently from a legitimate zero-volume security.

Reconcile post-close corrections

Re-fetch a short trailing window, compare hashes, version changed bars, and record why a value moved. A daily pipeline needs controlled revision handling more than high request speed.

Test difficult sessions, not only a recent normal day

Sample an early close, a holiday boundary, a split ex-date, a special dividend, a trading halt, a late correction, and a delisted symbol. These cases reveal calendar, adjustment, and identity defects that a clean mega-cap week will hide.

Price the complete backfill and license

Convert free-tier limits into the time and requests needed to load your universe, then check caching, derived-data, redistribution, and commercial-use terms. A no-cost endpoint can still be unusable for a production product.

定义交易日何时最终确认

检查交易所时区、提前收盘、竞价、迟到成交和供应商发布时间。当地时间 16:01 获取的日线可能仍是初步值,之后还会修订。

同时保留原始与复权日线

要求原始 OHLCV 加拆股、分红事件或明确复权因子。计算收益时不能把复权收盘与未复权开高低价混在一起。

按照交易所日历调度

在各市场预期完成窗口后运行,跳过节假日和临时休市,并区分缺失交易日与证券真实零成交。

对账盘后修订

重复抓取短期滚动窗口,比较数据哈希,为变化的日线设置版本并记录原因。日频管道更需要受控修订,而不是极高请求速度。

测试特殊交易日,而不只看近期普通交易日

应抽查提前收盘日、节假日前后、拆股除权日、特别分红日、停牌日、发生迟报修订的日期以及已退市证券。这些场景更容易暴露日历、复权和证券身份问题,而大型活跃股票的一周正常数据往往看不出来。

核算完整回填成本与许可边界

把免费限额换算为完成整个股票池回填所需的请求数和时间,并核对缓存、衍生数据、再分发及商业使用条款。接口价格为零,并不等于它适合生产产品。

Split and dividend example: if a stock closes at $100 before a 2-for-1 split and opens near $50 on the ex-date, the raw price series shows an apparent 50% fall even though one old share became two new shares. A split-adjusted history divides pre-split prices by two and multiplies pre-split share volume by two; applying the price factor to volume in the same direction would corrupt turnover. Dividends require a different return convention. If the stock closes at $50.00 before a $1.00 cash dividend and closes at $49.50 on the ex-date, the price return is $49.50 ÷ $50.00 - 1 = -1.0%, while the distribution-inclusive return is ($49.50 + $1.00) ÷ $50.00 - 1 = 1.0% before tax and reinvestment timing. Keep the raw bars, corporate-action records, adjustment factors, and return convention so users can reproduce either series.

拆股与分红示例:如果一只股票在 1 拆 2 前收于 100 美元,除权日开盘约为 50 美元,原始价格序列会显示接近 50% 的下跌,但一股旧股实际已经变成两股新股。拆股复权应把拆股前价格除以 2,同时把拆股前成交股数乘以 2;如果成交量也按价格方向除以 2,就会破坏换手和成交量分析。现金分红采用另一套回报口径:若股票在每股 1.00 美元现金分红前收于 50.00 美元,除息日收于 49.50 美元,价格收益为 49.50 ÷ 50.00 - 1 = -1.0%,而不考虑税费与再投资时点的含分派回报为 (49.50 + 1.00) ÷ 50.00 - 1 = 1.0%。应保留原始日线、公司行为记录、复权因子和回报计算口径,使用户能够复现任一序列。

A reliable EOD ingestion workflow可靠的 EOD 数据接入流程

  1. Build the expected session list from the exchange calendar, including early closes, holidays, and unscheduled closures; do not infer sessions from returned rows alone.
  2. Wait for the provider’s documented publication window rather than scheduling from the nominal closing bell. Fetch the raw bar, adjustment inputs, and status metadata together.
  3. Validate OHLC relationships, non-negative volume, currency, session date, symbol identity, and completeness against the expected universe. Quarantine exceptions instead of silently forward-filling them.
  4. Store the raw response immutably, mark the first version provisional, and re-fetch a short correction window. Keep both old and new values when the source revises a bar.
  5. Apply split and dividend adjustments in a separately versioned layer so research can reproduce either the market-observed series or a chosen total-return convention.
  6. Publish a daily quality manifest with missing symbols, stale bars, source timestamps, adjustment version, and finalization state before downstream reports or backtests run.
  1. 依据交易所日历建立预期交易日清单,纳入提前收盘、节假日和临时休市;不能只根据接口返回的行来推断是否开市。
  2. 按照供应商注明的发布时间调度,而不是简单从名义收盘时间起算;同时获取原始日线、复权输入和数据状态元信息。
  3. 检查 OHLC 逻辑关系、非负成交量、币种、交易日期、证券身份及股票池完整性。异常数据应进入待核队列,不能静默向前填充。
  4. 不可变地保存原始响应,把首个版本标记为初步值,并滚动复查近期数据。来源修订日线时,应同时保留新旧数值。
  5. 在独立且可追溯的层中应用拆股和分红调整,使研究既能复现市场原始序列,也能复现选定的总回报口径。
  6. 在下游报告或回测启动前,发布每日质量清单,列出缺失证券、陈旧日线、来源时间、复权版本和最终确认状态。

Use QVeris to discover stock data capabilities借助 QVeris 发现股票数据能力

QVeris helps agents discover and inspect callable financial-data capabilities without hardcoding a single provider first. For an EOD workflow, inspect required symbol and date inputs, exchange coverage, raw-versus-adjusted fields, returned timestamps, and error behavior before calling a tool. Keep your own validation, source version, and license controls around the result: capability discovery does not make unlike provider definitions interchangeable.

QVeris 可帮助智能体发现并检查可调用的金融数据能力,无需一开始就在代码中绑定某一家供应商。对于 EOD 流程,应先检查证券代码与日期参数、交易所覆盖、原始值与复权字段、返回时间戳和错误处理方式,再调用相应工具。结果仍需经过自己的质量校验、来源版本和许可控制;能够发现并调用接口,并不意味着不同供应商的数据口径可以直接互换。

FAQ常见问题

When is EOD stock data available?

Availability depends on the exchange and provider. A bar may appear minutes after the close but remain provisional until auctions, late trades, and corrections are processed. Schedule from the documented publication window and re-check recent sessions.

Is the official close the same as the last trade?

Not necessarily. The close may come from a closing auction or an official exchange calculation, while the last reported trade may be late, off-exchange, or otherwise ineligible. Confirm the endpoint’s price definition.

Should EOD prices be adjusted?

Keep raw observations and corporate actions as the source of truth, then create a separately versioned adjusted series. This avoids mixing adjusted and unadjusted fields and lets you reproduce the chosen split or dividend convention.

Can free EOD data support backtesting?

It can support daily-frequency research when history, delisted securities, point-in-time symbol mapping, corporate actions, missing sessions, and licensing are adequate. A current-symbol-only dataset creates survivorship bias.

How should late corrections be handled?

Store immutable raw versions, re-fetch a trailing window, compare changed fields, and record source and ingestion timestamps. Promote provisional bars only after your defined correction window.

EOD 股票数据何时可用?

具体时间取决于交易所和供应商。日线可能在收盘数分钟后出现,但在竞价、迟报成交和修订处理完成前仍是初步值。应按照公开的发布时间调度,并滚动复查近期交易日。

官方收盘价等于最后成交价吗?

不一定。官方收盘价可能来自收盘竞价或交易所计算,而最后一笔报告成交可能迟报、发生在场外,或不符合收盘价资格。必须核对接口采用的价格定义。

EOD 价格是否应当复权?

应把原始市场观测和公司行为作为底层事实,再生成单独设有版本的复权序列。这样既能避免混用复权与未复权字段,也能复现所采用的拆股和分红口径。

免费 EOD 数据能否用于回测?

如果历史跨度、退市证券、时点化代码映射、公司行为、缺失交易日和许可条件都满足要求,它可以支持日频研究。只包含当前证券代码的数据会产生幸存者偏差。

如何处理盘后修订?

应保存不可变的原始版本,滚动重抓近期窗口,比较变化字段,并记录来源时间与采集时间。只有经过预先定义的修订窗口后,才能把初步日线提升为最终值。

Authoritative references权威参考资料