Free Stock API
for Personal Use个人使用的
免费股票 API
Choose a free stock API that fits your hobby app, notebook, portfolio tracker, or backtest without overlooking limits or data rights.
为个人应用、Notebook、投资组合追踪或回测选择合适的免费股票 API,同时看清额度、延迟与数据使用权。
TL;DR核心摘要
For a personal project, daily prices and a modest request allowance are often more useful than a “real-time” label with narrow coverage.
Confirm requests per minute and day, history depth, symbol coverage, delay, and whether an API key is required.
A free plan may allow private analysis while restricting dashboards, redistribution, automated downloads, or commercial use.
Cache responses, validate timestamps, isolate provider code, and keep a fallback so a hobby project survives plan changes.
对个人项目而言,稳定的日线价格和够用的调用额度,往往比覆盖狭窄的“实时”标签更实用。
确认每分钟与每日调用数、历史深度、股票代码覆盖范围、数据延迟,以及是否必须使用 API Key。
免费计划可能允许私人分析,但限制公开看板、重新分发、自动下载或商业用途。
缓存响应、校验时间戳、隔离供应商代码并准备备用来源,避免套餐变化让项目失效。
What “free” should include for personal use个人使用时,“免费”应该包含什么
Do not choose from a pricing badge alone. Write down the smallest dataset your project needs, then test the free tier against that workload. A weekend portfolio tracker and a minute-by-minute backtest have very different requirements.
不要只看价格页上的“免费”标签。先写下项目所需的最小数据集,再用真实工作负载测试免费额度。周末更新的投资组合追踪器,与分钟级回测的需求完全不同。
Check your exchanges, asset types, delisted symbols, intervals, and earliest available date. “Stocks” may mean US equities only.
Separate burst limits from daily or monthly quotas. Estimate requests for refreshes, retries, multiple symbols, and development tests.
Verify whether quotes are real-time, delayed, or end-of-day and whether historical prices account for splits and dividends.
Read the terms for private analysis, stored copies, derived results, public display, and redistribution separately. A personal account does not automatically permit publishing a dashboard.
Test missing symbols, market holidays, time zones, pagination, and error responses. A generous quota is not useful if silent gaps make the dataset hard to trust.
检查所需交易所、资产类型、退市代码、时间周期和最早可用日期。“股票”有时仅指美国股票。
区分瞬时频率限制与每日、每月总额度,并估算刷新、重试、多个股票代码和开发测试产生的请求。
确认行情是实时、延迟还是日终数据,并核对历史价格是否处理拆股和分红。
分别核对私人分析、数据留存、衍生结果、公开展示和重新分发的条款。注册个人账户,并不代表可以把行情直接发布到公开看板。
实际测试无效代码、休市日、时区、分页和错误响应。即使额度充足,如果接口会悄悄漏数,项目也很难长期信任这些结果。
Match the API to your personal project按个人项目匹配股票 API
| Project项目 | Minimum data最低数据需求 | Priority优先检查 | Common trap常见误区 |
|---|---|---|---|
| Portfolio tracker投资组合追踪 | Daily close, splits, dividends日收盘价、拆股、分红 | Reliable adjustments可靠的复权处理 | Treating delayed data as live把延迟行情当作实时行情 |
| Learning app学习型应用 | A few symbols and endpoints少量代码与接口 | Clear docs and stable schema清晰文档与稳定字段 | Exposing the API key in a browser在浏览器中暴露 API Key |
| Backtest notebook回测 Notebook | Long adjusted history长期复权历史数据 | Bulk access and consistency批量访问与一致性 | Survivorship and look-ahead bias幸存者偏差与未来数据偏差 |
| Personal alert bot个人提醒机器人 | Recent quotes and timestamps近期行情与时间戳 | Refresh limits and latency刷新频率与延迟 | Polling faster than the feed updates轮询速度超过数据更新速度 |
Estimate quota before choosing a plan: symbols × refreshes per day × endpoints, plus room for retries and development. If a 20-symbol tracker requests quote, profile, and dividend data separately, one screen refresh can consume 60 calls rather than 20. Batch endpoints can change that calculation, so confirm whether one batch counts as one request or many.
选择套餐前,可以先估算:股票数量 × 每日刷新次数 × 接口数量,再为重试和开发调试预留余量。比如 20 只股票分别请求报价、公司资料和分红,一次页面刷新可能消耗 60 次调用,而不是 20 次。批量接口会改变这个结果,因此还要确认一次批量请求究竟按一次还是按多个代码计费。
A safe setup for a free stock API免费股票 API 的安全接入方法
Load secrets from environment variables and call the provider from a server, local script, or notebook. Never commit a key or ship it in public frontend code.
Daily bars do not need second-by-second requests. Cache immutable history and refresh only the newest period to preserve quota.
Convert timestamps, symbols, null values, and adjusted-price fields into your own small schema as data enters the project. Keep the raw response for debugging.
Store the provider timestamp and retrieval time, reject impossible values, and surface missing symbols instead of quietly carrying an old quote forward.
Handle 429 responses, retry hints, and daily exhaustion explicitly. Back off with jitter and show the last successful update rather than looping aggressively.
通过环境变量读取密钥,并从服务端、本地脚本或 Notebook 调用。不要提交密钥,也不要把它放进公开前端代码。
日线数据不需要每秒请求。缓存不会变化的历史记录,只刷新最新周期,节省免费额度。
数据进入项目时,就把时间戳、股票代码、空值和复权字段转换成自己的精简结构,同时保留原始响应,方便排错。
同时保存供应商时间戳与本地获取时间,拦截明显异常值;遇到缺失代码时明确提示,不要悄悄沿用旧价格。
明确处理 429、重试提示和当日额度耗尽。采用带随机抖动的退避策略,并显示上次成功更新时间,避免无休止地重复请求。
When to use QVeris何时使用 QVeris
There is no single verified QVeris result that represents every free personal-use stock plan. Use the QVeris documentation to understand the execution model, then test candidate capabilities in the Playground before adding one to your project.
目前没有一个经过核实的 QVeris 结果,可以代表所有面向个人使用的免费股票数据套餐。先通过 QVeris 文档了解调用方式,再到 Playground 测试候选能力,确认合适后再接入项目。
- Search available capabilities before committing to one provider-specific integration.
- Inspect inputs, outputs, and execution details before calling a financial-data tool.
- Keep an auditable path from an agent request to the external capability used.
- 在投入供应商专属接入之前,先搜索可用的数据能力。
- 调用金融数据工具前,检查输入、输出与执行细节。
- 保留从 Agent 请求到外部能力调用的可审计路径。
FAQ常见问题
Yes, some providers offer ongoing free tiers, but coverage, delay, quota, attribution, and usage rights vary. Test the exact symbols and endpoints you need.
A few public datasets or endpoints may work without a key, but keyed APIs usually offer clearer quotas and support. Never treat “no key” as permission to scrape or redistribute.
Not necessarily. Public display and redistribution may have separate exchange or provider conditions. Check the plan terms for the exact endpoint and intended audience.
Upgrade when quota workarounds distort the product, delayed data no longer fits the use case, you need broader history, or the project becomes public or commercial.
有些供应商提供长期免费套餐,但覆盖、延迟、额度、署名和使用权各不相同。应测试项目真正需要的代码与接口。
少数公开数据集或接口无需 Key,但需要 Key 的 API 往往有更清晰的额度和支持。无需 Key 不代表允许抓取或重新分发。
不一定。公开展示和重新分发可能受交易所或供应商的额外条款约束,应按具体套餐、接口和受众逐项核对。
如果为了省额度而牺牲产品体验、延迟数据已经不够用、需要更长历史,或项目开始公开运营、商业化,就应重新评估付费方案。
References and next steps参考资料与下一步
Alpha Vantage API documentation
Finnhub API documentation
Twelve Data API documentation
Alpaca Market Data
Free Stock API Guide
Free Stock API Without a Key
Alpha Vantage API 文档
Finnhub API 文档
Twelve Data API 文档
Alpaca 市场数据
免费股票 API 指南
无需 Key 的免费股票 API
