Developer evaluation and production guide开发者评估与生产接入指南

FMP Stock Market API
Data, Limits & Production Code
FMP 股票市场 API
数据、限制与生产代码

Evaluate Financial Modeling Prep with current Stable endpoints, real code, data-quality controls, licensing questions, retries, migration gates, and an agent-ready evidence contract.

用当前 Stable Endpoint、真实代码、数据质量控制、许可检查、重试、迁移门槛与 Agent 证据契约评估 Financial Modeling Prep。

FMP stock market API production pipeline from raw data through normalization and validation to an AI agent

TL;DR

Verdict: FMP is a practical shortlist candidate when one API needs to cover quotes, historical prices, company fundamentals, news, calendars, and related market datasets. The buying decision should be based on the exact endpoints, freshness, geography, history, call limits, bandwidth, licensing, and adjustment policy your workload needs—not the number of endpoints on a marketing page.

结论:如果一个 API 需要覆盖 Quote、Historical Price、Company Fundamentals、News、Calendar 与相关市场数据,FMP 值得进入候选清单。但采购决策应基于任务真正需要的 Endpoint、更新频率、地区、历史范围、调用限制、带宽、许可与复权规则,而不是营销页面上的 Endpoint 数量。

Good fit

Research, analytics, portfolio monitoring, prototypes, and products that benefit from broad financial data behind one API surface.

Prove before buying

Exact symbol coverage, real-time entitlement, corporate-action treatment, point-in-time behavior, rate limits, and commercial display rights.

Not enough by itself

An AI agent still needs identity, policy, normalization, evidence, approval, retries, observability, and acceptance tests.

适合

研究、分析、投资组合监控、原型,以及希望通过统一 API 获取广泛金融数据的产品。

采购前验证

Symbol 覆盖、实时权限、公司行动处理、Point-in-time 行为、限流与商业展示许可。

无法单独解决

AI Agent 仍需要身份、策略、标准化、证据、审批、重试、可观测性和验收测试。

Before choosing FMP, compare it with seven alternatives in the free stock API comparison.

选择 FMP 前,可在免费股票 API 对比中把它与另外七种方案并列评估。

Who this FMP API review is for这份 FMP API 评估适合谁

Developers replacing a patchwork of market-data scripts

You want one maintained API contract for quotes, history, fundamentals, news, calendars, and reference data.

AI teams that need traceable financial evidence

The model must receive normalized records with source time, retrieval time, adjustment mode, validation status, and provenance.

Buyers comparing free and paid plans

You need to translate calls per day or minute, history, coverage, bandwidth, and licensing into a cost per accepted workload.

正在替换零散市场数据脚本的开发者

希望用一个受维护的 API 契约覆盖 Quote、History、Fundamentals、News、Calendar 与 Reference Data。

需要可追溯金融证据的 AI 团队

模型需要标准化记录,并包含来源时间、检索时间、复权模式、验证状态与 Provenance。

比较免费与付费方案的采购者

需要把每日/每分钟调用、历史范围、覆盖、带宽与许可换算成每个验收任务的成本。

Start with the current Stable API contract先从当前 Stable API 契约开始

FMP's current Quickstart documents https://financialmodelingprep.com/stable/ as the base URL. It lists API-key authentication, more than 100 endpoints, and common 403, 429, and 500 responses. Put the base URL, authentication mode, timeout, and plan limits in configuration instead of scattering them across notebooks and prompts.

FMP 当前 Quickstart 将 https://financialmodelingprep.com/stable/ 作为 Base URL,并说明 API Key 认证、100 多个 Endpoint,以及常见的 403、429、500。应把 Base URL、认证方式、Timeout 与套餐限制放进配置,而不是散落在 Notebook 与 Prompt 中。

Stable base URLVersion the provider adapter, not every caller.
API keyKeep it server-side and out of model context.
403 / 429 / 500Classify auth, quota, and provider failures separately.
Plan contractEndpoint access is not the same as display rights.

FMP stock market API coverage mapFMP 股票市场 API 数据覆盖图

The useful unit is not “an endpoint.” It is a dataset with an identity, field contract, update cycle, adjustment policy, geography, history window, and permitted use.

