How to Find Free Financial Data
Sources, APIs & Downloads如何获取免费金融数据
来源、API 与下载
Find free market, company, macroeconomic, forex, and crypto data—then verify coverage, freshness, limits, and licensing before you build.
查找免费的市场、公司、宏观经济、外汇与加密资产数据,
并在使用前核对覆盖范围、时效、限额与授权条款。
Quick Summary快速摘要
Free sources cover market prices, company fundamentals, economic indicators, exchange rates, and selected crypto metrics.
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.
免费来源可覆盖市场价格、公司基本面、经济指标、汇率以及部分加密资产指标。
确认交易所覆盖、时间戳、复权规则、调用限额、再分发权利和商业使用条款。
CSV 适合表格和研究;JSON API 更适合应用、Agent 和可重复的数据流程。
免费不等于实时或无限制,演示数据不应直接用于真实交易决策。
Which free financial data do you actually need?你真正需要哪一种免费金融数据?
Start with the decision or product you are building. A watchlist needs market quotes; valuation needs company fundamentals; economic research needs official indicators; treasury workflows need exchange rates; an agent needs stable schemas and source metadata.
先明确你的决策或产品目标。自选列表需要市场行情,估值需要公司基本面,经济研究需要官方指标,资金管理需要汇率,Agent 工作流则需要稳定字段与来源元数据。
The phrase free financial data covers products with very different update cycles and structures. A market endpoint may refresh by the minute, a company filing follows reporting periods, and a macroeconomic series may be revised months later. Define the asset class, geography, frequency, history depth, acceptable delay, and revision policy 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.
Inflation, employment, output, policy rates, yields, and exchange rates. Check release calendars, units, seasonal adjustment, and revisions.
Income statements, balance sheets, cash flow, ratios, and company facts. Check reporting periods, currencies, and restatements.
Ticker mappings, exchanges, time zones, data lineage, and provider identity make downstream results easier to explain and audit.
最新价、涨跌、买卖价、交易状态和时间戳。务必确认数据是实时行情、延迟行情、参考报价还是日终数据。
通胀、就业、产出、政策利率、收益率和汇率。注意发布日期、单位、季节调整与后续修订。
利润表、资产负债表、现金流、比率和公司资料。注意报告期、币种以及后续重述。
代码映射、交易所、时区、数据血缘和供应商身份,让结果更容易解释与审计。
How free financial data sources compare免费金融数据来源如何比较
No single source is best for every workflow. Central banks, statistical agencies, regulators, and exchanges are closest to primary records, but their files may require more cleaning. Aggregator APIs make unlike datasets easier to query, although free plans usually trade convenience for request limits, delayed values, shorter history, or narrower coverage.
没有一种来源适合所有工作流。央行、统计机构、监管机构和交易所最接近一手记录,但文件往往需要更多清洗;聚合 API 便于查询不同类型的数据,不过免费套餐通常以调用限额、延迟数值、较短历史或较窄覆盖来换取便利。
| Source来源 | What it offers提供内容 | Best for适合场景 | Watch for注意事项 |
|---|---|---|---|
| Public institution公共机构 | Official economic series, rates, filings, and notices.官方经济序列、利率、申报与公告。 | Verification and primary-source research.核验与一手资料研究。 | Revisions, mixed formats, and release lags.数据修订、格式不一与发布滞后。 |
| Free market-data API免费市场数据 API | Normalized quotes, history, and fundamentals.标准化的行情、历史与基本面。 | Apps, agents, prototypes, and repeatable research.应用、Agent、原型与可重复研究。 | Rate limits, delays, and license restrictions.有调用限额、延迟和授权限制。 |
| Open data portal开放数据门户 | Macroeconomic, demographic, trade, and development datasets.宏观、人口、贸易与发展数据集。 | Research, dashboards, and cross-country analysis.研究、仪表盘与跨国比较。 | Units, revisions, and methodology changes.单位、修订与统计方法变化。 |
| 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.
不要只看功能清单,最好用同一组小样本横向测试:选择一只高流动性股票、一只成交稀疏的证券、一个曾更换代码的标的,以及包含拆股或分红的日期。对比时间戳、缺失记录、数值精度、复权方式和错误信息。即使字段名称相同,这种测试也能快速发现不同供应商对交易时段和指标定义的差异。
Use official sources for the facts they actually publish优先依据官方来源选择金融数据
FRED and ALFRED are strong starting points for U.S. macroeconomic and regional time series. FRED’s API can retrieve series by source, release, category, and series; its observations endpoint supports JSON, XML, XLSX, and compressed CSV, while real-time periods and vintage dates make revisions visible. The World Bank Indicators API is useful for country and development indicators, supports date ranges and multiple countries in one URL, returns XML by default, and can return JSON with format=json. SEC EDGAR provides keyless JSON for company submissions and XBRL company facts, plus nightly bulk archives. None of these sources is a general live-market-price feed.
FRED 和 ALFRED 适合获取美国宏观与地区时间序列。FRED API 可以按来源、发布项目、分类和序列检索数据;观测值端点支持 JSON、XML、XLSX 和压缩 CSV,实时期间与历史版本日期还能揭示后续修订。世界银行 Indicators API 适合国家和发展指标,支持日期范围以及在一个 URL 中请求多个国家,默认返回 XML,也可通过 format=json 返回 JSON。SEC EDGAR 提供无需密钥的公司申报和 XBRL 公司事实 JSON,并提供每日更新的批量归档。这些来源都不是通用的实时市场价格流。
Source authority does not remove license work. FRED aggregates series owned by multiple organizations, so the rights and attribution rules of the underlying series still apply. Exchange, benchmark, rating, and news data may carry display or redistribution restrictions even when a developer can open an endpoint without paying. Save the dataset’s terms URL, attribution text, source organization, retrieval date, and permitted use beside the data rather than relying on a note in project documentation.
来源权威并不意味着可以跳过许可审查。FRED 汇集了多个机构拥有的序列,因此底层序列各自的版权和署名要求仍然适用。交易所、基准、评级和新闻数据即使能够免费打开端点,也可能限制公开展示或再分发。应把条款 URL、署名文字、来源机构、获取日期和允许用途与数据一起保存,而不是只在项目说明里留一句备注。
How to download free financial datasets safely如何安全下载免费金融数据集
A download button is only the start of a reproducible dataset. Before saving a file, record the dataset identifier, requested filters, release or vintage date, time zone, language, response format, and source URL. Preserve the untouched response with a checksum; write cleaned tables to a separate location. This lets another analyst reproduce the exact input and protects you when a provider silently changes column names, backfills history, or replaces a file at the same URL.
点击下载只是可复现数据集的起点。保存文件前,应记录数据集标识、请求筛选条件、发布或版本日期、时区、语言、响应格式和来源 URL。原始响应应保持不变并生成校验值,清洗后的表格写入另一位置。这样其他分析者才能复现完全相同的输入,也能应对供应商悄悄改变列名、回填历史数据或在同一 URL 下替换文件。
| Format格式 | Best use适合用途 | Important checks关键检查 | Common failure常见问题 |
|---|---|---|---|
| CSV | Spreadsheets, notebooks, bulk exports, and portable archives.电子表格、Notebook、批量导出与便携归档。 | Delimiter, encoding, decimal separator, header row, date format, and null tokens.分隔符、编码、小数点、表头、日期格式与空值标记。 | Identifiers lose leading zeros or dates are auto-converted.标识符前导零丢失,或日期被自动转换。 |
| JSON | Applications, agents, nested metadata, and incremental API pulls.应用、Agent、嵌套元数据与增量 API 拉取。 | Pagination, schema version, numeric strings, nulls, and nested arrays.分页、结构版本、数字字符串、空值和嵌套数组。 | Only the first page is stored or numeric precision is lost.只保存第一页,或数字精度丢失。 |
| XLSX | Human review, small curated releases, and existing analyst workflows.人工审阅、小型精选发布与既有分析流程。 | Sheet names, hidden rows, merged cells, formulas, units, and footnotes.工作表名称、隐藏行、合并单元格、公式、单位与脚注。 | Reading displayed values without formula or methodology context.只读取显示值,忽略公式或方法说明。 |
| Parquet | Large analytical tables, typed columns, and columnar queries.大型分析表、类型化字段与列式查询。 | Logical types, partition keys, compression, schema evolution, and reader support.逻辑类型、分区键、压缩方式、字段结构变化与读取工具支持。 | Partitions or schema versions are combined without validation.未经验证就合并不同分区或结构版本。 |
Choose API pagination or bulk files by update pattern根据更新模式选择 API 分页或批量文件
Use an API when you need a filtered subset, frequent incremental updates, or request-specific metadata. Use bulk files when rebuilding a large history, initializing a warehouse, or minimizing thousands of small calls. Do not repeatedly crawl an API for data already available in an official bulk archive: SEC, for example, publishes nightly company-facts and submissions ZIP files. Conversely, do not redownload a multi-gigabyte archive every minute when a small incremental endpoint is designed for current changes.
当你需要筛选后的子集、频繁增量更新或请求级元数据时使用 API;在重建大规模历史、初始化数据仓库或避免数千次小请求时使用批量文件。若官方已经提供批量归档,就不要反复遍历 API 获取相同内容,例如 SEC 每晚会发布 company facts 和 submissions ZIP。反过来,如果小型增量端点专门用于当前变化,也不应每分钟重新下载数 GB 的完整归档。
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 时,应把原始文件与清洗后的表格分开保存,同时记录下载日期、分隔符、编码和时区。两种方式都需要可重复的更新策略,避免新旧数据在无提示的情况下混合。
A working World Bank request with no API key一个无需 API Key 的世界银行请求
This request downloads annual GDP in current U.S. dollars for China and Brazil from 2018 through 2023. The first JSON element contains pagination metadata and the second contains observations, so production code must not assume the response is one flat table.
下面的请求下载中国与巴西 2018—2023 年以现价美元计的年度 GDP。返回 JSON 的第一个元素是分页元数据,第二个元素才是观测记录,因此生产代码不能把响应误认为一张扁平表。
import requests
url = (
"https://api.worldbank.org/v2/country/chn;bra/"
"indicator/NY.GDP.MKTP.CD"
)
params = {"date": "2018:2023", "format": "json", "per_page": 100}
response = requests.get(url, params=params, timeout=20)
response.raise_for_status()
metadata, observations = response.json()
rows = [
{
"country": item["countryiso3code"],
"year": int(item["date"]),
"value": item["value"],
"unit": "current USD",
"source": "World Bank Indicators API",
}
for item in observations
]
Validate that the indicator, unit, country code, source ID, and requested dates match the task before loading the rows. Preserve null observations rather than turning them into zero. For large or repeated jobs, implement pagination using the returned page count, cache stable historical periods, and record the final request URL so the result can be reproduced.
入库前应核验指标、单位、国家代码、来源 ID 和日期范围是否符合任务。空观测应保留为空,不能转换成零。对于大规模或重复任务,应根据响应中的页数实现分页,缓存稳定的历史期间,并记录最终请求 URL,以便结果能够复现。
Revisions, vintages, and point-in-time datasets修订、历史版本与时点数据集
Financial data can change after first publication for legitimate reasons. Statistical agencies revise seasonal factors and source inputs; companies amend filings or restate accounts; market-data vendors repair bad ticks and corporate-action factors. A pipeline that overwrites yesterday’s value with today’s value cannot answer what an analyst, model, or customer actually knew at the earlier time.
金融数据在首次发布后发生变化并不一定是错误。统计机构会修订季节调整因子和基础输入,公司会提交修订文件或重述报表,市场数据商也会修复异常成交与公司行动因子。如果数据流程直接用今天的值覆盖昨天的值,就无法回答分析师、模型或客户在当时究竟能够知道什么。
The period the value describes—for example, a quarter, trading session, or month. It is not necessarily the publication date.
Record when the publisher released the value and when your system obtained it. These timestamps expose publication lags and ingestion delays.
Retain the value as it appeared at each relevant historical cutoff. FRED and ALFRED support real-time periods and vintage dates for this purpose.
Store units, seasonal adjustment, currency conversion, split adjustment, formulas, code version, and parent dataset IDs for every derived field.
数值所描述的期间,例如季度、交易日或月份;它不一定等于发布日期。
分别记录发布者公布数值的时间和系统获取时间,从而识别发布滞后与入库延迟。
保留每个重要历史截止点当时可见的数值。FRED 和 ALFRED 可通过实时期间与版本日期支持这种分析。
为每个衍生字段保存单位、季节调整、汇率转换、拆股复权、计算公式、代码版本和上游数据集 ID。
A QVeris-assisted workflow should begin with the task—not a hard-coded vendor. Discover a capability for the required market, filing, company fact, or economic indicator; inspect provider identity, schema, limits, and provenance; call it with explicit entity and date parameters; then retain both the raw response and normalized result. QVeris can help locate and route appropriate capabilities, but the user remains responsible for validating the returned data, reviewing the provider’s current terms, and deciding whether the source is fit for trading, compliance, or customer-facing use.
使用 QVeris 时,应从任务出发,而不是先写死供应商。先查找符合目标市场、申报文件、公司事实或经济指标需求的数据能力,检查供应商身份、字段结构、限制与来源,再传入明确的实体和日期参数,并同时保留原始响应与标准化结果。QVeris 可以帮助发现并调用合适的数据能力,但用户仍需验证返回数据、检查供应商当前条款,并判断该来源是否适合交易、合规或面向客户的用途。
Free financial 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 和便携归档。无论选择哪种格式,在合并多个文件或供应商之前,都应统一字段名称、日期格式、数值类型和空值规则。
将样本值与官方发布或另一独立来源对照,检查时间戳、单位、精度、调整方式、缺失值、修订记录和更新频率。
