How to Find Free Market Data
Sources, APIs & Downloads如何获取免费市场数据
来源、API 与下载
Find free stock, ETF, index, forex, commodity, and crypto data—then verify coverage, freshness, limits, and licensing before you build.
查找免费的股票、ETF、指数、外汇、大宗商品与加密资产数据,
并在使用前核对覆盖范围、时效、限额与授权条款。
Quick Summary快速摘要
Free sources cover quotes and history for stocks, ETFs, indices, forex, commodities, and selected crypto markets.
Check exchange coverage, timestamps, adjustment rules, request limits, redistribution rights, and commercial-use terms.
CSV is convenient for spreadsheets and research; JSON APIs are better for apps, agents, and repeatable pipelines.
Free does not always mean real-time or unrestricted. Never assume demo data is suitable for live trading decisions.
免费来源可覆盖股票、ETF、指数、外汇、大宗商品以及部分加密市场的行情与历史数据。
确认交易所覆盖、时间戳、复权规则、调用限额、再分发权利和商业使用条款。
CSV 适合表格和研究;JSON API 更适合应用、Agent 和可重复的数据流程。
免费不等于实时或无限制,演示数据不应直接用于真实交易决策。
Which free market data do you actually need?你真正需要哪一种免费市场数据?
Start with the decision or product you are building. A watchlist needs quotes and session status; charting needs consistent bars; backtesting needs deep adjusted history; a multi-asset dashboard needs stable symbols, currencies, and calendars.
先明确你的决策或产品目标。自选列表需要行情和交易状态,图表需要连续一致的 K 线,回测需要足够深度的复权历史,多资产仪表盘则需要稳定的代码、币种和交易日历。
The phrase free market data covers feeds with very different update cycles and structures. Equities follow exchange sessions, forex trades nearly around the clock, commodity prices may come from futures or reference benchmarks, and crypto venues never close. Define the asset class, venue, geography, interval, history depth, and acceptable delay before comparing providers.
“免费市场数据”涵盖更新周期和结构差异很大的多类数据源。股票遵循交易所时段,外汇接近全天交易,大宗商品价格可能来自期货或参考基准,加密市场则全年无休。因此比较供应商前,应先明确资产类别、交易场所、地区、周期、历史深度和可接受延迟。
For research, price fields alone are rarely enough. You may also need trading calendars, symbol changes, delistings, currency, exchange identifiers, and corporate actions. These reference fields prevent survivorship bias and make it possible to join prices with fundamentals correctly. A smaller dataset with explicit lineage and consistent identifiers is often more useful than a larger feed whose origin and adjustment rules are unclear.
对于研究任务,只有价格字段通常不够。你还可能需要交易日历、代码变更、退市记录、币种、交易所标识和公司行动。这些参考字段能减少幸存者偏差,也能让价格与基本面正确关联。来源清楚、标识一致的小型数据集,往往比来源不明、复权规则模糊的大型数据源更有价值。
Last price, change, bid/ask, session status, and timestamp. Confirm whether values are real-time, delayed, indicative, or end-of-day.
Open, high, low, close, volume, and adjusted close. Check interval support, session boundaries, time zones, and corporate actions.
Stocks, ETFs, indices, currencies, commodities, and crypto use different identifiers and calendars. Confirm the exact venues and instruments included.
Ticker mappings, exchanges, time zones, data lineage, and provider identity make downstream results easier to explain and audit.
最新价、涨跌、买卖价、交易状态和时间戳。务必确认数据是实时行情、延迟行情、参考报价还是日终数据。
开盘、最高、最低、收盘、成交量和复权收盘价。注意周期支持、交易时段边界、时区与公司行动。
股票、ETF、指数、外汇、大宗商品和加密资产使用不同标识与日历,需要确认具体覆盖的场所和标的。
代码映射、交易所、时区、数据血缘和供应商身份,让结果更容易解释与审计。
How free market data sources compare免费市场数据来源如何比较
No single source is best for every workflow. Exchanges and official benchmark publishers are closest to primary market records, but their files may require more cleaning. Aggregator APIs make cross-asset data easier to query, although free plans usually trade convenience for request limits, delayed values, shorter history, or narrower venue coverage.
没有一种来源适合所有工作流。交易所和官方基准发布方最接近一手市场记录,但文件往往需要更多清洗;聚合 API 便于查询跨资产数据,不过免费套餐通常以调用限额、延迟数值、较短历史或较窄的交易场所覆盖来换取便利。
| Source来源 | What it offers提供内容 | Best for适合场景 | Watch for注意事项 |
|---|---|---|---|
| Exchange or benchmark交易所或基准方 | Official quotes, indices, calendars, and reference files.官方行情、指数、交易日历和参考文件。 | Verification and primary-source research.核验与一手资料研究。 | Entitlements, mixed formats, and delayed access.授权限制、格式不一与数据延迟。 |
| Free market-data API免费市场数据 API | Normalized quotes, history, and fundamentals.标准化的行情、历史与基本面。 | Apps, agents, prototypes, and repeatable research.应用、Agent、原型与可重复研究。 | Rate limits, delays, and license restrictions.有调用限额、延迟和授权限制。 |
| Community library社区数据工具 | Convenient wrappers and normalized access to public feeds.对公共数据源提供便捷封装和标准化访问。 | Exploration, notebooks, and prototypes.探索、Notebook 与原型。 | Upstream changes, unofficial support, and unclear rights.上游变化、非官方支持与权利边界不清。 |
| CSV or bulk datasetCSV 或批量数据集 | Portable files for analysis and archival.便于分析与归档的可移植文件。 | Spreadsheets, notebooks, and backtests.表格、Notebook 与回测。 | Often less current than a live API.通常不如实时 API 更新及时。 |
Compare sources with the same small test set rather than relying on feature lists. Request a liquid stock, a thinly traded security, a symbol that changed, and a date containing a split or dividend. Compare timestamps, missing records, precision, adjustment behavior, and error messages. This test quickly reveals whether two providers use different sessions or definitions even when their column names look identical.
不要只看功能清单,最好用同一组小样本横向测试:选择一只高流动性股票、一只成交稀疏的证券、一个曾更换代码的标的,以及包含拆股或分红的日期。对比时间戳、缺失记录、数值精度、复权方式和错误信息。即使字段名称相同,这种测试也能快速发现不同供应商对交易时段和指标定义的差异。
A practical API and CSV workflow实用的 API 与 CSV 工作流
A reliable workflow separates discovery from production use. First inspect the provider documentation and a sample response. Then make a small request, save the raw payload, and transform it into your own stable schema. Add validation before the data enters a chart, model, spreadsheet, or agent. This makes it easier to replace a source later without rewriting the rest of the product.
可靠的工作流会把“发现数据源”和“正式使用”分开。先查看供应商文档与示例响应,再发起小规模请求,保存原始返回,并转换为自己的稳定字段结构。数据进入图表、模型、表格或 Agent 之前应先经过验证。这样未来更换数据源时,无需重写整个产品。
Start with the entity and dataset: instrument, company, country, indicator, currency pair, or crypto asset. Avoid choosing a provider before you define the need.
Review schema, exchange coverage, delay, sample response, request cost, limits, source lineage, and commercial-use rules.
Send the symbol, interval, start and end dates, adjustment mode, and output format. Store the provider timestamp with every result.
Check missing sessions, duplicates, time zones, split adjustments, null values, and unexpected schema changes before analysis.
先确定实体与数据类型:金融工具、公司、国家、指标、货币对或加密资产,不要在需求明确前锁定供应商。
检查字段结构、交易所覆盖、延迟、示例响应、调用成本、限额、数据血缘与商业使用规则。
传入代码、周期、起止日期、复权模式和输出格式,并保存每条结果对应的供应商时间戳。
分析前检查缺失交易日、重复记录、时区、拆股复权、空值和意外的字段变化。
For API access, cache responses that do not need second-by-second freshness, apply exponential backoff to temporary failures, and log the request time, parameters, status code, and provider timestamp. For CSV, preserve the original file separately from the cleaned table and record its download date, delimiter, encoding, and time zone. Both approaches need a repeatable update policy so old and new observations are not silently mixed.
使用 API 时,应缓存不要求秒级更新的结果,对临时失败采用指数退避,并记录请求时间、参数、状态码和供应商时间戳。使用 CSV 时,应把原始文件与清洗后的表格分开保存,同时记录下载日期、分隔符、编码和时区。两种方式都需要可重复的更新策略,避免新旧数据在无提示的情况下混合。
Free market data quality checklist免费市场数据质量检查清单
A useful source makes coverage, freshness, provider identity, request limits, pricing, and licensing visible before you depend on it.
可靠的数据源会在你正式依赖它之前,清楚展示覆盖范围、更新时间、供应商身份、请求限额、定价信息与授权条款。
Data quality is not only about whether a number looks plausible. Confirm that every observation refers to the intended venue, session, currency, and time zone. Check whether timestamps represent trade time, bar close, or provider delivery time. When building indicators or backtests, document how missing sessions, zero volume, duplicate rows, outliers, splits, dividends, and restated fundamentals are handled.
数据质量不只是判断一个数字“看起来是否合理”。每条记录都应对应正确的交易场所、交易时段、币种和时区,还要确认时间戳表示成交时间、K 线结束时间,还是数据从供应商送达的时间。构建指标或回测时,应记录如何处理缺失交易日、零成交量、重复行、异常值、拆股、分红以及重述后的财务数据。
- Confirm the market, exchange, asset class, interval, and historical depth.
- Record whether prices are raw or adjusted and how corporate actions are handled.
- Preserve source, timestamp, currency, time zone, and request parameters with every result.
- 确认市场、交易所、资产类别、周期和历史深度。
- 记录价格是原始价还是复权价,以及拆股和分红等公司行动的处理方式。
- 为每条结果保留来源、时间戳、币种、时区和请求参数。
Finally, read the license as carefully as the schema. Free access may permit personal analysis but restrict public display, redistribution, automated extraction, model training, or commercial products. Keep a link or copy of the applicable terms with the project and review them when the provider changes plans. If the data supports trading, compliance, or customer-facing decisions, validate critical values against an authoritative source.
最后,许可证应当和字段说明一样认真阅读。免费访问可能允许个人分析,却限制公开展示、再分发、自动抓取、模型训练或商业产品。建议在项目中保存适用条款的链接或副本,并在供应商调整套餐时重新检查。如果数据用于交易、合规或面向客户的决策,关键数值还应与权威来源交叉核验。
FAQ常见问题
Start with central banks, statistical agencies, regulators, and exchanges, then compare free APIs and open-data portals for normalized access.
Market feeds may be live or delayed; company and economic data follow release schedules. Always read timestamps and revision notes.
Many providers support CSV export. Verify units, frequency, time zone, missing observations, adjustments, and revisions.
It depends on the license. API access does not automatically grant display, redistribution, derived-data, or commercial rights.
JSON is usually easier for applications that request data repeatedly and need structured metadata. CSV is simpler for spreadsheets, bulk downloads, notebooks, and portable archives. Choose based on the workflow, then normalize field names, date formats, numeric types, and null-value rules before combining files or providers.
Compare sample values with an official release or another independent source. Check timestamps, units, precision, adjustments, missing observations, revisions, and update frequency.
可以先查找交易所、监管机构、官方基准发布方和可信数据门户,再比较免费 API 与批量下载文件的覆盖范围和使用限制。
市场数据可能实时或延迟,公司和经济数据则遵循发布日期。务必检查时间戳与修订说明。
许多供应商支持 CSV。下载后要核对单位、频率、时区、缺失值、调整方式与修订记录。
取决于许可证。能够调用 API 不代表自动拥有展示、再分发、衍生数据或商业使用权。
JSON 更适合需要重复请求并保留结构化元数据的应用;CSV 更适合电子表格、批量下载、Notebook 和便携归档。无论选择哪种格式,在合并多个文件或供应商之前,都应统一字段名称、日期格式、数值类型和空值规则。
将样本值与官方发布或另一独立来源对照,检查时间戳、单位、精度、调整方式、缺失值、修订记录和更新频率。