Need需求Stable endpoint exampleStable Endpoint 示例Validate before production生产前验证
Single quote单个 Quote/quote?symbol=AAPLMarket state, timestamp, currency, exchange, entitlement市场状态、时间戳、币种、交易所与权限
Batch quotes批量 Quote/batch-quote?symbols=AAPL,MSFTMaximum batch size, partial failure, ordering, missing symbols批量上限、部分失败、排序与缺失 Symbol
Historical EOD历史 EOD/historical-price-eod/full?symbol=AAPLAdjustment mode, VWAP, revisions, date boundaries复权模式、VWAP、修订与日期边界
Intraday bars分钟 Bar/historical-chart/1min?symbol=AAPLPlan access, session, timezone, latency, retention套餐权限、交易时段、时区、延迟与保留期
Fundamentals基本面/income-statement?symbol=AAPLPeriod, filing date, accepted date, currency, restatements期间、申报日、接受日、币种与重述
Events and news事件与新闻Calendar and news endpointsCalendar 与 News EndpointSource, publication time, deduplication, update cycle来源、发布时间、去重与更新周期

Free tier, paid limits, and licensing reality免费层、付费限制与许可现实

FMP's public pricing page currently separates personal and commercial use and lists different call rates, history, coverage, bandwidth, and datasets by plan. Prices and packages can change, so this page does not hard-code a procurement quote. Capture the values on the day you evaluate and attach the applicable agreement.

FMP 当前公开 Pricing 页面区分 Personal 与 Commercial Use,并按套餐列出不同的调用频率、历史范围、地区覆盖、带宽与数据集。价格与包装会变化,所以本文不把价格写成长期采购报价;评估当天应保存实际数值和适用协议。

Question问题Why it changes the architecture为什么会影响架构Evidence to retain需要保存的证据
Calls per day or minute?每日还是每分钟调用?Determines batching, caching, concurrency, and backoff.决定 Batch、Cache、Concurrency 与 Backoff。Plan screenshot, dashboard quota, test results套餐截图、Dashboard Quota 与测试结果
How much history?历史范围多长?Changes backtests, warm-up jobs, storage, and migration.影响回测、预热任务、存储与迁移。Earliest observed record by dataset and symbol按 Dataset 与 Symbol 记录最早可用数据
Which geography and asset?哪些地区和资产?A US prototype does not prove global production coverage.美国市场原型无法证明全球生产覆盖。Symbol census with exchange, currency, and missing rate包含交易所、币种和缺失率的 Symbol 清单
Can data be displayed or redistributed?能否展示或再分发?API access alone does not establish product rights.API 访问本身不等于产品使用权。Signed agreement and product-use mapping签署协议与产品用途映射

Code: call the FMP Stable API with cURL代码:用 cURL 调用 FMP Stable API

Use an environment variable and avoid exposing the key in shell history or screenshots. FMP documents both header and query-parameter authorization; a header keeps secrets out of the URL.

cURL · historical EOD
curl --fail-with-body \
  --connect-timeout 5 \
  --max-time 30 \
  -H "apikey: ${FMP_API_KEY}" \
  "https://financialmodelingprep.com/stable/historical-price-eod/full?symbol=AAPL"

使用环境变量,并避免在 Shell History 或截图中暴露 Key。FMP 文档支持 Header 与 Query Parameter 认证;使用 Header 可以避免 Secret 进入 URL。

Python: retry, normalize, and preserve evidencePython:重试、标准化并保存证据

A production adapter should return a provider-neutral record and an evidence envelope. The example retries only transient failures, respects a deadline, records retrieval time, and keeps the raw response hash without placing the API key in logs.

Python · bounded provider adapter
import hashlib, json, os, random, time
from datetime import datetime, timezone
import requests

BASE_URL = "https://financialmodelingprep.com/stable"
API_KEY = os.environ["FMP_API_KEY"]

