Historical Industry PE细分行业历史市盈率
该接口提供生物科技、金融服务、消费品等各细分行业市盈率(P/E)的历史数据,用于追踪行业估值随时间的演变,理解市场情绪与估值水平的长期变化。
https://quote-fmp.com/stable/historical-industry-pe?industry=Biotechnology数据更新周期
1 Hour
接口说明
- 分行业市盈率数据:查询特定细分行业的历史市盈率,跟踪其估值如何随时间演变,传入
industry后可获取industry(细分行业)、exchange(交易所代码)与pe(市盈率(P/E)) 等核心要素,减少跨市场数据入库时的字段映射工作。 - 分交易所分析:查看 NASDAQ、NYSE 等不同交易所上细分行业的市盈率水平,汇总
industry(细分行业)与exchange(交易所代码) 等字段信息,方便输出标准化的个股或资产深度研究底稿。 - 长期估值趋势:通过历史数据识别估值趋势与细分行业内市场情绪的变化,当单一端点维度不足时,可结合「板块历史市盈率」拼装出更全面的分析视图。
- 配套投研接口:Market Sector Performance Snapshot(板块表现快照) · Industry Performance Snapshot(细分行业表现快照) · S&P 500 Index(标普500成分股) · Exchange Stock Quotes(交易所全量报价)
请求参数
4 个参数| 参数 | 类型 | 要求 | 示例 | 说明 |
|---|---|---|---|---|
industry | string | 必填 | Biotechnology | 细分行业(industry),如 Software、Biotechnology,用于筛选股票。 |
exchange | string | 可选 | NASDAQ | 目标交易所代码或名称,如 NASDAQ、NYSE、AMEX。 |
from | string | 可选 | 2024-02-01 | 查询起始日期,格式 YYYY-MM-DD,包含当天。 |
to | string | 可选 | 2024-03-01 | 查询结束日期,格式 YYYY-MM-DD,包含当天。 |
调用代码示例
Python 关键代码/stable/historical-industry-pe 专供细分行业历史市盈率查询(必填 industry),返回列表含 industry(细分行业)、exchange(交易所代码)、pe(市盈率(P/E))(如 industry=Biotechnology)。
resp = requests.get(
"https://quote-fmp.com/stable/historical-industry-pe",
params={"industry": "Biotechnology", "exchange": "NASDAQ", "from": "2024-02-01", "to": "2024-03-01", "apikey": FMP_KEY},
timeout=15,
)
resp.raise_for_status()
df = pd.DataFrame(resp.json())
# 按 date 升序重排并数值化 pe(市盈率(P/E))
df["pe"] = pd.to_numeric(df["pe"], errors="coerce")
df = df.sort_values("date").reset_index(drop=True)参数使用和避坑
2 组参数组合 · 2 条避坑以下列出本接口在高频投研与回测场景下的常用 Query 参数组合写法:
| 投研场景 | Query 参数组合示例 | 返回数据特征与用途 |
|---|---|---|
| 按季度日历边界检索 2025Q1 细分行业历史市盈率 | industry=Biotechnology&from=2025-01-01&to=2025-03-31 | 以闭区间 [2025-01-01, 2025-03-31] 查询 /stable/historical-industry-pe,精准过滤出当季的 industry、exchange、pe 明细。 |
| 指定 2024 年末半年窗口同步细分行业历史市盈率 | industry=Biotechnology&from=2024-07-01&to=2024-12-31 | 切换至 2024 年下半年区间查询 /stable/historical-industry-pe,与当期数据拼接成连续的 industry、exchange、pe 时间序列。 |
/stable/historical-industry-pe 提供细分行业历史市盈率的 industry(细分行业)与 exchange(交易所代码)共 4 列;遇到休市日或冷门代码返回空数组时应做跳过容错。
针对 /stable/historical-industry-pe 输出的 industry(Biotechnology)与 pe(8.129037884885042),建表时请用 (date, exchange, industry) 作主键约束,并显式处理 null 字段。
返回数据
4 个字段本接口示例响应共包含 4 个字段(数值型 1 个,文本/日期/布尔型 3 个)。下表列出全部字段名、类型、首条记录真实样本值与中文释义,实际返回会因接口与数据状态有所不同。
| 字段 | 类型 | 示例值 | 说明 |
|---|---|---|---|
date | string | "2024-03-01" | 日期 |
industry | string | "Biotechnology" | 细分行业 |
exchange | string | "NASDAQ" | 交易所代码 |
pe | number | 8.129037884885042 | 市盈率(P/E) |
查看响应数据示例(原始 JSON)
[
{
"date": "2024-03-01",
"industry": "Biotechnology",
"exchange": "NASDAQ",
"pe": 8.129037884885042
}
]常见问题解答(FAQ)
2 个问题对比细分行业历史市盈率与 板块市盈率快照:/stable/historical-industry-pe 的调用方式和返回字段有哪些独特之处?
细分行业历史市盈率(/stable/historical-industry-pe,必填 industry)聚焦于提供 industry、exchange 等 4 个字段;同属「PE Ratio」的 Sector Pe Snapshot(板块市盈率快照)则提供 4 个字段。
对接细分行业历史市盈率端点 /stable/historical-industry-pe 时,大跨度回溯与日常增量刷新分别怎么传参?
对接 细分行业历史市盈率 时可在 /stable/historical-industry-pe 中传入 from/to 日期区间分批拉取;配合连接池复用与 15~30 秒超时设置,能大幅提升 industry 的同步吞吐率。
同模块相关接口对比
PE Ratio本接口路径 /stable/historical-industry-pe,必填参数 industry。 同一模块「PE Ratio」下共 4 个接口,下表列出其余 3 个, 按粒度与查询维度对比,避免选错接口。