Industry Performance Snapshot细分行业表现快照
该接口每日汇总各细分行业在主要交易所的平均涨跌幅,如广告代理、医疗设备、科技服务等,用于实时跟踪行业表现趋势、发现增长板块。
https://quote-fmp.com/stable/industry-performance-snapshot?date=2024-02-01数据更新周期
1 Hour
接口说明
- 行业级表现数据:查看主要交易所特定行业的平均涨跌幅,传入
date后可输出industry(细分行业)、exchange(交易所代码)与averageChange(平均涨跌幅) 等结构化字段,省去繁琐的网页抓取与文本清洗。 - 实时市场洞察:借助每日更新实时分析行业表现趋势与动向,参考
industry(细分行业)与exchange(交易所代码) 等披露数值,能直观评估标的在同类资产中的相对排位。 - 分交易所数据:比较不同行业在 NASDAQ、NYSE 等各交易所上的表现,在搭建投研工作流时,建议配合「细分行业历史表现」同步拉取关联截面数据。
- 配套投研接口:Historical Sector PE(板块历史市盈率) · Historical Industry PE(细分行业历史市盈率) · Available Industries(可用细分行业清单) · Stock Screener(条件选股)
请求参数
3 个参数| 参数 | 类型 | 要求 | 示例 | 说明 |
|---|---|---|---|---|
date | string | 必填 | 2024-02-01 | 单一日期,格式 YYYY-MM-DD,用于查询某一天的行情或快照。 |
exchange | string | 可选 | NASDAQ | 目标交易所代码或名称,如 NASDAQ、NYSE、AMEX。 |
industry | string | 可选 | Biotechnology | 细分行业(industry),如 Software、Biotechnology,用于筛选股票。 |
调用代码示例
Python 关键代码按示例请求 /stable/industry-performance-snapshot 获取细分行业表现快照(必填 date),DataFrame 包含 industry(细分行业)、exchange(交易所代码)、averageChange(平均涨跌幅)(industry=Advertising Agencies)。
resp = requests.get(
"https://quote-fmp.com/stable/industry-performance-snapshot",
params={"date": "2024-02-01", "exchange": "NASDAQ", "industry": "Biotechnology", "apikey": FMP_KEY},
timeout=15,
)
resp.raise_for_status()
df = pd.DataFrame(resp.json())
# 按 date 升序重排并数值化 averageChange(平均涨跌幅)
df["averageChange"] = pd.to_numeric(df["averageChange"], errors="coerce")
df = df.sort_values("date").reset_index(drop=True)参数使用和避坑
2 组参数组合 · 2 条避坑以下列出本接口在高频投研与回测场景下的常用 Query 参数组合写法:
| 投研场景 | Query 参数组合示例 | 返回数据特征与用途 |
|---|---|---|
| 指定纳斯达克(NASDAQ)拉取细分行业表现快照 | date=2024-02-01&exchange=NASDAQ | 向 /stable/industry-performance-snapshot 传 exchange=NASDAQ,获取纳斯达克市场的 industry、exchange、averageChange(样本 industry=Advertising Agencies)。 |
| 切换纽交所(NYSE)对比细分行业表现快照 | date=2024-02-01&exchange=NYSE | 改传 exchange=NYSE 调用 /stable/industry-performance-snapshot,拉取纽交所主板对应的 industry、exchange、averageChange。 |
在量化流水线中调用 /stable/industry-performance-snapshot(细分行业表现快照,必填 date),拿到的 industry(Advertising Agencies)与 averageChange(3.8660194344955996)需先经过非空校验再送入因子矩阵。
/stable/industry-performance-snapshot 单行含 4 个属性(如 averageChange=3.8660194344955996);PostgreSQL 或 ClickHouse 建表推荐以 (date, exchange, industry) 为排序主键。
返回数据
4 个字段本接口示例响应共包含 4 个字段(数值型 1 个,文本/日期/布尔型 3 个)。下表列出全部字段名、类型、首条记录真实样本值与中文释义,实际返回会因接口与数据状态有所不同。
| 字段 | 类型 | 示例值 | 说明 |
|---|---|---|---|
date | string | "2024-02-01" | 日期 |
industry | string | "Advertising Agencies" | 细分行业 |
exchange | string | "NASDAQ" | 交易所代码 |
averageChange | number | 3.8660194344955996 | 平均涨跌幅 |
查看响应数据示例(原始 JSON)
[
{
"date": "2024-02-01",
"industry": "Advertising Agencies",
"exchange": "NASDAQ",
"averageChange": 3.8660194344955996
}
]常见问题解答(FAQ)
2 个问题在对接「Market Performance」数据线时,细分行业表现快照与 板块表现快照 各自解决什么问题?
细分行业表现快照 通过 /stable/industry-performance-snapshot(必填 date)返回 industry(细分行业)、exchange(交易所代码)等 4 列明细;同模块的 Market Sector Performance Snapshot(板块表现快照) 则通过 /stable/sector-performance-snapshot(必填 date)提供配套数据。
想要完整归档细分行业表现快照,请求 /stable/industry-performance-snapshot 时在参数调度上有什么最佳实践?
在采集 细分行业表现快照 时,可传入精确匹配的 date 参数调用 /stable/industry-performance-snapshot;若遇到休市日或未披露窗口返回 [],脚本应记录水位线并平滑跳过。
同模块相关接口对比
Market Performance本接口路径 /stable/industry-performance-snapshot,必填参数 date。 同一模块「Market Performance」下共 4 个接口,下表列出其余 3 个, 按粒度与查询维度对比,避免选错接口。
| 接口 | 路径 | 核心差异与适用场景 |
|---|---|---|
| 板块表现快照Market Sector Performance Snapshot | /stable/sector-performance-snapshot | 按板块平均涨跌幅呈现市场各板块的表现,分析不同行业在市场中的实时表现 |
| 板块历史表现Historical Market Sector Performance | /stable/historical-sector-performance | 能源、科技、医疗健康等市场板块的历史涨跌数据,覆盖主要交易所 |
| 细分行业历史表现Historical Industry Performance | /stable/historical-industry-performance | 生物科技、科技、金融服务等各细分行业的历史涨跌数据,覆盖主要交易所 |