def get_eod(symbol: str, attempts: int = 4) -> dict:
    url = f"{BASE_URL}/historical-price-eod/full"
    headers = {"apikey": API_KEY}
    params = {"symbol": symbol}

    for attempt in range(attempts):
        response = requests.get(
            url, headers=headers, params=params, timeout=(5, 25)
        )
        if response.status_code == 403:
            raise RuntimeError("FMP authentication or entitlement rejected")
        if response.status_code not in {429, 500, 502, 503, 504}:
            response.raise_for_status()
            break
        if attempt == attempts - 1:
            response.raise_for_status()
        time.sleep(min(8, 0.5 * (2 ** attempt)) + random.random() / 4)

    raw = response.content
    rows = response.json()
    normalized = [{
        "symbol": symbol,
        "date": row["date"],
        "open": row["open"],
        "high": row["high"],
        "low": row["low"],
        "close": row["close"],
        "volume": row["volume"],
        "provider": "fmp",
        "dataset": "historical_price_eod_full",
    } for row in rows]

    return {
        "records": normalized,
        "evidence": {
            "retrieved_at": datetime.now(timezone.utc).isoformat(),
            "request": {"endpoint": "/historical-price-eod/full", "symbol": symbol},
            "status": response.status_code,
            "sha256": hashlib.sha256(raw).hexdigest(),
        },
    }

Adjusted prices, timestamps, and point-in-time truth复权价格、时间戳与 Point-in-time 真相

FMP exposes full, non-split-adjusted, and dividend-adjusted historical price endpoints. These series answer different questions. Record the endpoint and adjustment mode with every dataset; never silently join adjusted closes to unadjusted highs and lows.

FMP 提供 Full、Non-split-adjusted 与 Dividend-adjusted 历史价格 Endpoint,它们回答不同问题。每个数据集都要记录 Endpoint 与复权模式,不能把复权 Close 与未复权 High/Low 静默拼接。

Series序列Useful for适合Failure if mixed混用风险
Full historical EOD完整历史 EODGeneral OHLCV analysis after validating field semantics验证字段语义后的通用 OHLCV 分析Assuming adjustment behavior without a test未测试就假设复权行为
Non-split-adjusted未拆股复权Inspecting observed prices around split events观察拆股事件前后的原始价格Artificial return jumps around corporate actions公司行动附近出现虚假收益跳变
Dividend-adjusted股息复权Total-return-oriented analysis when methodology matches方法一致时的总回报分析Double-counting cash dividends or mismatched backtests重复计算现金股息或回测口径不一致
  • Store event time, provider source time, retrieval time, and processing time separately.
  • Test pre-market, regular, after-hours, weekend, holiday, and daylight-saving boundaries.
  • Detect duplicates, reversed ranges, negative volume, missing sessions, and impossible OHLC relationships.
  • Pin a dataset version or raw-response hash so an agent answer can be reproduced.
  • 分别保存事件时间、供应商来源时间、检索时间和处理时间。
  • 测试盘前、常规交易、盘后、周末、节假日与夏令时边界。
  • 检测重复、区间反转、负成交量、缺失交易日与不可能的 OHLC 关系。
  • 保存 Dataset Version 或原始响应 Hash,使 Agent 答案可复现。

A data-quality acceptance contract数据质量验收契约

YAML · release gate
dataset: fmp_historical_eod
symbols: 100
window: 2025-01-01..2026-06-30
contract:
  required_fields: [symbol, date, open, high, low, close, volume]
  adjustment_mode: documented
  currency_and_exchange: resolved
  duplicate_keys: 0
  impossible_ohlc_rows: 0
  missing_expected_sessions_pct: "<= 0.25"
  stale_quote_rate_pct: "<= 0.50"
  p95_latency_ms: "<= 2500"
  unsafe_secret_logs: 0
evidence:
  raw_hash: required
  retrieved_at: required
  provider_endpoint: required
  validation_result: required

Set thresholds from your workload and market calendar; the numbers above are examples, not universal guarantees. Release only after replaying a frozen symbol/date set and reconciling a sample against an authoritative source.

阈值应根据工作负载与交易日历确定;上面的数字只是示例,不是通用保证。上线前必须重放冻结的 Symbol/Date 样本,并抽样与权威来源核对。

Production architecture for FMP dataFMP 数据的生产架构

