Skip to content
index-detail logo

单只指数详情 - 查询单只指数详情

index-detail

Get single index detail (单只指数详情). Use when user asks about 某只指数详情、指数行情、上证指数、沪深300、指数名称/点位/涨跌幅/成交.

SKILL.md

Full skill instructions

单只指数详情 - 查询单只指数详情

1. 接口描述

项目说明
接口名称查询单只指数详情
外部接口GET /​app/​api/​v2/​indices/:index
请求方式GET
适用场景获取 A 股指定指数的详情(名称、行情点位、成交、涨跌幅等);支持通过 masks 按需返回部分字段

2. 请求参数

说明:index 为路径参数(必填),masks 为可选项。

参数名类型是否必填描述取值示例备注
indexstring是指数标的键(路径参数,带市场后缀)000001.XSHG、399001.XSHE、920036.BJ沪 .XSHG、深 .XSHE、北交所 .BJ
masksstring否字段掩码,逗号分隔的字段名,仅返回这些字段name,symkey,latest,change_rate不传则返回全部字段;字段名须匹配正则 ^[a-zA-Z_][a-zA-Z0-9_]*$(首字符为字母或下划线,后续可为字母、数字、下划线),非法字段名会报错

3. 响应说明

返回单只指数对象,与代码 Index 一致。不传 masks 时返回全部字段,传 masks 时仅返回指定字段;各字段均可能为 null 或不存在。点位与价格类保留 4 位小数。

{
    "name": "上证指数",
    "symkey": "000001.XSHG",
    "latest": 3252.30,
    "prev_close": 3245.67,
    "change": 6.63,
    "change_rate": 0.0020,
    "volume": 280000000,
    "turnover": 350000000000.0,
    "amplitude": 0.0052
}

根字段(部分常用)

字段名类型是否可为空说明单位
namestring是指数名称—
symkeystring是标的键—
symbol_idstring是标的 ID—
ex_idstring是市场 ID—
latestfloat是最新点位点
closefloat是收盘点位点
openfloat是开盘点位点
highfloat是最高点位点
lowfloat是最低点位点
prev_closefloat是昨收点位点
changefloat是涨跌点位点
change_ratefloat是涨跌幅%
volumelong是成交量—
turnoverfloat是成交额元
amplitudefloat是振幅%
change_rate_5dfloat是5 日涨跌幅%
change_rate_10dfloat是10 日涨跌幅%
change_rate_20dfloat是20 日涨跌幅%
change_rate_60dfloat是60 日涨跌幅%
change_rate_120dfloat是120 日涨跌幅%
change_rate_6mfloat是6 月涨跌幅%
change_rate_1yfloat是1 年涨跌幅%
change_rate_2yfloat是2 年涨跌幅%
change_rate_3yfloat是3 年涨跌幅%
change_rate_ytdfloat是今年至今涨跌幅%

4. 用法

通过主目录 run.py 调用(必填 --index,可选 --masks):

python <RUN_PY> index-detail --index 000001.XSHG
python <RUN_PY> index-detail --index 399001.XSHE --masks name,symkey,latest,change_rate,volume,turnover

或在子 skill 目录下执行:python scripts/​handler.py --index 000001.XSHG(可选 --masks)。<RUN_PY> 为主 SKILL.md 同级的 run.py 绝对路径。脚本输出 JSON,请求头已内置 X-Client-Name: ft-claw。

5. 请求示例

GET https://market.ft.tech/​app/​api/​v2/​indices/​000001.XSHG

完整请求示例(curl)

curl -X GET 'https://market.ft.tech/​app/​api/​v2/​indices/​000001.XSHG' \
  -H 'X-Client-Name: ft-claw' \
  -H 'Content-Type: application/​json'

6. 数据更新时间与注意事项

  • 数据更新时间以接口/行情源为准。
  • 涨跌幅 change_rate 等比率字段在接口中可能为小数形式,展示时按需乘以 100 转为百分比。
  • 成交量、成交额等大数字展示时可按需换算单位(如万、亿)。
  • 完整字段以代码 Index 为准;未传 masks 时返回全部可用字段。
  • 若用户输入的是指数名称/简称而非代码,建议先调用 index-description-all 或 index-list-paginated 映射出唯一 symkey,再调用本接口。

More Other skills

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

179.7K 76.1K
View

Fundamental design principles for writing maintainable, testable Python code.

40.2K 21.9K
View

Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.

40.2K 20K
View

Generate Playwright tests from scenarios using interactive browser exploration and validation.

39.7K 18.2K
View

Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.

40.2K 14.7K
View

GDPR-compliant data handling with consent management, data subject rights, and privacy controls.

40.2K 14.3K
View

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

40.2K 13.5K
View

Detailed multi-file refactor planning with safety checks and rollback guidance.

39.7K 13K
View