agentsclimarketplace

Etf detail

Skill FTShare-Lab/FTShare-skills/ftshare-market-data/sub-skills/etf-detail

Get single ETF detail (单只 ETF 详情). Use when user asks about 某只 ETF 详情、ETF 行情、510050 行情、上证50ETF、ETF 名称/涨跌幅/跟踪指数/市值.From its SKILL.md

Install
npx -y skills add FTShare-Lab/FTShare-skills --skill etf-detail

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

3.7 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

单只 ETF 详情 - 查询单只 ETF 详情

1. 接口描述

项目说明
接口名称查询单只 ETF 详情
外部接口GET /api/v1/market/data/daec/etf?symbol=:etf
请求方式GET
适用场景获取 A 股指定 ETF 的详情(名称、行情、盘口、市值、涨跌幅、跟踪指数、投资类型等);支持通过 masks 按需返回部分字段;带登录态时可能包含是否在默认分组

2. 请求参数

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

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

3. 响应说明

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

{
    "name": "上证50ETF",
    "symkey": "510050.XSHG",
    "latest": 2.85,
    "prev_close": 2.845,
    "change_rate": 0.0018,
    "volume": 125000000,
    "turnover": 356000000.0,
    "tracking_index_symkey": "000016.XSHG"
}

根字段(部分常用)

字段名类型是否可为空说明单位
namestring是ETF 名称—
symkeystring是标的键—
symbol_idstring是标的 ID—
ex_idstring是市场 ID—
tracking_index_symkeystring是跟踪指数标的键—
latestfloat是最新价元
closefloat是收盘价元
openfloat是开盘价元
highfloat是最高价元
lowfloat是最低价元
prev_closefloat是昨收价元
limit_upfloat是涨停价元
limit_downfloat是跌停价元
changefloat是涨跌额元
change_ratefloat是涨跌幅%
volumelong是成交量份
turnoverfloat是成交额元
turnover_ratefloat是换手率%
market_cap_totalfloat是总市值元
market_cap_circulatingfloat是流通市值元
invest_kindstring是投资标的类型—
invest_strategystring是投资策略分类—
trade_modestring是交易模式—
is_in_default_choice_groupboolean是是否在默认分组(需登录)—

4. 用法

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

python <RUN_PY> etf-detail --etf 510050.XSHG
python <RUN_PY> etf-detail --etf 159915.XSHE --masks name,symkey,latest,change_rate,volume,turnover

<RUN_PY> 为主 SKILL.md 同级的 run.py 绝对路径。脚本输出 JSON,请求头已内置 X-Client-Name: ft-claw。

5. 请求示例

GET /api/v1/market/data/daec/etf?symbol=510050.XSHG

6. 注意事项

  • 涨跌幅 change_rate 等比率字段在接口中可能为小数形式,展示时按需乘以 100 转为百分比
  • 成交量、成交额、市值等大数字展示时可按需换算单位(如万、亿)
  • 完整字段以代码 Etf 为准;未传 masks 时返回全部可用字段

What ships with it: 2 files

7.6 KB alongside SKILL.md, 2 of them executable

scripts/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.