1. Resolve identity

Map issuer, security, exchange, currency, ticker, CIK, and effective date. Never join on an ambiguous display symbol alone.

2. Fetch through a provider adapter

Centralize base URL, auth, timeout, concurrency, quota, retry classes, and request metadata.

3. Preserve raw evidence

Record endpoint, safe parameters, status, retrieval time, content hash, plan context, and response metadata before transformation.

4. Normalize and validate

Convert into a canonical schema, attach units and adjustment mode, then reject or quarantine invalid records.

5. Serve accepted data

Cache by dataset freshness, expose evidence references, and let the agent reason only over accepted records.

1. 解析身份

映射 Issuer、Security、Exchange、Currency、Ticker、CIK 与有效日期,不能只用模糊展示 Symbol 关联。

2. 通过 Provider Adapter 获取

集中管理 Base URL、Auth、Timeout、Concurrency、Quota、Retry Class 与请求元数据。

3. 保存原始证据

转换前记录 Endpoint、安全参数、Status、Retrieval Time、Content Hash、套餐上下文与响应元数据。

4. 标准化并验证

转换为 Canonical Schema,附加单位与复权模式,然后拒绝或隔离无效记录。

5. 提供验收数据

按 Dataset Freshness 缓存、暴露 Evidence Reference,只让 Agent 使用通过验收的记录。

Troubleshooting FMP API failures排查 FMP API 故障

Symptom现象Likely class可能类别Safe response安全处理
403Missing key, invalid key, or entitlementKey 缺失、无效或无权限Do not retry blindly; verify secret and plan access.不要盲目重试;检查 Secret 与套餐权限。
429Rate or quota limit频率或 Quota 限制Back off with jitter, reduce concurrency, cache, batch, and stop at deadline.带 Jitter 回退、降低并发、缓存、批量,并在 Deadline 停止。
500Provider-side failure供应商侧故障Bound retries, preserve request evidence, degrade or switch provider.限制重试、保存请求证据、降级或切换供应商。
Empty result with 200200 但结果为空Symbol, exchange, plan, date, or dataset mismatchSymbol、Exchange、Plan、Date 或 Dataset 不匹配Treat empty as a typed result, not zero; inspect identity and coverage.把空结果作为类型化结果而不是零;检查身份与覆盖。
Price discontinuity价格断层Split, dividend, currency, symbol change, or mixed adjustment拆股、股息、币种、Symbol 变化或复权混用Quarantine, inspect corporate actions, and recompute from one policy.隔离记录、检查公司行动,并按统一策略重算。

Compare FMP with one shared workload用一个统一任务比较 FMP

Do not compare providers with different symbols, dates, plans, caches, and acceptance rules. Replay the same frozen workload and score accepted datasets.

Dimension维度FMPFMPPolygonAlpha VantageTwelve Data
Test job测试任务100 symbols: quote + 12 months EOD + latest fundamentals + corporate-action reconciliation100 个 Symbol:Quote + 12 个月 EOD + 最新基本面 + 公司行动核对
Record记录Accepted completion, missing fields, stale data, adjustment mismatch, P50/P95, retries, total cost, licensing fit验收率、字段缺失、过期数据、复权不一致、P50/P95、重试、总成本与许可适配
Decision决策Choose by workload result and operating burden, not a generic winner.根据任务结果与运维负担选择,不宣布通用赢家。

Migration checklist for endpoint or provider changesEndpoint 或供应商变更的迁移清单

  • Inventory every endpoint, caller, key location, quota, cache key, schema, adjustment assumption, and downstream consumer.
  • Freeze representative responses and expected normalized records before changing the adapter.
  • Run old and new paths in read-only shadow mode; compare values, dates, missing rates, latency, and cost.
  • Canary one low-risk dataset, preserve rollback, and block writes or agent conclusions when evidence is incomplete.
  • Update runbooks, dashboards, licensing records, secret rotation, and data-retention controls before cutover.
  • 盘点所有 Endpoint、Caller、Key 位置、Quota、Cache Key、Schema、复权假设与下游消费者。
  • 修改 Adapter 前冻结代表性响应与预期标准化记录。
  • 以只读 Shadow 模式并行运行新旧路径,对比数值、日期、缺失率、延迟与成本。
  • 先对一个低风险 Dataset 做 Canary,保留回滚;证据不完整时阻止写入或 Agent 结论。
  • 切换前更新 Runbook、Dashboard、许可记录、Secret Rotation 与数据保留控制。

