← 返回 Skills 市场
gangtisegts

gangtise-data

作者 GangtiseGts · GitHub ↗ · v1.4.1 · MIT-0
cross-platform ⚠ suspicious
32
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install gangtise-data
功能描述
通过 Gangtise 金融 Open API 拉取结构化量化数据,包括 A 股日 K 行情、财务三大报表、主营构成与估值分位等。需在 scripts 目录配置授权(.authorization),证券参数须为完整代码(如 600519.SH)。当用户需要可落盘的表格化行情与基本面数据时使用。
使用说明 (SKILL.md)

搜索

概览

本技能在本机调用 scripts/*.py,请求 Gangtise Open APIopen.gangtise.com),得到结构化、可保存为 CSV 的结果(由 scripts/utils.py 中的 format_response 写入工作区 workspace/gangtise/ 下对应子目录)。

当前脚本覆盖:

  • 估值分析(多指标并发、历史分位):scripts/valuation.py
  • A 股日 K(可选全市场、前复权收盘价):scripts/quote.py
  • 主营构成(按产品/行业/地区,可并发全维度):scripts/main_business.py
  • 财务报表(利润表/资产负债表/现金流量表):scripts/financial.py
  • 盈利预测(券商一致预期多指标):scripts/earning_forecast.py

使用场景:

  • 需要精确数值、时间序列或宽表,并保存为 CSV 做后续分析或制图。
  • 已具备或可查到 完整证券代码(本技能不做简称/键盘精灵解析)。

与其他技能的区别:

项目 gangtise-data(本技能) gangtise-file gangtise-kb
数据形态 结构化数值表(行情、财务、估值等),可落盘 CSV 文件索引:按类型/证券/日期等筛文档,返回 ID、元数据、摘要,可下载全文 语义检索:返回与查询相关的内容片段,偏阅读与推理
典型问题 「这只股票某段区间的收盘价、利润表科目是多少」 「最近有哪些研报/公告、ID 是什么」 「文档里怎么论述某观点、结论是什么」
调用方式 本机脚本 + scripts/.authorization 本机脚本 + 授权 本机脚本 + 授权

(中文说明:本技能解决「是多少、表格化」;要先列文件再下载gangtise-file;要读原文片段、问答gangtise-kb。)

授权:在 scripts/ 下放置 .authorization,内容为 long-term-token,或 accessKey + secretAccessKey(将自动换 token)。详见 scripts/utils.py

调用脚本时若使用 -sd / -ed,请注意当前真实日期与年份

报告期(财务 / 主营):命令行统一使用 Q1 / Q2 / Q3 / Q4 / Q0(分别对应一季报、中报、三季报、年报、最新一期);脚本内再映射为 Open API 所需枚举(详见各 references)。

调用各脚本前,请阅读对应 references 中的参数与返回说明。

使用说明

1. 估值数据(估值分析)

基于 open 估值分析接口,并发拉取 peTtm / psTtm / pbMrq / peg / pcfTtm / em,并组装为与后端类似的宽表列(含「在 N 年中所处分位」)。-sd/-ed 默认均为当天。

python3 scripts/valuation.py --securities 600519.SH,000858.SZ
python3 scripts/valuation.py --securities-file ./codes.csv -sd 2023-01-01 -ed 2026-12-31

详见 估值数据调用指导

2. 行情数据(日 K)

基于 open 日 K 接口;-sd/-ed 默认均为当天;--all-market 时不传证券列表(数据量可能极大,需配合日期与 limit)。

python3 scripts/quote.py --securities 00700.HK -sd 2026-04-23 -ed 2026-04-23
python3 scripts/quote.py --securities-file ./codes.csv --limit 8000

详见 行情数据调用指导

3. 主营构成

基于 open main-business 接口;不传 --breakdown 时并发拉取 product / industry / region 三种拆分。--period 仅支持 Q2(中报)或 Q4(年报)。

python3 scripts/main_business.py --securities 000651.SZ
python3 scripts/main_business.py --securities 600519.SH --breakdown product --period Q4

详见 主营构成调用指导

4. 财务数据(三大报表)

基于 open financial-report 系列接口,支持 income/balance/cashflow--period 使用 Q1~Q4,Q0(默认 Q0),--granularity 支持 accumulated|quarterly(默认 accumulated,仅利润表/现金流量表生效);默认 fieldList=[] 返回全部科目。

python3 scripts/financial.py --securities 600519.SH
python3 scripts/financial.py --table-type balance --securities 600519.SH --period Q4
python3 scripts/financial.py --table-type income --granularity quarterly --securities 600519.SH --fiscal-year 2025 --period Q2 --field-list totalOpRev,totalOpCost,netProfit,basicEPS
python3 scripts/financial.py --securities-file ./codes.csv --field-list netProfit,basicEarningsPerShare

详见 财务数据调用指导

5. 盈利预测(券商一致预期)

基于 open earning_forecast 接口,支持通过 --securities/--securities-file 并发查询多只证券在指定日期区间的券商一致预期;支持通过 --consensus-list 选择指标,不传则默认返回全部可选字段。-sd/-ed 默认均为当天。返回会展开为 security_code | date | 预测年份 | ... 的扁平表;若单日查询当日无数据,会仅向前回退一天重试一次。

python3 scripts/earning_forecast.py --securities 600519.SH,000858.SZ -sd 2026-03-20 -ed 2026-03-25
python3 scripts/earning_forecast.py --securities-file ./codes.csv -sd 2026-03-20 -ed 2026-03-25 --consensus-list netIncome,eps,pe

详见 盈利预测调用指导

\x3C!-- 通过scripts/utils.py检查版本;通过执行scripts/update.sh或scripts/update.bat进行更新 -->

\x3C!-- 如果skills主目录下存在gangtise_update.sh或gangtise_update.bat,则可以执行该脚本对所有以"gangtise-"开头的SKILL进行更新 -->

安全使用建议
Install only if you trust this publisher and the Gangtise API integration. Before use, protect scripts/.authorization, confirm GANGTISE_DOMAIN is not set to an unexpected host, and avoid running scripts/update.sh unless you can verify the remote zip. Expect successful queries to save CSV files under workspace/gangtise.
功能分析
Type: OpenClaw Skill Name: gangtise-data Version: 1.4.1 The skill bundle is a legitimate integration for the Gangtise Financial Open API (open.gangtise.com), providing scripts to fetch market quotes, financial statements, and valuation data. The code is well-structured, uses standard libraries (pandas, requests), and includes comprehensive documentation in the references directory. While it contains a self-update script (scripts/update.sh) that downloads and extracts a remote ZIP file from a Huawei Cloud OBS bucket (gts-download.obs.myhuaweicloud.com), this behavior is explicitly documented and aligned with the tool's maintenance requirements. No evidence of malicious intent, credential theft, or unauthorized data exfiltration was found.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The API calls, securities parameters, and CSV output are coherent with the stated financial-data purpose, but the skill necessarily uses sensitive Gangtise authorization.
Instruction Scope
The documented data-fetching commands are user-directed and scoped to securities, dates, and report types; no artifact shows automatic trading, posting, deletion, or unrelated account mutation.
Install Mechanism
Although there is no install spec, the included update.sh can remove and replace the installed skill from an unsigned remote zip archive.
Credentials
The code allows an undeclared GANGTISE_DOMAIN environment variable to redirect API endpoints away from the documented open.gangtise.com host.
Persistence & Privilege
The skill reads a local .authorization file or credential environment variables and writes results under workspace/gangtise, which is expected but sensitive.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gangtise-data
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gangtise-data 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.4.1
gangtise-data v1.0.0 - 初始发布,支持通过 Gangtise 金融 Open API 获取结构化量化数据。 - 覆盖 A 股日 K 行情、财务三大报表、主营构成(多维分析)、估值分位、券商一致预期等数据类型。 - 输出结果为可落盘的 CSV 表格,便于后续分析或制图。 - 需配置授权文件(.authorization),证券参数须为完整代码(如 600519.SH)。 - 支持多证券并发、灵活的日期/指标筛选,详细使用方法见各模块说明。
元数据
Slug gangtise-data
版本 1.4.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

gangtise-data 是什么?

通过 Gangtise 金融 Open API 拉取结构化量化数据,包括 A 股日 K 行情、财务三大报表、主营构成与估值分位等。需在 scripts 目录配置授权(.authorization),证券参数须为完整代码(如 600519.SH)。当用户需要可落盘的表格化行情与基本面数据时使用。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 32 次。

如何安装 gangtise-data?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gangtise-data」即可一键安装,无需额外配置。

gangtise-data 是免费的吗?

是的,gangtise-data 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

gangtise-data 支持哪些平台?

gangtise-data 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 gangtise-data?

由 GangtiseGts(@gangtisegts)开发并维护,当前版本 v1.4.1。

💬 留言讨论