Free Real-Time Market Data API
Options Compared免费实时市场数据 API
选择与限制对比
A free endpoint can be live, delayed, single-venue, or evaluation-only. This guide separates those meanings before comparing providers.
免费接口可能是实时、延迟、单一交易所或仅供评估。本文先拆清这些含义,再比较供应商。
TL;DR
Alpaca is practical for US stock prototypes, but its free live feed is IEX rather than the consolidated SIP.
Twelve Data exposes stocks, forex, crypto, ETFs, and more, while free credits and market entitlements still define usable coverage.
Databento offers credits and direct-feed depth, but free credit is not the same as a permanent free live plan.
Choose by venue coverage, timestamp quality, streaming limits, and legal use—not by the word free alone.
Alpaca 适合美国股票原型,但免费实时源是 IEX,并非覆盖全市场的 SIP。
Twelve Data 覆盖股票、外汇、加密资产和 ETF,但可用范围仍受免费积分与市场权限限制。
Databento 提供试用额度和直接行情深度,但免费额度不等于永久免费实时套餐。
应按交易场所覆盖、时间戳、流式限制和使用授权选择,而不是只看“免费”。
What “free” and “real-time” mean for this API这个 API 中“免费”与“实时”分别意味着什么
Searches for a free real-time market data API usually hide several different jobs: a watchlist that refreshes every minute, a streaming trading dashboard, a backtest downloader, or an AI agent that must cite fresh prices. One provider rarely wins all four.
The first filter is the feed, not the SDK. US equities may come from one venue such as IEX, a consolidated SIP, or a delayed feed. Options can require OPRA rights. Forex may be an indicative broker stream or a daily central-bank reference rate. Crypto is often easier to stream, but exchange fragmentation creates a different coverage problem.
For that reason, this comparison treats free as a testable commercial boundary: what is available at zero monthly cost, which fields and symbols are included, how fresh the timestamps are, and what happens when the prototype becomes a public product.
搜索“免费实时市场数据 API”的人,实际可能要做分钟级自选股、流式交易看板、回测下载器,或需要引用最新价格的 AI Agent。这四种工作负载通常不会由同一个供应商完美解决。
第一道筛选条件应是数据源,而不是 SDK。美国股票可能来自 IEX 单一交易所、全市场 SIP 或延迟源;期权可能涉及 OPRA;外汇既可能是经纪商指示性报价,也可能只是央行每日参考汇率;加密资产容易流式获取,但交易所碎片化又会造成新的覆盖问题。
因此本文把 free 当成可验证的商业边界:零月费到底提供哪些字段和代码、时间戳有多新、可否公开展示,以及原型转成产品后需要怎样升级。
Provider comparison: access, fields, and limits供应商对比:入口、字段与限制
| Provider供应商 | Zero-cost access零成本入口 | Real-time scope实时范围 | Best use适合场景 |
|---|---|---|---|
| AlpacaAlpaca | Permanent free market-data plan长期免费行情套餐 | Live IEX stocks; limited symbols over WebSocket; indicative optionsIEX 股票实时;WebSocket 代码受限;期权为指示性 | US equity prototypes and paper trading美国股票原型与模拟交易 |
| FinnhubFinnhub | Free personal-use plan个人用途免费套餐 | Stocks, forex, crypto; plan and exchange details vary股票、外汇、加密资产;具体交易所与套餐不同 | Multi-asset prototypes多资产原型 |
| Twelve DataTwelve Data | Basic free plan with creditsBasic 免费积分套餐 | Broad assets; full WebSocket and international access depend on plan资产广泛;完整 WebSocket 与国际市场取决于套餐 | Broad symbol discovery and REST testing广泛代码发现与 REST 测试 |
| DatabentoDatabento | Signup credits注册试用额度 | Direct feeds and granular schemas; live use is subscription/licensing sensitive直接行情与细粒度结构;实时使用涉及订阅和授权 | Market microstructure evaluation市场微观结构评估 |
Provider-by-provider notes: where the free tier stops逐供应商深挖:免费层在哪里结束
Alpaca is one of the clearest free starting points for US equities because its documentation states the feed boundary: the free plan streams live IEX data, while consolidated SIP coverage belongs to the paid tier. That makes it useful for paper trading, alert prototypes, and learning event-driven architecture, but a poor benchmark for total-market volume or best quotes across every venue.
Finnhub combines stocks, forex, crypto, company news, and fundamentals behind one key. The convenience is valuable for a multi-asset proof of concept, but teams should test the exact exchanges, symbols, history, and personal-use terms they need. A provider can advertise real-time access while individual venues or redistribution scenarios remain restricted.
Twelve Data is attractive when developers want a common REST schema across global symbols and asset classes. Its credit model makes endpoint experimentation easy, but production capacity depends on how one request consumes credits, which markets are included, and whether the workload needs full WebSocket access. Price a representative watchlist rather than extrapolating from a one-symbol demo.
Databento is strongest when the question is data fidelity: direct feeds, granular schemas, market-by-order depth, precise timestamps, and licensing visibility. Signup credit helps evaluate historical data and offset a subscription, but it should be modeled as an evaluation budget rather than a permanent zero-cost production feed.
Alpaca 很适合美国股票免费起步,因为官方明确说明了数据边界:免费层提供 IEX 实时流,覆盖全市场的 SIP 属于付费层。它适合模拟交易、预警原型和学习事件驱动架构,却不适合作为全市场成交量或跨交易所最优报价的唯一基准。
Finnhub 用一个 Key 覆盖股票、外汇、加密资产、公司新闻和基本面,适合多资产概念验证。但团队仍要实测目标交易所、代码、历史深度和个人用途条款。供应商可以宣传实时访问,而具体市场或再分发场景仍可能受限。
当开发者希望用统一 REST 结构访问全球代码和多种资产时,Twelve Data 很有吸引力。积分模式便于试接口,但生产容量取决于每次请求消耗、市场权限以及是否需要完整 WebSocket。应按真实自选股组合估算,而不是从单代码演示外推。
Databento 的优势是数据保真度,包括直接行情、细粒度结构、订单级深度、精确时间戳和清晰授权。注册额度可用于评估历史数据或抵扣订阅,但应把它视为评估预算,而不是永久零成本生产行情。
The fields that decide whether the data is usable决定数据是否可用的关键字段
Measure source timestamp, provider receive time, and application receive time separately. A fast API can still return delayed market events.
A live single-venue feed is real-time but not a consolidated view. That distinction affects quotes, volume, highs, lows, and alerts.
Check concurrent connections, subscribed symbols, reconnect rules, heartbeats, and whether snapshots must be loaded before deltas.
Personal research, internal non-display use, public display, redistribution, and derived analytics can require different terms.
分别记录源时间、供应商接收时间和应用接收时间。接口响应很快,也可能返回延迟行情。
单一交易所实时源确实“实时”,但不是全市场汇总,会影响报价、成交量、高低点和预警。
核验并发连接、订阅代码数、重连规则、心跳,以及增量流之前是否必须加载快照。
个人研究、内部非展示、公开展示、再分发和衍生分析可能对应完全不同的许可。
Which option fits your workload?哪一种选择适合你的工作负载?
Start with Alpaca or another clearly documented limited live feed. Prioritize simple authentication, snapshots plus WebSocket updates, and reproducible reconnect behavior.
Favor a unified provider such as Finnhub or Twelve Data, then verify every exchange and asset class separately. A single API surface does not guarantee equal freshness everywhere.
Begin with licensing and display rights before latency. Estimate users, symbol fan-out, derived-data rules, attribution, exchange fees, and redistribution terms.
Use timestamped snapshots unless the task truly needs streaming. Require the agent to return provider, feed, event time, retrieval time, market session, and units with every answer.
可从 Alpaca 等边界清晰的有限实时源开始,优先验证鉴权、快照加 WebSocket 更新以及可复现的断线重连。
优先考虑 Finnhub 或 Twelve Data 这类统一入口,但要逐市场、逐资产核验;统一 API 不代表所有数据同样新鲜。
先确认授权和展示权,再谈延迟;估算用户、代码扇出、衍生数据规则、署名、交易所费用和再分发条款。
除非任务确实需要流式,否则使用带时间戳快照,并要求 Agent 每次返回供应商、数据源、事件时间、获取时间、交易时段和单位。
A practical evaluation and implementation playbook可执行的评估与落地方法
Mix liquid and illiquid securities across open, pre-market, after-hours, and halted conditions. Compare source timestamps against an independent reference.
Use REST for the initial snapshot and WebSocket for updates. Confirm sequence handling, duplicates, late messages, and reconnect recovery.
Model symbol count, users, calls, egress, exchange fees, display rights, and historical downloads. Free-plan limits often fail on a different dimension than request count.
Normalize timestamps, symbols, corporate actions, conditions, and error states behind your own interface so changing feeds does not rewrite the product.
混合高流动性与低流动性标的,覆盖盘前、盘中、盘后和停牌,并用独立来源核对时间戳。
用 REST 初始化快照、WebSocket 接收更新,检查序列、重复消息、迟到消息和断线恢复。
计算代码数、用户数、请求、流量、交易所费用、展示权和历史下载。免费套餐往往不是先卡在请求数。
在自有接口后统一时间戳、代码、公司行动、成交条件和错误状态,避免换源时重写产品。
Common mistakes that make a free API expensive让免费 API 变昂贵的常见错误
A 50 ms response does not prove the quote itself is current.
Pre-market, after-hours, holidays, halts, and half days must be represented explicitly.
A plan permitted for personal testing may not allow customer-facing display or redistribution.
Quotes, trades, midpoints, indicative values, and official closes answer different questions.
50 毫秒响应并不能证明报价本身是最新的。
盘前盘后、假日、停牌和半日市都必须被明确表达。
允许个人测试的套餐不一定允许面向客户展示或再分发。
买卖报价、成交价、中间价、指示价和官方收盘价回答的是不同问题。
Where QVeris fits in the workflowQVeris 在工作流中的位置
QVeris is a capability discovery and routing layer for agents. It can help an agent find, inspect, and call financial capabilities, but it does not replace the underlying data provider's license, entitlement, or source-of-truth obligations.
QVeris 是面向 Agent 的能力发现与路由层,可帮助 Agent 找到、检查并调用金融能力,但不会替代底层数据供应商的许可、权限或真值来源责任。
- Use QVeris to discover financial capabilities and inspect what each callable tool returns before an agent uses it.
- Keep raw market entitlements with the underlying provider; QVeris is not a substitute for exchange licenses or redistribution rights.
- For an agent workflow, preserve provider, feed, symbol, event time, retrieval time, and units so answers remain auditable.
- 可用 QVeris 发现并检查金融能力,确认每个可调用工具返回什么,再交给 Agent 使用。
- 原始行情权限仍由底层供应商管理;QVeris 不替代交易所许可或再分发权。
- Agent 工作流应保留供应商、数据源、代码、事件时间、获取时间和单位,让结果可审计。
FAQ
Yes for limited scopes, such as a single venue, restricted symbols, personal use, or selected asset classes. Full consolidated and redistributable feeds usually introduce fees or agreements.
Yes, it is live data from IEX. It is not the same as the consolidated US equity SIP covering all exchanges.
Only when the task needs event-driven freshness. Many research questions are better served by a timestamped snapshot with provenance.
Use the same symbols, sessions, request pattern, and output checks, then compare legal use and upgrade cost separately from technical performance.
有限范围内有,例如单一交易所、有限代码、个人用途或部分资产。覆盖完整市场并可再分发的实时源通常需要费用或协议。
算,它是 IEX 交易所的实时数据,但不等于覆盖所有美国交易所的 SIP 汇总行情。
只有任务需要事件驱动新鲜度时才有必要。许多研究问题更适合带时间戳和来源的快照。
用同一组代码、时段、请求模式和输出检查测试,再把授权和升级成本与技术性能分开比较。
Sources, methodology, and update policy来源、方法与更新政策
This guide compares public documentation and evaluates providers by workload, data freshness, structure, delivery, legal use, and upgrade path. It does not treat a marketing label as proof of real-time coverage.
Provider features and commercial terms can change. Official documentation linked below is the source of truth; run a representative data test and obtain appropriate rights before production deployment.
本文依据公开文档,按工作负载、数据新鲜度、结构、交付、合法用途和升级路径比较供应商,不把营销标签当作实时覆盖的证明。
供应商功能和商业条款可能变化。以下官方文档是最终依据;生产部署前应运行代表性数据测试并取得适当权利。