QVeris pattern: discover, inspect, call, then validateQVeris 模式:发现、检查、调用,然后验证

QVeris fits when an existing agent needs a capability layer rather than a hard-coded provider endpoint. The agent can discover a financial capability by intent, inspect parameters and operational signals, call the selected capability, then feed only validated evidence into reasoning.

当现有 Agent 需要能力层,而不是硬编码供应商 Endpoint 时,QVeris 更合适。Agent 可按意图发现金融能力,检查参数与运行信号,调用所选能力,再把通过验证的证据交给模型推理。

Keep the boundary explicit: QVeris does not replace your market-data license, system of record, identity policy, validation rules, portfolio logic, or approval authority. It routes capabilities; your application owns business truth.

保持边界明确:QVeris 不替代市场数据许可、事实来源、身份策略、验证规则、投资组合逻辑或审批权威。它负责路由能力;业务真相仍由应用负责。

FMP stock market API FAQFMP 股票市场 API 常见问题

Is the FMP stock market API free?

FMP lists a free Basic plan for testing with daily call and bandwidth limits. Verify endpoint access, history, real-time coverage, commercial rights, and redistribution rules for your plan.

What is the current FMP base URL?

The current Quickstart documents https://financialmodelingprep.com/stable/. Keep it in configuration so provider changes do not spread through product code.

How should the API key be stored?

Use a server-side secret manager. Never put the key in browser code, prompts, logs, screenshots, or committed notebooks.

Adjusted vs unadjusted prices?

They answer different questions. Record the endpoint and adjustment mode, and never mix series in one return calculation.

How should 429 be handled?

Use bounded exponential backoff with jitter, reduce concurrency, cache stable data, batch when appropriate, and stop at a deadline.

Can FMP data be redistributed?

Do not infer rights from API access. Confirm display and redistribution terms for the product, users, territory, and storage period.

Is FMP enough for an AI agent?

It supplies data, but the agent still needs identity, policy, normalization, validation, evidence, retries, and observability.

Where does QVeris fit?

QVeris can route discoverable financial capabilities while the application retains business policy, authoritative records, and acceptance tests.

FMP 股票市场 API 免费吗?

FMP 提供用于测试的免费 Basic Plan,并有每日调用与带宽限制。应按实际套餐确认 Endpoint、历史、实时覆盖、商业权利与再分发规则。

当前 FMP Base URL 是什么?

当前 Quickstart 使用 https://financialmodelingprep.com/stable/。应把它放进配置,避免供应商变化扩散到产品代码。

API Key 应如何保存?

使用服务端 Secret Manager,不要把 Key 放入浏览器代码、Prompt、Log、截图或提交的 Notebook。

复权与未复权价格有什么区别?

它们回答不同问题。记录 Endpoint 与复权模式,不能在同一收益计算中混用不同序列。

如何处理 429?

使用带 Jitter 的有限指数退避、降低并发、缓存稳定数据、适当批量,并在 Deadline 停止。

FMP 数据可以再分发吗?

不能从 API Access 推断许可。应确认产品、用户、地区与存储周期对应的展示和再分发条款。

FMP 足以支持 AI Agent 吗?

它提供数据,但 Agent 仍需要身份、策略、标准化、验证、证据、重试与可观测性。

QVeris 放在哪一层?

QVeris 可路由可发现的金融能力,应用继续负责业务策略、权威记录与验收测试。

Official sources and update policy官方资料与更新策略

Endpoint, pricing, freshness, and licensing claims were checked against official sources on July 31, 2026. Recheck the current plan and agreement before procurement or release.

Endpoint、价格、更新频率与许可信息于 2026 年 7 月 31 日根据官方资料核验。采购或上线前应重新检查当前套餐与协议。