$npx -y skills add FTShare-Lab/FTShare-skills --skill fund-classification-single-fund查询基金在多套分类标准下的分类。当用户需要查询基金按证监会/晨星/银河证券/Gangtise 等标准的分类,可按 classify_std 过滤时使用。
| 1 | # 基金分类 |
| 2 | |
| 3 | ## 接口说明 |
| 4 | |
| 5 | | 项目 | 说明 | |
| 6 | |----------|-------------------------------------------------------------------| |
| 7 | | 接口名称 | 基金分类 | |
| 8 | | 外部接口 | `/api/v1/market/data/fund/fund-classification` | |
| 9 | | 请求方式 | GET | |
| 10 | |
| 11 | ## 请求参数 |
| 12 | |
| 13 | | 参数名 | 类型 | 是否必填 | 描述 | |
| 14 | |--------|------|----------|------| |
| 15 | | `--fund_code` | string | 是 | 基金代码(trade_code 形式,如 000001 或 000001.OF) | |
| 16 | | `--classify_std` | string | 否 | 分类标准:证监会基金分类/晨星基金分类/银河证券分类2017版/Gangtise基金分类/Gangtise基金概念分类,缺省全部 | |
| 17 | |
| 18 | ## 执行方式 |
| 19 | |
| 20 | 通过根目录的 `run.py` 调用(推荐): |
| 21 | |
| 22 | ```bash |
| 23 | python <RUN_PY> fund-classification-single-fund --fund_code 000001 --classify_std 晨星基金分类 |
| 24 | ``` |
| 25 | |
| 26 | > `<RUN_PY>` 为主 `SKILL.md` 同级的 `run.py` 绝对路径。 |
| 27 | |
| 28 | ## 响应结构 |
| 29 | |
| 30 | JSON 对象或数组,结构请参考 [ftshare-doc](../..) 接口文档。 |
| 31 | |
| 32 | ## 注意事项 |
| 33 | |
| 34 | - 必填参数必须提供。 |
| 35 | - 响应以 JSON 格式输出至 stdout,诊断信息输出至 stderr。 |