Free Live Market Data API
for Developers面向开发者的
免费实时市场数据 API
Evaluate live quotes, streaming access, coverage, rate limits, licensing, and reliability before you build on a free market data API.
在接入免费市场数据 API 前,应系统评估实时行情、流式数据访问、
覆盖范围、请求频率限制、使用许可与服务可靠性。
Free market data API: the short answer免费市场数据 API:先看结论
Expect limits on requests, delayed quotes, historical depth, exchanges, endpoints, or commercial usage.
A watchlist, chart, backtest, and trading workflow need different latency, bar intervals, and reliability.
Check timestamps, adjustments, missing values, pagination, errors, and symbol conventions with real requests.
Normalize provider responses behind your own interface so quotas or terms do not lock the application in.
免费服务通常会限制请求次数、报价时效、历史数据跨度、交易所覆盖范围、可用 API 端点或商业用途。
自选列表、行情图表、回测和交易工作流对数据延迟、K 线周期及可靠性的要求各不相同。
通过真实请求检查时间戳、复权处理、缺失值、分页机制、错误响应和标的代码规则。
在自有统一接口中适配不同供应商的响应格式,避免因配额或条款变化而将应用绑定在单一供应商上。
For a portfolio dashboard, delayed or low-frequency snapshots may be acceptable. For alerts and live charts, measure quote age and update continuity. For automated execution, a “free live” label is not enough: the feed needs entitlement-correct venue coverage, event timestamps, deterministic gap recovery, and an operational fallback. Decide the maximum acceptable age and loss behavior before comparing providers.
投资组合看板可能能够接受延迟或低频快照;提醒和实时图表则需要实测报价年龄与更新连续性;用于自动交易时,仅有“免费实时”标签远远不够,还必须具备符合行情权限的交易场所覆盖、事件时间戳、确定的数据缺口恢复机制和运行备用方案。比较服务商前,应先定义可接受的最大数据年龄和丢包处理方式。
What can a free market data API cover?免费市场数据 API 可以覆盖什么?
“Market data” usually means quotes, trades, candles, order-book snapshots, reference data, and corporate actions across stocks, ETFs, indices, forex, crypto, options, or futures. Start with the exact instruments, venues, frequency, and history your product needs.
“市场数据”通常包括股票、ETF、指数、外汇、加密资产、期权或期货的报价、成交数据、K 线、订单簿快照、参考数据和公司行为数据。选型前应先明确产品所需的具体标的、交易场所、更新频率和历史数据跨度。
Verify whether bid, ask, last price, size, and trade conditions are available, whether updates are live or delayed, and which venues contribute data.
Check supported intervals, session boundaries, timezone, OHLCV definitions, split adjustments, historical depth, and treatment of missing bars.
For WebSocket feeds, require subscription acknowledgements, heartbeats, sequence or gap signals, reconnect guidance, and a snapshot method that can rebuild state after missed events.
Keep stable IDs, ticker effective dates, venue, currency, asset type, session calendar, tick size, contract multiplier, and active status. The same symbol can mean different instruments across markets.
Clarify whether the API returns top of book, aggregated levels, or venue-level depth; identify price and size units, update type, sequence, market-by-price versus market-by-order, and snapshot consistency.
Stocks, forex, crypto, options, and futures do not share one clock or quote model. Document trading sessions, base and quote currency, consolidated versus venue data, contract expiry, and continuous-market conventions.
Capture source venue, event time, provider receipt time, application arrival time, delay class, halt or market status, correction flag, and provider identity with every observation.
During evaluation, interrupt the stream, exceed a short burst limit, rotate a subscription, and cross a session boundary. Verify heartbeat timeout, reconnect backoff, resubscription, sequence-gap detection, snapshot recovery, duplicate suppression, and ordering. Measure how long the application state remains incomplete; a successful WebSocket connection alone does not establish production reliability.
确认是否提供买价、卖价、最新成交价、报价或成交数量及成交条件,数据是实时更新还是延迟更新,以及包含哪些交易场所的数据。
检查支持的周期、交易时段边界、时区、OHLCV 定义、拆股复权、历史深度和缺失 K 线处理方式。
对于 WebSocket 数据流,应提供订阅确认、心跳、序号或缺口提示、重连说明,以及在漏掉事件后重新构建状态所需的快照方法。
保存稳定 ID、证券代码有效日期、交易场所、币种、资产类型、交易时段日历、最小变动价位、合约乘数和有效状态。同一代码在不同市场可能代表完全不同的标的。
确认接口提供最优档、聚合档位还是逐交易场所深度,并明确价格与数量单位、更新类型、序号、按价格或按订单聚合方式及快照一致性。
股票、外汇、加密资产、期权和期货并不共用一套交易时钟或报价模型。应分别说明交易时段、基础与计价币种、综合或单一场所行情、合约到期和连续市场规则。
每条观测记录都应保存来源交易场所、事件时间、服务商接收时间、应用到达时间、延迟类别、停牌或市场状态、更正标记和服务商身份。
评估时应主动中断数据流、制造短时限流、切换订阅并跨越交易时段边界,检查心跳超时、重连退避、重新订阅、序号缺口识别、快照恢复、重复抑制和事件排序,并测量应用状态不完整持续了多久。WebSocket 能成功连接,并不能证明它具备生产可靠性。
The criteria that separate a demo API from a dependable one区分演示型 API 与可靠 API 的关键标准
| Criterion评估项 | What to verify核验内容 | Common free-tier trade-off免费套餐的常见限制 | Test验证方法 |
|---|---|---|---|
| Coverage覆盖范围 | Assets, exchanges, regions, fields, and history.资产类别、交易所、地区、数据字段和历史数据跨度。 | Narrow universe or short history.覆盖标的有限,或历史数据跨度较短。 | Query representative and delisted symbols.分别查询有代表性的在市标的和退市标的。 |
| Freshness数据时效 | Timestamps, delays, update schedule, and revisions.时间戳、数据延迟、更新时间安排和修订机制。 | Delayed or end-of-day data.仅提供延迟数据或日终数据。 | Compare several updates with a primary source.将连续多次更新结果与一手数据源对照。 |
| Limits请求限额 | Per-minute, daily, concurrent, and endpoint quotas.每分钟请求数、每日请求数、并发请求数及各端点的配额。 | Low burst capacity or hard daily caps.突发请求处理能力较低,或设有严格的每日上限。 | Exercise 429 responses and retry headers.主动触发 HTTP 429 响应,并检查与重试相关的响应头。 |
| Rights数据使用权 | Commercial use, storage, attribution, and redistribution.商业使用、数据存储、署名要求和再分发权限。 | Personal or non-commercial use only.仅限个人或非商业用途。 | Read both API terms and upstream data rights.同时查阅 API 服务条款和上游数据源的授权条款。 |
| Latency延迟 | Event, provider-receipt, and application-arrival timestamps.事件时间、服务商接收时间和应用到达时间。 | “Live” without a measurable age guarantee.声称“实时”,却无法测量数据年龄。 | Measure p50, p95, p99, jitter, and stale-event rate.测量 p50、p95、p99、抖动和陈旧事件比例。 |
| Recovery故障恢复 | Heartbeats, sequence gaps, reconnect, replay, and snapshots.心跳、序号缺口、重连、重放和快照。 | Silent data loss after a disconnect.断线后发生静默数据丢失。 | Drop the connection and prove state can be rebuilt.主动断开连接,验证状态能否完整重建。 |
| Consistency一致性 | Identifiers, units, sessions, nulls, corrections, and schema versions.标识、单位、交易时段、空值、更正和结构版本。 | Fields change meaning across endpoints.字段在不同接口中的含义不一致。 | Reconcile quote, trade, candle, and reference responses.核对报价、成交、K 线和参考数据响应。 |
Use a synchronized acceptance run rather than isolated sample calls. Subscribe to a small but diverse universe across quiet and volatile periods, record every timestamp, deliberately disconnect, trigger rate limits, rotate symbols, and compare snapshots with streams. Report coverage, age, gaps, duplicates, out-of-order events, crossed quotes, reconnect time, and quota consumption. This converts “live” from a marketing term into an evidence-based service level.
验收时不要只发几次彼此孤立的示例请求。应选择规模不大但资产与流动性具有代表性的样本,在平静和高波动时段同步测试,记录所有时间戳,并主动断线、触发限流、切换标的,同时核对快照与数据流。最终报告应包含覆盖率、数据年龄、缺口、重复、乱序事件、买卖价倒挂、重连时间和配额消耗,把“实时”从营销用语转化为有证据的服务水平。
Plan request capacity and stream recovery before integration接入前先完成请求容量与数据流恢复设计
A free quota can look generous until it is translated into symbols, refresh intervals, trading hours, and retry traffic. Calculate both the short burst and the full-day budget. A design that stays below a per-second limit can still exhaust a daily allowance before the opening hour ends.
免费额度只有换算成标的数量、刷新间隔、交易时长和重试流量后才有意义。既要计算短时峰值,也要计算全天总量。某个方案即使没有超过每秒限制,也可能在开盘后不到一小时就耗尽每日额度。
Worked polling example. A watchlist contains 200 symbols and needs a refresh every five seconds. If the endpoint accepts one symbol per request, the application needs 200 ÷ 5 × 60 = 2,400 requests per minute. If a batch endpoint accepts 50 symbols, the same target becomes 4 requests every five seconds, or 48 requests per minute. That is still 18,720 requests during a 6.5-hour US equity session before retries, startup snapshots, or after-hours monitoring. Compare all three numbers—burst rate, requests per minute, and session total—with the provider’s separate endpoint and daily limits.
轮询容量计算示例。 假设自选列表包含 200 个标的,每 5 秒刷新一次。如果接口每次只能查询一个标的,则需要 200 ÷ 5 × 60 = 2,400 次请求/分钟;如果批量端点一次可以查询 50 个标的,则每 5 秒只需 4 次请求,即 48 次/分钟。即便如此,在美股 6.5 小时常规交易时段内仍需 18,720 次请求,而且尚未计入重试、启动快照和盘前盘后监控。评估时应把瞬时峰值、每分钟请求量和单个交易时段总量分别与供应商的端点限制和每日额度比较。
Fetch a documented snapshot, record its sequence or as-of time, and validate that every subscribed instrument has a known starting state. Do not display a partially initialized book as if it were complete.
Subscribe before or immediately around the snapshot according to the provider’s protocol, buffer overlapping events, discard those already represented by the snapshot, and apply the remainder in sequence. The exact handshake must come from provider documentation rather than assumption.
If a sequence jumps, a heartbeat expires, or an update cannot be reconciled, mark the affected state stale. Reconnect with backoff and rebuild from a fresh snapshot. Continuing from an incomplete order book can be worse than showing no value.
Decide whether each product should freeze the last value with an age label, fall back to delayed data, reduce the symbol universe, or suspend an automated action. Never mix feeds silently when their venues, adjustment rules, or timestamps differ.
先获取文档定义的快照,保存其序号或数据截止时间,并确认每个订阅标的都有已知初始状态。不能把尚未初始化完整的订单簿展示成完整行情。
根据供应商协议,在获取快照之前或紧邻快照时建立订阅,暂存时间重叠的事件,丢弃快照已经包含的更新,再按序应用剩余事件。具体握手顺序必须以供应商文档为准,不能凭经验猜测。
如果序号跳变、心跳超时或更新无法核对,应把受影响状态标记为陈旧,随后采用退避策略重连,并从新快照重建。继续使用不完整的订单簿,往往比暂时不展示数值更危险。
根据产品用途决定:保留最后值并显示数据年龄、切换至延迟行情、缩小标的范围,还是暂停自动操作。不同数据源的交易场所、复权规则或时间戳不一致时,绝不能静默混用。
Use QVeris to discover market data capabilities借助 QVeris 发现所需的市场数据能力
Provider lists go stale and every API describes itself differently. QVeris helps developers and agents discover, inspect, and call relevant capabilities while keeping the evaluation criteria explicit.
服务商清单容易过时,各 API 对自身能力的表述方式也不相同。QVeris 可帮助开发者和智能体发现、核查并调用所需能力,同时确保评估标准清晰明确。
QVeris can simplify capability discovery and routing; the application still owns exchange entitlements, asset-specific normalization, timestamp measurement, stream state, data-loss recovery, quality gates, fallback behavior, and permitted downstream use.
QVeris 能够简化能力查找与请求路由,但交易所行情权限、不同资产的口径统一、时间戳测量、数据流状态、数据丢失恢复、质量门槛、备用方案和下游允许用途,仍由应用方负责。
- Search by the capability you need—quotes, trades, candles, order books, exchange reference data, forex, or crypto—not only by a vendor name.
- Inspect inputs, outputs, authentication, and constraints before wiring a capability into an automated workflow.
- Keep provider adapters and provenance in your application even when discovery and calling are streamlined.
- 根据所需能力搜索,例如报价、成交记录、K 线、订单簿、交易所参考数据、外汇或加密资产行情,而不是只按服务商名称查找。
- 将能力接入自动化工作流前,先核查其输入参数、输出结果、身份验证方式和约束条件。
- 即使发现与调用能力的流程得到简化,仍应在应用中保留服务商适配器和数据来源记录。
FAQ常见问题
Yes, several providers offer free tiers, but most limit requests, freshness, history, exchanges, asset classes, endpoints, or commercial usage.
Test representative symbols, timestamps, adjustments, missing values, pagination, error responses, and actual rate-limit behavior.
Sometimes. Confirm licensing, attribution, redistribution rights, quotas, reliability expectations, and an upgrade or fallback path.
有,而且不止一家供应商提供免费套餐。不过,大多数免费套餐会限制请求次数、数据时效、历史数据范围、交易所与资产类别覆盖、可用 API 端点或商业用途。
优先用有代表性的标的代码验证时间戳、复权处理、缺失值、分页和错误响应,并实际测试请求频率限制如何生效。
有时可以。使用前需确认许可条款、署名要求、再分发权、配额及服务可用性承诺,并准备付费升级或切换至备用数据源的方案。
Not necessarily. It may mean recently updated, delayed, or real time only for entitled users and selected venues. Require source and arrival timestamps plus a documented delay class.
Polling can fit occasional dashboards. Streaming fits continuously changing quotes and trades, but it requires state, heartbeat, gap detection, reconnect, and snapshot recovery.
Compare exchange event time, provider receipt time when available, and application arrival time. Report distributions and stale-event rates by venue, asset, session, and network region.
It can offer one interface, but applications must retain asset-specific semantics such as sessions, quote currency, contract expiry, multipliers, venue consolidation, and corporate actions.
不一定。它可能只是近期更新、延迟行情,或仅对具备权限的用户和部分交易场所提供实时数据。必须要求来源时间、到达时间和明确的延迟类别。
偶尔刷新的看板可以采用轮询;持续变化的报价和成交更适合流式接口,但必须管理状态、心跳、缺口检测、重连和快照恢复。
应比较交易所事件时间、可取得时的服务商接收时间和应用到达时间,并按交易场所、资产、时段和网络区域报告分布及陈旧事件比例。
它可以提供统一调用入口,但应用仍需保留各资产特有的交易时段、计价币种、合约到期、乘数、综合行情和公司行为口径。
