gangtise-openapi-cli 0.46.0 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -9
- package/dist/src/commands/ai.js +25 -1
- package/dist/src/commands/bond.js +32 -3
- package/dist/src/commands/insight.js +12 -3
- package/dist/src/commands/shared.js +2 -2
- package/dist/src/core/client.js +6 -4
- package/dist/src/core/endpoints.js +40 -0
- package/gangtise-openapi/SKILL.md +21 -13
- package/gangtise-openapi/references/commands/ai.md +42 -0
- package/gangtise-openapi/references/commands/bond.md +17 -1
- package/gangtise-openapi/references/commands/fund.md +1 -0
- package/gangtise-openapi/references/commands/indicator.md +56 -3
- package/gangtise-openapi/references/commands/insight.md +12 -4
- package/gangtise-openapi/references/errors.md +1 -1
- package/gangtise-openapi/references/examples.md +1 -1
- package/gangtise-openapi/references/response-schema.md +6 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
|
|
7
7
|
README 仅列最近 5 个版本摘要:
|
|
8
8
|
|
|
9
|
+
- **v0.48.0 — 2026-10-24**:① **新增管理层情绪三个命令**:`ai management-sentiment-indicator`(每场业绩会的正面回应程度 / 回复乐观度 / 回复确定度评分与按问题类型拆分)、`ai management-sentiment-conclusion`(情绪结论与较上一场的问答对照),各 5 积分/条、自动翻页;`ai management-sentiment-detail` 按列表返回的 `source.sourceId` 取逐条问答评分与依据,10 积分/次。⚠️ 返回的 `publishTime` 比北京时间早 8 小时(时间筛选按北京时间),按时刻展示或按日期归档前先加 8 小时。② **新增 `bond default-list` 违约债券**(0.4 积分/次):按违约日期区间(不超过 1 年)/ `--security` / `--issuer` 三选一;`--issuer` 一次一个、用发行人全称,简称只返回最匹配的一家主体,核对 `issuerName`。③ 文档:EDE 基金指标(分类、复权净值、区间收益与风险指标、同类排名),区间指标的参数须显式传。④ 依赖 `undici` 升级到 7.30.1(含上游安全修复)。
|
|
10
|
+
|
|
11
|
+
- **v0.47.0 — 2026-10-17**:① **`insight opinion list` 新增 `--category`(观点类别:业绩点评 / 异动点评 / 调研访谈更新 / 交易台 / 行业分析)与 `--broker-tag`(头部券商 / 新财富团队)**,返回行带 `categoryList` / `brokerTagList`。② **`--llm-tag` 改为 28 项投研业务标签**(强烈推荐、超预期、涨价、龙头等,取值见 `--help`);⚠️ **存量脚本要改**:业绩点评、头部券商、新财富团队改用 `--category earningsReview` / `--broker-tag topBroker` / `--broker-tag newFortune`,传给 `--llm-tag` 报 `100005`。同一选项传多个值取并集。③ `--with-content` 不支持 `--category` / `--broker-tag`(本地报错、不发请求),其 `--llm-tag` 仍只收旧的四个值;要按新标签筛又要正文,用 `list` + `detail`。④ **`bond daily-quote` / `bond valuation` 首行比起始日晚超过 14 天时 stderr 提示**(上市较晚或数据起点较晚;多只同查只看整批最早的首行,逐只起点按 `securityCode` 核对)。⑤ 文档:股东结构类 EDE 指标(`shr_*`),大股东系列须传 `rank`、户均持股系列须传 `shareType`。
|
|
12
|
+
|
|
9
13
|
- **v0.46.0 — 2026-10-14**:① **`reference securities-search --category bond`**:按代码或简称搜债券,代码用于 `bond` 命令组。⚠️ **可转债可能出现在任何 `--category` 的结果里**(按简称查股票时常排第一),**只取返回行 `category` 等于所查类别的那一行**;债券代码传给 `fund` 命令会返回空结果、不报错。② **场外基金可按名称搜到**(`--category fund` 同时返回 `.OF` 与场内代码)。③ **计费单价按平台最新价目更新**:一页通等 AI 生成 10/次、业绩点评 / 观点 PK 20/次、热点话题 10/篇、个股看点 1/条、路演四件套 10/条、独立观点列表 1/条、纪要 / 外资研报 / 我的会议下载 30/篇、公告下载 A 股 1 / 港美股 2、`edb-data` 30/指标;额度保护随之调整。④ **数据范围**:`SKILL.md` 按官方权限表逐命令列出正式 / 试用两档,规划查询区间按表来。⑤ **报错口径**:EDE 漏传必填的 `fiscalYear` 报 `100001`;`main-business` / `valuation-analysis` 的 `--field` 写错名字报 `100005`;`screener` 计费按筛选前范围保守估算。完整列表见 CHANGELOG。
|
|
10
14
|
|
|
11
15
|
- **v0.45.0 — 2026-10-07**:① **`vault drive-copy` 可复制整个文件夹**:`--folder-id` + `--target-parent-id`,连同子文件夹与文件复制到另一空间,返回 `{folderId, newFolderId}`;复制文件的写法不变,两组参数二选一。② **下载文件名**:响应同时给出 UTF-8 文件名与普通文件名时用 UTF-8 的那个。③ `GANGTISE_BASE_URL` 指向非本机地址却用 `http://` 时 stderr 提示一次(凭证会明文传输)。④ 文档:`bond daily-quote` / `bond valuation` 的数据可能比账号窗口短,**按年份取长序列时核对首行日期**;`bond announcement` 按日期查询时有代码的行都带后缀;基金只知道名称时怎么换代码;分钟 K 的可查历史是滚动的短窗口。
|
|
12
16
|
|
|
13
17
|
- **v0.44.0 — 2026-09-30**:**新增 `fund` 公募基金 18 个命令,一律 0.4 积分/次**(按次,与返回行数、基金只数无关):`basic-info` / `nav`(日频净值)/ `fee-rate` / `manager-info`(按姓名精确匹配,同名全返回)/ `manager-history` / `asset-size` / `holder-structure` / `top10-holders` / `asset-allocation` / `stock-portfolio` / `industry-allocation` / `bond-portfolio` / `bond-type-allocation` / `fund-portfolio` / `fund-type-allocation` / `etf-pcf-header` / `etf-pcf-components` / `etf-share-change`。`--security` 用带大写后缀的基金代码(场外 `.OF`,场内 `.SH` / `.SZ`),**代码不存在、不带后缀或后缀小写都返回空结果、不报错**。不分页:单次上限 10000 行,超出整批报 `100006`;日期两端都不传取账号可回溯窗口内的全部,起点早于窗口整批报 `110003`。**整族超时 / 5xx 不自动重发**(避免重复扣费)。取数前注意:各命令单位不同(元 / 万元 / 万份 / 万股);`holder-structure` 的 `holderCount` 是带千分位的字符串;持仓明细只返回证券简称、不返回代码;`fund-type-allocation` 季报期只含重仓基金。逐条见 `gangtise-openapi/references/commands/fund.md`。**另有几处行为变化**:只收一个值的参数重复传直接报错;代码类列表也按顿号 / 分号 / 空格分隔并去重;显式 `--size` 与 `fundamental earning-forecast` 的日期区间估算超过 1000 积分同样要 `--yes`;jsonl / csv 文件一律以换行结尾,csv 不再给 `-3.5%` 这类值加 `'`;全市场分片早于账号窗口的部分跳过而不中止;接口返回下载链接时不带 `--output` 也会下载;A 股公告与 `ai knowledge-batch` 只写日期的 `--end-time` 按当日 23:59:59 换算;`--indicator-param` 里的日期值与 `--date` 同样校验;单次请求另有总时长上限(`GANGTISE_TIMEOUT_MS` 的 2 倍,下载与上传 60 倍);环境变量设成空字符串按未设置处理。完整列表见 CHANGELOG。
|
|
14
18
|
|
|
15
|
-
- **v0.43.1 — 2026-09-27**:① **EDE `fiscalYear` 漏传不报错**:预测类(`frcst_*`)与分红类(`div_cash_yr` 等)漏传时按服务端自定的默认年度取数,数看着正常但未必是你要的年度——**一律显式传 `fiscalYear`**;其余必填参数缺失仍报 `100001`。② **翻页去重**:同一 ID 的任一已出现版本再次出现都按重复去掉(计入 `duplicateRows`),不区分字段顺序。③ **观点 `detail`**:某一批夹有空元素或格式异常的元素时,这一批已返回的正文照常输出;空元素的 ID 列在 `missingIds`,其余没取到的列在 `unfetchedIds`(`unfetchedError` 带 traceId)。④ 文档:`finc_roe_avg_avg` 示例补 `reportDate`;债券三个评级命令的计费说明统一。
|
|
16
|
-
|
|
17
|
-
- **v0.43.0 — 2026-09-26**:① **按条计费列表的额度保护**:省略 `--size` 时先拿到 `total` 估算全量积分(整页超过 50 积分的列表只先取 1 条),超过 1000 积分报错退出 1,加 `--yes` 或传 `--size N` 放行。② **翻页结果的完整性**:跨页重复的行去掉并标 `duplicateRows`;同一 ID 在后面的页内容变了,两版都保留并标 `changedRows`;`total` 正好等于偏移窗口时标 `totalCapped`;都退出 3。热点话题、纪要、A 股 / 港股公告、财报日历查不到内容时按空结果、退出 0(此前退出 3)。③ **`quote` 的 `--field` 在多只证券或全市场时自动补身份列**(日 K 补 `securityCode` / `tradeDate`、分钟 K 补 `securityCode` / `tradeTime`、`realtime` 补 `securityCode`;单只不补),**多只证券只点一列的脚本输出会多出这些列**。④ **多证券日 K 合批**:按行数上限装入尽量多的证券,请求数大幅减少;全市场分片按工作日计(港股 2 个工作日一片),全市场关键字须同时给起止日期。⑤ **首行晚到提示**:行情首行比请求起点晚 14 天以上时 stderr 提示(上市较晚或越过回溯窗口)。⑥ **`ai stock-summary` 与 `fundamental earning-forecast` 超时 / 5xx 不再自动重试**(单次可能扣数千积分)。⑦ 四个枚举参数写错时本地报错;Ctrl-C / `kill` / 终端断开时清理暂存文件,进程以该信号结束(`$?` 为 130 / 143 / 129),脚本循环随之停下。⑧ Agent Skill 主文件精简,细节移到 `references/`。
|
|
18
|
-
|
|
19
19
|
### 历史里程碑
|
|
20
20
|
|
|
21
|
+
- **v0.43.0**:按条计费列表的额度保护(省略 `--size` 时估算超过 1000 积分须 `--yes`);翻页结果的跨页重复、版本变化与 `total` 封顶检测。
|
|
21
22
|
- **v0.42.0**:数值参数只收十进制写法(`0x10` / `1e3` 这类写法发请求前报错);接管道时保留退出码 `3` / `4`。
|
|
22
23
|
- **v0.41.0**:新增债券 12 个命令与云盘管理 9 个命令;观点列表改走 v2(列表只含摘要 1 积分/条,正文按 ID 另取);新增会议线索与联网搜索。
|
|
23
24
|
- **v0.40.0**:自选股股票池可增删改(首批写操作,删池须显式 `--yes`);`indicator time-series` 自动判定日期轴;Token 缓存绑定签发它的凭证。
|
|
@@ -102,9 +103,9 @@ gangtise-openapi/
|
|
|
102
103
|
├── SKILL.md # 主 skill 文件(必备规则、速查表、按需引用 references)
|
|
103
104
|
└── references/
|
|
104
105
|
├── commands/ # 按命令组拆分的详细参数文档(agent 按需 Read)
|
|
105
|
-
│ ├── ai.md # AI 能力(知识库 / 个股线索与看点 / 一页通等生成类 / 业绩点评与观点 PK 异步任务 / 热点 /
|
|
106
|
+
│ ├── ai.md # AI 能力(知识库 / 个股线索与看点 / 一页通等生成类 / 业绩点评与观点 PK 异步任务 / 热点 / 管理层讨论 / 管理层情绪)
|
|
106
107
|
│ ├── alternative.md # 行业指标数据库 EDB(search / data)+ 题材指数画像与成分股
|
|
107
|
-
│ ├── bond.md # 债券(基本资料 / 发行人 / 行情与估值 / 兑付 / 公告 / 发行 / 评级 /
|
|
108
|
+
│ ├── bond.md # 债券(基本资料 / 发行人 / 行情与估值 / 兑付 / 公告 / 发行 / 评级 / 行权 / 违约)
|
|
108
109
|
│ ├── fund.md # 公募基金(基本信息 / 净值 / 费率 / 经理 / 规模与持有人 / 资产配置 / 持仓与分布 / ETF 申赎与份额)
|
|
109
110
|
│ ├── fundamental.md # 财务数据(A股/港股/美股三大报表 / 主营 / 估值 / 盈利预测 / 股东)
|
|
110
111
|
│ ├── indicator.md # 证券级数据指标 EDE(search / 截面 / 时序 / 条件选股)
|
|
@@ -149,7 +150,7 @@ install_skill ~/.hermes/skills # Hermes
|
|
|
149
150
|
|------|--------|------|
|
|
150
151
|
| **Auth** | `login` / `status` | 认证登录、状态查询 |
|
|
151
152
|
| **Lookup** | `broker-org list` / `meeting-org list` | 券商/会议机构本地全量枚举表(按名称找 ID 优先 `reference institution-search`;行业/区域/公告分类/题材/申万码用 Reference 接口查) |
|
|
152
|
-
| **Insight** | `opinion list` / `detail` | 内资机构观点(列表只含摘要 1 积分/条;`detail` 按 ID 取正文 30 积分/条;`list --with-content` 列表直接带正文 30
|
|
153
|
+
| **Insight** | `opinion list` / `detail` | 内资机构观点(列表只含摘要 1 积分/条;`detail` 按 ID 取正文 30 积分/条;`list --with-content` 列表直接带正文 30 积分/条;可按 `--category` 观点类别 / `--llm-tag` 投研标签 / `--broker-tag` 机构标签筛) |
|
|
153
154
|
| | `summary list` / `download` | 纪要(含下载,支持 `--file-type` 选原始/HTML) |
|
|
154
155
|
| | `pamirs-summary list` / `download` | 帕米尔专家纪要(需单独购买专家纪要库;筛选项比 `summary` 少,无 `--source`/`--institution`/`--participant-role`) |
|
|
155
156
|
| | `roadshow list` | 路演 |
|
|
@@ -203,6 +204,7 @@ install_skill ~/.hermes/skills # Hermes
|
|
|
203
204
|
| | `issuer-rating-change` | 发债主体评级变动历史(`--security` 或 `--issuer` 二选一) |
|
|
204
205
|
| | `issuance-plan` | 利率债发行计划(按发行日期区间) |
|
|
205
206
|
| | `exercise-notice` | 含权债行权提示(行权安排与行权结果) |
|
|
207
|
+
| | `default-list` | 违约债券(按违约日期区间 / 债券代码 / 单个发行人三选一) |
|
|
206
208
|
| **Fund** | `basic-info` | 公募基金基本信息(分类、管理人与托管人、成立与存续、申赎规则、业绩基准、风险等级、跟踪指数) |
|
|
207
209
|
| | `nav` | 基金日频净值(单位 / 累计 / 复权净值、复权因子;货币基金七日年化与万份收益) |
|
|
208
210
|
| | `fee-rate` | 基金费率(申购 / 赎回 / 管理 / 托管 / 销售服务,按条件分档) |
|
|
@@ -226,6 +228,8 @@ install_skill ~/.hermes/skills # Hermes
|
|
|
226
228
|
| | `research-outline` | 研究提纲 |
|
|
227
229
|
| | `management-discuss-announcement` | 管理层讨论-财报 |
|
|
228
230
|
| | `management-discuss-earnings-call` | 管理层讨论-业绩会 |
|
|
231
|
+
| | `management-sentiment-indicator` / `management-sentiment-conclusion` | 管理层情绪指标 / 结论(每场业绩会一条;5 积分/条) |
|
|
232
|
+
| | `management-sentiment-detail` | 管理层情绪明细(一场会议的逐条问答评分与依据;10 积分/次) |
|
|
229
233
|
| | `viewpoint-debate` / `viewpoint-debate-check` | 观点PK(异步) |
|
|
230
234
|
| **Vault** | `drive-list` / `drive-download` | 云盘文件列表与下载 |
|
|
231
235
|
| | `drive-folder-list` | 云盘目录浏览(某文件夹下的直接子文件夹与文件) |
|
|
@@ -305,7 +309,7 @@ gangtise ai knowledge-batch --query 比亚迪 --query 最近热门概念
|
|
|
305
309
|
- **流式下载**:二进制响应(PDF 等)直接 `pipeline` 到磁盘,不经过内存缓冲;不带 `--output` 时先写入临时文件,定好文件名后再改名。50MB PDF 内存占用近乎为零。
|
|
306
310
|
- **流式输出**:`--format jsonl` 或 `csv` 加 `--output <file>` 时,翻页 / 全市场分片 / 多证券分批请求的行**按到达顺序逐批写盘**,取数阶段不持有整份结果,内存不随行数增长;csv 先落临时行文件、收尾时按列并集写表头再转成 csv(磁盘两遍、内存不变)。jsonl / csv 无论写文件还是输出到终端都按批写出,每行以换行结尾。任一只 / 页 / 片失败,命令退出时后台已无取数与写盘,不留 `.part`。
|
|
307
311
|
- **导出元信息**:`csv` / `jsonl` 落盘时旁边生成 `<文件>.meta.json`——命令行、数据行数、列名、`complete`(写元信息时的判定:退出 3 即 `false`)、`total` / `partial` / `failedPages` / `failedShards` / `truncatedShards` / `droppedColumns` / `missingFields` / `duplicateRows` / `changedRows` / `totalCapped` 等全部完整性标记(以及不影响完整性判定的 `outOfWindowShards`)、抓取时间与时区、CLI 版本,以及数据文件的字节数 `bytes` 与内容哈希 `sha256`。命令行与结果里的 key / secret / token 类字段写成 `[redacted]`。元信息在数据文件发布之后才就位,导出失败不会留下新数据配旧元信息。**转交或归档前建议核一次**:`shasum -a 256 <文件>` 与元信息里的 `sha256` 相等,才说明这份元信息描述的就是旁边这份数据——两个进程同时导出到**同一个 `--output`** 时,最终文件一定是其中某一次的完整产物,但旁边的元信息有可能来自另一次,核哈希就能发现。**输的那一次自己也会报**:收尾时核对 `--output` 是否仍是本次写出的文件(仍是同一个文件就不必回读,否则回读比对哈希),不符就在 stderr 说明「这个文件不是本次命令的产物」并**退出码 4**。这两种格式的文件本身只有数据行,转交之后靠它核验是否完整;`json` 自带标记,不生成。
|
|
308
|
-
- **自动重试**:5xx / 429 / `ECONNREFUSED` / `ECONNRESET` / `ETIMEDOUT` / `ENOTFOUND` / `EAI_AGAIN` / `UND_ERR_*`(undici 连接/超时类)/ `999999` 系统错误自动指数退避重试 2 次。**不重放的端点例外**(贵档:one-pager 等生成/提交类 + `tool file-parse` 提交 + 30/篇 的 summary / foreign-report / my-conference 下载 + 单价未公布但保守同档的 pamirs-summary 下载 + 题材 `concept-info` / `concept-securities`(含 `--full
|
|
312
|
+
- **自动重试**:5xx / 429 / `ECONNREFUSED` / `ECONNRESET` / `ETIMEDOUT` / `ENOTFOUND` / `EAI_AGAIN` / `UND_ERR_*`(undici 连接/超时类)/ `999999` 系统错误自动指数退避重试 2 次。**不重放的端点例外**(贵档:one-pager 等生成/提交类 + `tool file-parse` 提交 + 30/篇 的 summary / foreign-report / my-conference 下载 + 单价未公布但保守同档的 pamirs-summary 下载 + 题材 `concept-info` / `concept-securities`(含 `--full`)+ `ai management-sentiment-detail`;`bond` 全部 13 个命令(多数按次,三个评级命令按条 / 按债券 / 按发行人)、`fund` 全部 18 个命令(按次)与按次计费的 `tool web-search`;按条计费的 `insight highlight list`、观点 `detail` 与 `list --with-content`,以及单次最多 6000 只、按只计费的 `ai stock-summary` 与行数随日期区间增长的 `fundamental earning-forecast`;另加不计分但不可重复执行的 `vault stock-pool-create` 与云盘的上传 / 新建文件夹 / 复制 / 两个删除,共 66 个):5xx/超时不重放,仅连接失败、429 与 token 自愈重试。**两类端点各有各的理由**:贵档是**重放会重复扣分**——服务端可能已经执行并计费,重发按次计费的再扣一次,重发按篇/按条计费的会把已交付的行再计一次;不计分的那几个是**重放会造成副作用或把成功报成失败**——股票池名不允许重复,重发一个其实已经建成的请求,回来的是 `230006 股票池名称重复`;云盘允许同名,重发上传 / 新建 / 复制会多出一份;重发一个其实已经删掉的删除,回来的是「文件不存在」或 `130002`。**`indicator`(EDE)端点对 `999999` 不重试**——重放一次已计费的查询没有意义(EDE 无数据不用此码,而是保留行列的占位单元格 `null`;代码或参数名写错报 `100003`、缺必填参数报 `100001`)。**终态码 `999011`(凭证无效)/ `140002`(终态失败:异步生成失败、参数错误或业务处理失败)在任何 HTTP 状态下都不重试**——凭证错不会因重试而变,`140002` 立即重发得到的还是同一结果。
|
|
309
313
|
|
|
310
314
|
<!-- no-replay-endpoints
|
|
311
315
|
上面那句点名的「不重放」端点,完整清单如下(endpoint key,与 `gangtise raw list` 一致):
|
|
@@ -315,6 +319,7 @@ ai.investment-logic
|
|
|
315
319
|
ai.knowledge-batch
|
|
316
320
|
ai.management-discuss-announcement
|
|
317
321
|
ai.management-discuss-earnings-call
|
|
322
|
+
ai.management-sentiment-detail
|
|
318
323
|
ai.one-pager
|
|
319
324
|
ai.peer-comparison
|
|
320
325
|
ai.research-outline
|
|
@@ -329,6 +334,7 @@ bond.announcement
|
|
|
329
334
|
bond.basic-info
|
|
330
335
|
bond.cash-flow
|
|
331
336
|
bond.daily-quote
|
|
337
|
+
bond.default-list
|
|
332
338
|
bond.exercise-notice
|
|
333
339
|
bond.issuance-detail
|
|
334
340
|
bond.issuance-plan
|
|
@@ -409,10 +415,12 @@ vault.stock-pool.create
|
|
|
409
415
|
- `vault wechat-message-list`
|
|
410
416
|
- `vault wechat-chatroom-list`
|
|
411
417
|
- `ai hot-topic`
|
|
418
|
+
- `ai management-sentiment-indicator`
|
|
419
|
+
- `ai management-sentiment-conclusion`
|
|
412
420
|
|
|
413
421
|
规则:
|
|
414
422
|
- **省略 `--size` 一律拉全量**(无论是否传时间范围),CLI 自动翻页查完
|
|
415
|
-
- **按条计费的列表有额度保护**:省略 `--size` 时,CLI 先拿到 `total`,按 `total × 单价` 估算全量要花的积分,超过 1000 积分就报错、退出码 1,不再往下拉,报错写明估算值。整页不超过 50 积分的列表用第一页拿 `total`;整页更贵的(路演 / 调研 / 策略会 /
|
|
423
|
+
- **按条计费的列表有额度保护**:省略 `--size` 时,CLI 先拿到 `total`,按 `total × 单价` 估算全量要花的积分,超过 1000 积分就报错、退出码 1,不再往下拉,报错写明估算值。整页不超过 50 积分的列表用第一页拿 `total`;整页更贵的(路演 / 调研 / 策略会 / 论坛、会议线索、个股线索、热点话题、管理层情绪指标 / 结论、`--with-content`)先只取 1 条:结果最多 1 条时它就是全部结果;否则放行后从头翻页,这 1 条会多计一次费(知道要多少条就直接传 `--size N`,不走这一步)。确认要全量就加 `--yes`,只要一部分就传 `--size N`——显式 `--size` 按 `min(--size, total) × 单价` 估算仍超过 1000 积分时同样报错(`--size 100000` 不能当「全量」绕过),要 `--yes`。`fundamental earning-forecast` 不分页,按日期区间估算(工作日数 × 3 条 × 0.5),同一条线。免费列表不受影响
|
|
416
424
|
- 数据量未知时,可先 `--size 1` 从 stderr 的 `Total: N` 探明量级,再决定是否全量
|
|
417
425
|
- 如果显式传了 `--size`,则按指定值翻页,直到达到 `size` 或数据取完
|
|
418
426
|
- `--from` 必须是非负整数,`--size` 必须是正整数;非法数字会在本地直接报 `ValidationError`,不会继续请求 API
|
|
@@ -468,6 +476,8 @@ gangtise insight opinion list --keyword AI --size 20
|
|
|
468
476
|
gangtise insight opinion detail --chief-opinion-id 4047400241800281391 --chief-opinion-id 2581139
|
|
469
477
|
# 想让列表直接带正文(30 积分/条);注意内资旧版结构:标题与正文在 contentList.title / contentList.content
|
|
470
478
|
gangtise insight opinion list --keyword AI --size 20 --with-content
|
|
479
|
+
# 按观点类别 / 投研业务标签 / 机构标签筛(同一选项传多个值取并集;--with-content 不支持 --category / --broker-tag)
|
|
480
|
+
gangtise insight opinion list --category earningsReview --llm-tag beatExpect --broker-tag topBroker --size 20
|
|
471
481
|
gangtise insight summary list --keyword 算力
|
|
472
482
|
|
|
473
483
|
# 帕米尔专家纪要(需单独购买专家纪要库;全文搜索 + 时间倒序)
|
|
@@ -687,6 +697,10 @@ gangtise bond issuance-plan --start-date 2026-09-01 --end-date 2026-09-30
|
|
|
687
697
|
# 公告:按债券码 或 按公告日期区间,二选一(同传报 100003)
|
|
688
698
|
gangtise bond announcement --security 019742.SH --page-size 50
|
|
689
699
|
gangtise bond announcement --start-date 2026-09-18 --end-date 2026-09-19 --page-no 2 --page-size 50
|
|
700
|
+
|
|
701
|
+
# 违约债券:违约日期区间(不超过 1 年)/ --security / --issuer 三选一;--issuer 一次一个、用发行人全称
|
|
702
|
+
gangtise bond default-list --start-date 2026-09-01 --end-date 2026-10-20
|
|
703
|
+
gangtise bond default-list --issuer 上海世茂股份有限公司 --field securityName --field defaultAmount
|
|
690
704
|
```
|
|
691
705
|
|
|
692
706
|
> **`bond announcement` 需要手动翻页**:它是本系列唯一分页的接口,且响应**不返回 `total`**,因此不走 CLI 的自动翻页——`--page-no` 从 1 开始逐页递增,翻过末页返回空数组(退出码 0)即停;条件下一条都没有时第 1 页就返回 `130001`(退出码 1)。按日期区间查询时,部分行的 `securityCode` 为空(不对应已上市证券的公告等),这类行无法接着查其他债券命令。其余债券命令一次返回全部匹配行。
|
|
@@ -748,6 +762,11 @@ gangtise ai management-discuss-announcement --report-date 2025-12-31 --security-
|
|
|
748
762
|
gangtise ai management-discuss-announcement --report-date 2025-12-31 --security-code 000001.SZ --dimension all
|
|
749
763
|
# 管理层讨论-业绩会
|
|
750
764
|
gangtise ai management-discuss-earnings-call --report-date 2025-06-30 --security-code 000001.SZ --dimension financialPerformance
|
|
765
|
+
# 管理层情绪:指标与结论按条计费(5 积分/条),记得带 --size;返回的 publishTime 比北京时间早 8 小时
|
|
766
|
+
gangtise ai management-sentiment-indicator --security 300285.SZ --size 5
|
|
767
|
+
gangtise ai management-sentiment-conclusion --security 300285.SZ --start-time 2026-08-01 --end-time 2026-08-31 --size 5
|
|
768
|
+
# 逐条问答的评分与依据:--source-id 取上面返回的 source.sourceId(10 积分/次)
|
|
769
|
+
gangtise ai management-sentiment-detail --source-id 554030
|
|
751
770
|
# 观点PK(异步,返回 dataId)
|
|
752
771
|
gangtise ai viewpoint-debate --viewpoint "飞天茅台的批价低点是1500元"
|
|
753
772
|
# 等待生成完成后查询结果
|
package/dist/src/commands/ai.js
CHANGED
|
@@ -6,7 +6,7 @@ import { ValidationError } from "../core/errors.js";
|
|
|
6
6
|
import { markFailed } from "../core/exitStatus.js";
|
|
7
7
|
import { parseOutputFormat } from "../core/output.js";
|
|
8
8
|
import { printData } from "../core/printer.js";
|
|
9
|
-
import { emit, withClient, runDownload, multiChoice, field, required, date, list, choiceList, flag, format, output, from, size, requestBody, query } from "./shared.js";
|
|
9
|
+
import { emit, withClient, runDownload, multiChoice, field, required, date, list, choiceList, flag, format, output, from, size, startTime, endTime, requestBody, query } from "./shared.js";
|
|
10
10
|
import { checkMarketKeywords } from "./quote.js";
|
|
11
11
|
export const ai = new Command("ai").description("AI APIs");
|
|
12
12
|
function addGenerationTask(name, spec) {
|
|
@@ -123,6 +123,30 @@ query(ai, "management-discuss-earnings-call", {
|
|
|
123
123
|
format("json"), output(),
|
|
124
124
|
],
|
|
125
125
|
});
|
|
126
|
+
for (const [name, endpoint, description] of [
|
|
127
|
+
["management-sentiment-indicator", "ai.management-sentiment-indicator", "Management sentiment scores per earnings call: responsiveness / polarity / conviction (0-5), overall and by question type (5 credits/row)"],
|
|
128
|
+
["management-sentiment-conclusion", "ai.management-sentiment-conclusion", "Management sentiment conclusions per earnings call, with the changes against the previous call (5 credits/row)"],
|
|
129
|
+
]) {
|
|
130
|
+
query(ai, name, {
|
|
131
|
+
description,
|
|
132
|
+
endpoint,
|
|
133
|
+
fields: [
|
|
134
|
+
from(), size("Total rows to return; omit to fetch all (max page 100). Billed per row — bound this on wide ranges"),
|
|
135
|
+
startTime("Publish time from (yyyy-MM-dd or yyyy-MM-dd HH:mm:ss)"), endTime("Publish time to (yyyy-MM-dd or yyyy-MM-dd HH:mm:ss; a bare date covers the whole day)"),
|
|
136
|
+
list("--security <code>", "Security code, e.g. 300285.SZ (repeatable); omit for all. One invalid code rejects the whole call (120001)", "securityList"),
|
|
137
|
+
format("json"), output(),
|
|
138
|
+
],
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
query(ai, "management-sentiment-detail", {
|
|
142
|
+
description: "Per-Q&A sentiment scores and the quotes behind them, for one earnings call (10 credits/call)",
|
|
143
|
+
endpoint: "ai.management-sentiment-detail",
|
|
144
|
+
fields: [
|
|
145
|
+
required("--source-id <id>", "source.sourceId from management-sentiment-indicator / -conclusion", "sourceId"),
|
|
146
|
+
field(new Option("--source-type <type>", "source.sourceType from the same row").default("conference"), (v) => ({ sourceType: v })),
|
|
147
|
+
format("json"), output(),
|
|
148
|
+
],
|
|
149
|
+
});
|
|
126
150
|
addGenerationTask("viewpoint-debate", {
|
|
127
151
|
submit: "ai.viewpoint-debate.get-id",
|
|
128
152
|
content: "ai.viewpoint-debate.get-content",
|
|
@@ -2,7 +2,8 @@ import { Command, Option } from "commander";
|
|
|
2
2
|
import { collectList, collectNames, dateArg, maybeArray, parseNumberOption } from "../core/args.js";
|
|
3
3
|
import { maxUnitsOf } from "../core/endpoints.js";
|
|
4
4
|
import { ValidationError } from "../core/errors.js";
|
|
5
|
-
import { emit } from "./shared.js";
|
|
5
|
+
import { emit, noteLateStart } from "./shared.js";
|
|
6
|
+
const BOND_LATE_CAUSE = "The bond may have listed later, or this data starts later than the requested range — the endpoint returns from its first day of data without an error.";
|
|
6
7
|
export const bond = new Command("bond").description("Bond APIs: profiles, issuers, quotes, valuations, cash flows, ratings, announcements");
|
|
7
8
|
function requireBondCodes(codes, max) {
|
|
8
9
|
if (!codes.length)
|
|
@@ -31,12 +32,20 @@ addBondRange("exercise-notice", "bond.exercise-notice", "Put/call exercise sched
|
|
|
31
32
|
bondSecurityOption(bond.command("daily-quote").description("Daily close quotes (exchange + CFETS): dirty/clean price, YTM, duration, convexity"))
|
|
32
33
|
.requiredOption("--start-date <date>", "Trade date range start (yyyy-MM-dd)", dateArg("--start-date"))
|
|
33
34
|
.requiredOption("--end-date <date>", "Trade date range end (yyyy-MM-dd)", dateArg("--end-date"))
|
|
34
|
-
.action((options) => emit(options, (client) =>
|
|
35
|
+
.action((options) => emit(options, async (client) => {
|
|
36
|
+
const data = await client.call("bond.daily-quote", { securityList: requireBondCodes(options.security), startDate: options.startDate, endDate: options.endDate, fieldList: maybeArray(options.field) });
|
|
37
|
+
noteLateStart(data, options.startDate, "tradeDate", "bond daily-quote", BOND_LATE_CAUSE);
|
|
38
|
+
return data;
|
|
39
|
+
}));
|
|
35
40
|
bondSecurityOption(bond.command("valuation").description("Shanghai Clearing House valuations: price, yield, duration, convexity, PVBP"))
|
|
36
41
|
.requiredOption("--start-date <date>", "Valuation date range start (yyyy-MM-dd)", dateArg("--start-date"))
|
|
37
42
|
.requiredOption("--end-date <date>", "Valuation date range end (yyyy-MM-dd)", dateArg("--end-date"))
|
|
38
43
|
.addOption(new Option("--confidence-level <level>", "Valuation confidence; defaults to 推荐 server-side, which already filters out 不推荐").choices(["推荐", "不推荐"]))
|
|
39
|
-
.action((options) => emit(options, (client) =>
|
|
44
|
+
.action((options) => emit(options, async (client) => {
|
|
45
|
+
const data = await client.call("bond.valuation", { securityList: requireBondCodes(options.security), startDate: options.startDate, endDate: options.endDate, confidenceLevel: options.confidenceLevel, fieldList: maybeArray(options.field) });
|
|
46
|
+
noteLateStart(data, options.startDate, "tradeDate", "bond valuation", BOND_LATE_CAUSE);
|
|
47
|
+
return data;
|
|
48
|
+
}));
|
|
40
49
|
function issuerSelector(security, issuer) {
|
|
41
50
|
if (security.length && issuer.length)
|
|
42
51
|
throw new ValidationError("--security and --issuer are mutually exclusive: pass bond codes or issuer names, not both");
|
|
@@ -75,3 +84,23 @@ bondSecurityOption(bond.command("announcement").description("Bond announcements,
|
|
|
75
84
|
fieldList: maybeArray(options.field),
|
|
76
85
|
});
|
|
77
86
|
}));
|
|
87
|
+
bond.command("default-list").description("Defaulted bonds: by default-date range (at most 1 year), by bond codes, or by one issuer — pick one")
|
|
88
|
+
.option("--start-date <date>", "Default date range start (yyyy-MM-dd); needs --end-date", dateArg("--start-date"))
|
|
89
|
+
.option("--end-date <date>", "Default date range end (yyyy-MM-dd), at most one year after --start-date", dateArg("--end-date"))
|
|
90
|
+
.option("--security <code>", "Bond code, e.g. 169687.SH / 220205.IB (repeatable, no per-call limit)", collectList, [])
|
|
91
|
+
.option("--issuer <name>", "One issuer, by full name. A short name is matched to a single closest issuer, which may not be the one meant — check issuerName in the result", collectNames, [])
|
|
92
|
+
.option("--field <field>", "Field to return (repeatable); omit for all. An unsupported name rejects the whole call with 100005", collectList, [])
|
|
93
|
+
.option("--format <format>", "Output format", "table").option("--output <path>")
|
|
94
|
+
.action((options) => {
|
|
95
|
+
const byDate = Boolean(options.startDate || options.endDate);
|
|
96
|
+
const modes = [byDate, options.security.length > 0, options.issuer.length > 0].filter(Boolean).length;
|
|
97
|
+
if (modes > 1)
|
|
98
|
+
throw new ValidationError("bond default-list: --start-date/--end-date, --security and --issuer are mutually exclusive — pick one");
|
|
99
|
+
if (modes === 0)
|
|
100
|
+
throw new ValidationError("bond default-list: pass --start-date with --end-date (default date range), --security (bond codes) or --issuer (one issuer)");
|
|
101
|
+
if (byDate && !(options.startDate && options.endDate))
|
|
102
|
+
throw new ValidationError("bond default-list: --start-date and --end-date go together");
|
|
103
|
+
if (options.issuer.length > 1)
|
|
104
|
+
throw new ValidationError(`bond default-list: ${options.issuer.length} issuers given — the endpoint takes one per call. Run one call per issuer.`);
|
|
105
|
+
return emit(options, (client) => client.call("bond.default-list", { startDate: options.startDate, endDate: options.endDate, securityList: maybeArray(options.security), issuerNameList: maybeArray(options.issuer), fieldList: maybeArray(options.field) }));
|
|
106
|
+
});
|
|
@@ -25,7 +25,14 @@ const officialAccount = new Command("official-account");
|
|
|
25
25
|
const qa = new Command("qa");
|
|
26
26
|
const reportImage = new Command("report-image");
|
|
27
27
|
query(opinion, "list", {
|
|
28
|
-
endpoint: (options) =>
|
|
28
|
+
endpoint: (options) => {
|
|
29
|
+
if (!options.withContent)
|
|
30
|
+
return "insight.opinion.list";
|
|
31
|
+
if (options.category.length || options.brokerTag.length) {
|
|
32
|
+
throw new ValidationError("--category / --broker-tag do not work with --with-content: its v1 list ignores them and would return unfiltered rows at 30 credits/row. Filter with 'opinion list', then fetch bodies with 'opinion detail'");
|
|
33
|
+
}
|
|
34
|
+
return "insight.opinion.list-with-content";
|
|
35
|
+
},
|
|
29
36
|
fields: [
|
|
30
37
|
rankType(),
|
|
31
38
|
list("--research-area <id>", RESEARCH_AREA_CITIC_OR_DIRECTION, "researchAreaList"),
|
|
@@ -34,9 +41,11 @@ query(opinion, "list", {
|
|
|
34
41
|
list("--broker <id>", "Broker ID", "brokerList"),
|
|
35
42
|
list("--industry <id>", "Industry ID", "industryList"),
|
|
36
43
|
list("--concept <id>", "Concept ID", "conceptList"),
|
|
37
|
-
list("--
|
|
44
|
+
list("--category <name>", "Opinion category: earningsReview/abnormalReview/researchUpdate/tradingDesk/industryAnalysis", "categoryList"),
|
|
45
|
+
list("--llm-tag <tag>", "Research tag, several = any of them. Recommendation: strongRcmd/undervalued/highElasticity/highDividend/reversal/bottom/beatExpect/expectGap/oversold/targetPrice/certainty; earnings: highGrowth/withProfitForecast/withGuidance/marginalImprovement; supply chain: priceHike/tightSupplyDemand/capacityRelease/newOrder/orderSurge/keyCustomer/soleSupplier/coreSupplier/industryEntry; moat: leader/moat/scarcity/breakthrough", "llmTagList"),
|
|
46
|
+
list("--broker-tag <tag>", "Broker tag: topBroker/newFortune", "brokerTagList"),
|
|
38
47
|
list("--source <source>", "Source", "sourceList"),
|
|
39
|
-
flag("--with-content", "Return the full body inline (v1 list, 30 credits/row) instead of the 200-char brief (1 credit/row). v1 shape: title and body sit under contentList.title / contentList.content, and there is no brief"),
|
|
48
|
+
flag("--with-content", "Return the full body inline (v1 list, 30 credits/row) instead of the 200-char brief (1 credit/row). v1 shape: title and body sit under contentList.title / contentList.content, and there is no brief. Takes no --category / --broker-tag, and --llm-tag only strongRcmd/earningsReview/topBroker/newFortune"),
|
|
40
49
|
format(), output("Output path"),
|
|
41
50
|
...timeFilters(),
|
|
42
51
|
],
|
|
@@ -72,7 +72,7 @@ export function earliestRowDate(data, field) {
|
|
|
72
72
|
}
|
|
73
73
|
return earliest;
|
|
74
74
|
}
|
|
75
|
-
export function noteLateStart(data, requestedStart, field, label) {
|
|
75
|
+
export function noteLateStart(data, requestedStart, field, label, cause = "The security may have listed or resumed trading later, or the range reaches past your account's history window for this data — the endpoint returns what lies inside the window without an error.") {
|
|
76
76
|
const failedShards = data?.failedShards;
|
|
77
77
|
if (Array.isArray(failedShards) && failedShards.length > 0)
|
|
78
78
|
return;
|
|
@@ -85,7 +85,7 @@ export function noteLateStart(data, requestedStart, field, label) {
|
|
|
85
85
|
const lateDays = (Date.parse(`${first}T00:00:00Z`) - Date.parse(`${start}T00:00:00Z`)) / 86_400_000;
|
|
86
86
|
if (lateDays <= LATE_START_DAYS)
|
|
87
87
|
return;
|
|
88
|
-
process.stderr.write(`[gangtise] note: ${label} starts at ${first}, ${lateDays} days after the requested start ${start}.
|
|
88
|
+
process.stderr.write(`[gangtise] note: ${label} starts at ${first}, ${lateDays} days after the requested start ${start}. ${cause}\n`);
|
|
89
89
|
}
|
|
90
90
|
export async function runDownload(client, endpointKey, query, options) {
|
|
91
91
|
if (options.output) {
|
package/dist/src/core/client.js
CHANGED
|
@@ -272,7 +272,9 @@ export class GangtiseClient {
|
|
|
272
272
|
sink.setFieldList(firstPage.fieldList);
|
|
273
273
|
const collected = [];
|
|
274
274
|
let count = 0;
|
|
275
|
-
const
|
|
275
|
+
const rowIdFields = endpoint.rowId === undefined ? [] : [endpoint.rowId].flat();
|
|
276
|
+
const rowId = rowIdFields.length > 0 ? rowIdFields.join(" + ") : undefined;
|
|
277
|
+
const rowIdPaths = rowIdFields.map((path) => path.split("."));
|
|
276
278
|
const seen = rowId ? new Map() : undefined;
|
|
277
279
|
let duplicateRows = 0;
|
|
278
280
|
let changedRows = 0;
|
|
@@ -282,11 +284,11 @@ export class GangtiseClient {
|
|
|
282
284
|
return rows;
|
|
283
285
|
const onThisPage = new Map();
|
|
284
286
|
return rows.filter((row) => {
|
|
285
|
-
const
|
|
286
|
-
if (id === undefined || id === null)
|
|
287
|
+
const ids = rowIdPaths.map((path) => path.reduce((v, k) => v && typeof v === "object" ? v[k] : undefined, row));
|
|
288
|
+
if (ids.some((id) => id === undefined || id === null))
|
|
287
289
|
return true;
|
|
288
290
|
const digest = createHash("sha1").update(stableStringify(row)).digest("base64");
|
|
289
|
-
const key = String(
|
|
291
|
+
const key = ids.length === 1 ? String(ids[0]) : JSON.stringify(ids.map(String));
|
|
290
292
|
const pageVersions = onThisPage.get(key);
|
|
291
293
|
if (pageVersions && !pageVersions.has(digest))
|
|
292
294
|
idIsRowKey = false;
|
|
@@ -645,6 +645,15 @@ const ENDPOINT_DEFS = {
|
|
|
645
645
|
retry: "no-replay",
|
|
646
646
|
expects: "list",
|
|
647
647
|
},
|
|
648
|
+
"bond.default-list": {
|
|
649
|
+
method: "POST",
|
|
650
|
+
path: "/application/open-fundamental/bond/default-list",
|
|
651
|
+
kind: "json",
|
|
652
|
+
description: "Query bond default records (by default-date range, bond codes or one issuer)",
|
|
653
|
+
billing: { per: "call", price: 0.4 },
|
|
654
|
+
retry: "no-replay",
|
|
655
|
+
expects: "list",
|
|
656
|
+
},
|
|
648
657
|
"fund.basic-info": {
|
|
649
658
|
method: "POST",
|
|
650
659
|
path: "/application/open-fundamental/fund/basic-info",
|
|
@@ -924,6 +933,37 @@ const ENDPOINT_DEFS = {
|
|
|
924
933
|
timeoutMs: 120_000,
|
|
925
934
|
retry: "no-replay",
|
|
926
935
|
},
|
|
936
|
+
"ai.management-sentiment-indicator": {
|
|
937
|
+
method: "POST",
|
|
938
|
+
path: "/application/open-ai/management-sentiment/company/indicator",
|
|
939
|
+
kind: "json",
|
|
940
|
+
description: "Management sentiment scores per earnings call (responsiveness / polarity / conviction)",
|
|
941
|
+
billing: { per: "row", price: 5 },
|
|
942
|
+
pagination: { enabled: true, maxPageSize: 100 },
|
|
943
|
+
rowId: ["securityCode", "source.sourceType", "source.sourceId"],
|
|
944
|
+
rowIdUnverified: true,
|
|
945
|
+
expects: "list",
|
|
946
|
+
},
|
|
947
|
+
"ai.management-sentiment-conclusion": {
|
|
948
|
+
method: "POST",
|
|
949
|
+
path: "/application/open-ai/management-sentiment/company/conclusion",
|
|
950
|
+
kind: "json",
|
|
951
|
+
description: "Management sentiment conclusions per earnings call, with changes against the previous call",
|
|
952
|
+
billing: { per: "row", price: 5 },
|
|
953
|
+
pagination: { enabled: true, maxPageSize: 100 },
|
|
954
|
+
rowId: ["securityCode", "source.sourceType", "source.sourceId"],
|
|
955
|
+
rowIdUnverified: true,
|
|
956
|
+
expects: "list",
|
|
957
|
+
},
|
|
958
|
+
"ai.management-sentiment-detail": {
|
|
959
|
+
method: "POST",
|
|
960
|
+
path: "/application/open-ai/management-sentiment/company/detail",
|
|
961
|
+
kind: "json",
|
|
962
|
+
description: "Per-Q&A management sentiment scores and their supporting quotes, for one earnings call",
|
|
963
|
+
billing: { per: "call", price: 10 },
|
|
964
|
+
retry: "no-replay",
|
|
965
|
+
expects: "list",
|
|
966
|
+
},
|
|
927
967
|
"ai.viewpoint-debate.get-id": {
|
|
928
968
|
method: "POST",
|
|
929
969
|
path: "/application/open-ai/agent/viewpoint-debate-getid",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gangtise-openapi
|
|
3
|
-
version: "0.
|
|
3
|
+
version: "0.48.0"
|
|
4
4
|
description: |-
|
|
5
5
|
通过 gangtise CLI 直接调用 Gangtise OpenAPI,拉取投研原始数据、批量导出、下载文件、调用 AI 能力。
|
|
6
6
|
|
|
7
7
|
**触发词**:Gangtise / 冈底斯 / 岗底斯 / gtIC(Gangtise 语音误识别)/ 调接口 / CLI / openapi / 导出 / 下载研报 / 批量查 / 拉数据 / 跑一下 / 研报 / 纪要 / 公告 / K线 / 财报 / 估值 / 选股 / 债券 / 基金 / ETF
|
|
8
8
|
|
|
9
|
-
**适用**:原始数据导出、批量 jsonl/csv、下载 PDF/MD、行情 K 线、财务报表、估值指标、证券级数据指标(EDE
|
|
9
|
+
**适用**:原始数据导出、批量 jsonl/csv、下载 PDF/MD、行情 K 线、财务报表、估值指标、证券级数据指标(EDE 截面/时序/条件选股)、财报日历(业绩预告/快报/公告)、会议线索、帕米尔专家纪要、资金流向、题材与板块、债券(资料/行情/估值/评级/公告/违约)、公募基金(资料/净值/费率/经理/规模/持有人/持仓与配置/ETF 申赎)、联网搜索、PDF 解析为 Markdown、AI 能力(一页通/投资逻辑/同业对比/个股看点·投研总结/投研线索/业绩点评/观点PK·多空辩论/主题跟踪/热点话题/管理层讨论/管理层情绪/调研提纲/知识库搜索)、云盘文件管理(Vault)
|
|
10
10
|
|
|
11
11
|
**不适用**:不脱离 OpenAPI 自行撰写研报、编造投研结论或做自由问答——观点总结、多空 PK 等 AI 产物本 skill 只经由 Gangtise 平台 AI 接口获取,不自行生成
|
|
12
12
|
|
|
@@ -36,7 +36,7 @@ description: |-
|
|
|
36
36
|
- K 线全市场关键字(`aShares` / `hkStocks` / `usStocks`;旧命令 `all`)跨日期 → 自动按日切片并合并,粒度按各市场单日行数定(A 1 个工作日 / 港 2 个工作日 / 美 1 个工作日)
|
|
37
37
|
- 5xx / `429` / 网络错误 / `999999` → 自动指数退避重试(🔴 贵档端点例外:仅连接失败 / 429 / token 自愈重试,5xx/超时不重放防重复扣分;`indicator` 端点对 `999999` 不重试)
|
|
38
38
|
- Token 失效 → 自动换用已刷新的 token 或重新登录,再重发;凭证错 `999011` → **不重试**(AK/SK 不对不会自己好),查环境变量
|
|
39
|
-
8. **参数命名差异**:`--security-code` 只用于 **Fundamental 全组、AI 单证券生成类**(`one-pager` / `investment-logic` / `peer-comparison` / `earnings-review` / `research-outline` / `management-discuss-*`)**与 `insight qa list`**;`ai security-clue` 用 `--gts-code`;`fund manager-info` 按人名查、用 `--manager`;其余(Insight 其他命令、Quote、Vault、Bond、Fund、Indicator、`ai stock-summary`)一律用 `--security`。
|
|
39
|
+
8. **参数命名差异**:`--security-code` 只用于 **Fundamental 全组、AI 单证券生成类**(`one-pager` / `investment-logic` / `peer-comparison` / `earnings-review` / `research-outline` / `management-discuss-*`)**与 `insight qa list`**;`ai security-clue` 用 `--gts-code`;`fund manager-info` 按人名查、用 `--manager`;其余(Insight 其他命令、Quote、Vault、Bond、Fund、Indicator、`ai stock-summary`、`ai management-sentiment-indicator` / `-conclusion`)一律用 `--security`。
|
|
40
40
|
9. **调试**:`--verbose` 或 `GANGTISE_VERBOSE=1` 打印每个请求的耗时/字节数到 stderr。
|
|
41
41
|
10. **`--field` 字段名必须核对,不确定就别传**(返回全量最稳)。上游对不存在的字段名:`quote` 系(realtime / day-kline / minute-kline / fund-flow)名和值一起丢、不报错——CLI 比对请求与返回的列名,缺列标 `partial` + `missingFields` 并退出 3;`fundamental main-business` / `valuation-analysis` 报 `100005`、`bond` / `fund` 报 `100003`,都会点名写错的名字。CLI 另检查每行的值个数与字段数,对不上直接报错退出 1,报障时带上报错末尾的 `(trace …)`。多只证券或全市场时,缺的身份列 CLI 会补到最前(日 K 补 `securityCode` / `tradeDate`、分钟 K 补 `securityCode` / `tradeTime`、realtime 补 `securityCode`);单只不补。realtime **无 `close`**(用 `latestPrice`)、**无市值**(总市值走 `indicator cross-section --indicator qte_mkt_cptl`,A/港/美股均有数)。
|
|
42
42
|
11. 🔴 **EDE(`indicator` 截面 / 时序 / 选股)取不到数返 `null` 占位、行列都保留、退出码 0**;代码写错才报 `100003` 并指名。报告期类指标(`is_*` 等)的日期一律落**报告期末**(`03-31` / `06-30` / `09-30` / `12-31`),截面用 `--indicator-param "<指标code>:reportDate=YYYY-MM-DD"`(`screener` 用 `"F1:reportDate=..."`)——日期不在报告期末时整批 `null`,`screener` 筛出空集是**日期用错,不是没有符合条件的标的**。时序按日返回、只有报告期末那几行是真值,**别对整列直接求均值 / 求和**。**`--calendar-type` 默认别传**(CLI 自动选日期轴;显式传 `TD` 会让报告期类指标整行 `null`)。详见 `references/commands/indicator.md`。
|
|
@@ -66,7 +66,7 @@ description: |-
|
|
|
66
66
|
- 公司名 → 先速查表,否则 `reference securities-search`
|
|
67
67
|
- opaque ID → 先 `references/lookup-ids.md`
|
|
68
68
|
- 模糊时间词 → 查"时间词映射"
|
|
69
|
-
- 列表类命令用户没要求全量 → 按单价主动加 `--size` 兜底(不必问):免费或 0.1 积分/条的列表用 `--size 200`;**≥1
|
|
69
|
+
- 列表类命令用户没要求全量 → 按单价主动加 `--size` 兜底(不必问):免费或 0.1 积分/条的列表用 `--size 200`;**≥1 积分/条的(观点、独立观点、路演四件套、会议线索、个股线索、热点话题、管理层情绪等)用 `--size 20`**,要更多先 `--size 1` 看 stderr 的 `Total` 估总价再定。CLI 省略 `--size` 会拉全量;按条计费的列表估算全量超过 1000 积分时报错退出(报错里有估算积分),此时把估算积分告诉用户,确认后加 `--yes` 重跑或改传较小的 `--size N`。**显式 `--size` 本身估算超过 1000 积分也同样拦截**(别用 `--size 100000` 当「全量」绕过),`fundamental earning-forecast` 按日期区间估算、同一条线
|
|
70
70
|
- 预估结果 >200 行 → 别全量 `--format json` 引进上下文,改 `--format jsonl --output <file>` 落盘(行边取边写、内存不随行数增长,stdout 只回显文件路径),再 `wc -l` + `head` 采样呈现。落盘的 `csv` / `jsonl` 旁边会有 `<file>.meta.json`:`complete` / `rows` / `result.partial` 与缺失项标记都在里面,转交文件时一并给、核验完整性先看它(`complete: false` = 那次导出退出码 3)
|
|
71
71
|
- 路由到 AI 同步生成命令 → 同步生成类(`one-pager` / `investment-logic` / `peer-comparison` / `research-outline` / `theme-tracking` / `management-discuss-*`)CLI 已内置 120s 超时下限,无需前缀;`stock-summary` 同样有 120s 下限;`hot-topic` 仍建议前置 `GANGTISE_TIMEOUT_MS=120000`。**贵档端点超时/5xx 不自动重试**(重放=重复扣分)——超时报错后内容可能已在服务端生成并扣费,同参数再调仍会**再扣一次**(无缓存豁免),所以一次调用给足超时比失败重跑省钱。`earnings-review` / `viewpoint-debate` 是异步(`--wait` 或 `*-check` 轮询),不吃这个超时
|
|
72
72
|
- "AI速记/智能摘要/会议纪要"→`summary`、"原始文件/原文件"→`original`、"语音识别/转写文本/ASR"→`asr` — 用户已明示时直接映射 content-type,不必问
|
|
@@ -77,19 +77,19 @@ description: |-
|
|
|
77
77
|
|
|
78
78
|
- **免费**:所有 `quote` 行情、`fundamental` 报表/主营/估值/股东(**盈利预测除外**)、`reference`/`constant` 查询(含 `official-account-search`)、`alternative edb-search`、`vault`(record/wechat/股票池/drive/AI云盘,含云盘上传与目录管理)、`insight report-image list`
|
|
79
79
|
- **0.1/条 list**:research / foreign-report / official-account / announcement(A/港/美) / summary / qa / performance-calendar 的 list、`vault my-conference-list`;`insight report-image download` 0.1/张
|
|
80
|
-
- **按条(观点/含详情类 list)**:`ai security-clue` 5;roadshow/site-visit/strategy/forum list 10;independent-opinion list 1;**opinion / foreign-opinion list 1(只含摘要 `brief`)**,要正文用 `detail` 30/条或 `list --with-content` 30/条;`fundamental earning-forecast` 0.5;`ai stock-summary` 1(无看点的证券不返回也不扣);`alternative edb-data` 30/指标
|
|
80
|
+
- **按条(观点/含详情类 list)**:`ai security-clue` 5;`ai management-sentiment-indicator` / `-conclusion` 5;roadshow/site-visit/strategy/forum list 10;independent-opinion list 1;**opinion / foreign-opinion list 1(只含摘要 `brief`)**,要正文用 `detail` 30/条或 `list --with-content` 30/条;`fundamental earning-forecast` 0.5;`ai stock-summary` 1(无看点的证券不返回也不扣);`alternative edb-data` 30/指标
|
|
81
81
|
- **各 download(/篇)**:official-account / research 10;announcement 1;announcement-hk / announcement-us 2;independent-opinion / summary / foreign-report / my-conference 30;`performance-calendar download` A 股 1 / 港美股 2
|
|
82
82
|
- **0.4 的 `bond` 系**:`bond` 全部命令 **0.4/次**(按次,与返回行数无关),三个例外按量计:`rating-overview` 0.4/**条**、`rating-change` 0.4/**只有数据的债券**、`issuer-rating-change` 0.4/**个发行人**
|
|
83
83
|
- **0.4 的 `fund` 系**:`fund` 全部命令 **0.4/次**(按次,与返回行数、基金只数无关)——多只基金合并成一次调用最省
|
|
84
84
|
- **`tool web-search` 1/次**(按次,与返回条数、是否带 `--include-content` 无关;零结果与报错不扣)
|
|
85
85
|
- 🔴 **`insight highlight list` 5/条**——**按返回条数计**,`--size 20` 的一页 = 100 积分。省略 `--size` 时 CLI 先估算,超过 1000 积分(约 200 条)报错退出,要全量须加 `--yes`
|
|
86
86
|
- **按页**:`tool file-parse` 0.8/页,**提交(`--file`)时按实际页数一次性扣**,取结果(`file-parse-check`)免费——50 页 PDF = 40 积分,别重复提交同一文件
|
|
87
|
-
- 🔴 **按次**:`ai knowledge-batch` 10、`management-discuss-earnings-call` 10、`management-discuss-announcement` 5;AI Agent `one-pager` / `investment-logic` / `peer-comparison` / `research-outline` / `theme-tracking` **10/次**,`earnings-review` / `viewpoint-debate` **20/次**
|
|
87
|
+
- 🔴 **按次**:`ai knowledge-batch` 10、`management-discuss-earnings-call` 10、`management-discuss-announcement` 5、`management-sentiment-detail` 10;AI Agent `one-pager` / `investment-logic` / `peer-comparison` / `research-outline` / `theme-tracking` **10/次**,`earnings-review` / `viewpoint-debate` **20/次**
|
|
88
88
|
- 🔴 **`ai hot-topic` 10/篇,按返回条数计**(不是按调用次数)。📌 **一「篇」= 一整份报告**(一份早报 / 午报 / 盘中快报 / 晚报),**不是报告里的一条话题**——一份报告通常包含多条热点话题。所以 `--size 20` 的一页 = 最多 20 份报告 = 200 积分,**先用 `--start-date`/`--end-date` + `--category` 收窄再拉**,别省略 `--size` 直接全量。**可查的历史范围是前溯 3 个月**(各档相同)——超出范围的日期返回空结果而不是报错,拿到空先想想是不是撞了权限窗口
|
|
89
89
|
- **题材**:`alternative concept-info` / `concept-securities` **50/次**;🔴 加 `--full`(催化事件 / 重点个股标识 / 纳入理由)走旧版 **500/次**,不需要这几列就别加
|
|
90
90
|
- ✅ **扣费发生在接口成功返回数据之后**(平台计费规则):没查到内容(空结果)、报错都不扣分——各 download、`ai hot-topic`(10/篇)、`ai stock-summary`(1/条,无看点总结的个股不进返回列表也不计费)、AI 生成类(`one-pager` 等 10~20/次),以及按次计费的 `ai knowledge-batch`、题材、`tool web-search` 都是这样。**所以「先小范围试探再放大」是安全的**——先用窄条件确认能查到东西,再扩范围。⚠️ **「成功返回」按服务端算**:超时报错时服务端可能已经生成并返回了内容(只是客户端没收到),这次已经扣过,同参数重调会再扣一次;异步的 `earnings-review` / `viewpoint-debate` 在提交成功(拿到任务 ID)时就扣,之后生成失败不退。**单价未公布的** `pamirs-summary`(见下)别据此假定
|
|
91
91
|
- ⚠️ **同参数重复调用不免费**:按次计费的那批无缓存命中豁免(`one-pager` 等生成类重复调用每次扣分,即使秒回缓存内容);**按篇/按条的也一样**——重拉同一批 `hot-topic` 就是按条数再计一次费。生成类与列表结果拿到后自行留存复用,别为「刷新」重调
|
|
92
|
-
- ⚠️ **这些端点超时 / 5xx 不自动重放**(共
|
|
92
|
+
- ⚠️ **这些端点超时 / 5xx 不自动重放**(共 66 个,完整清单见下方注释块:按次计费的 AI Agent 那批、`ai knowledge-batch` / `management-discuss-*` / `management-sentiment-detail` / `hot-topic`、题材两接口(含 `--full`)、`bond` 与 `fund` 全部命令、`tool web-search`、`tool file-parse` 提交;summary / foreign-report / my-conference 三个 download;按条计费的 `insight highlight list`、观点 `detail` / `list --with-content`、`ai stock-summary` 与 `fundamental earning-forecast`;以及不计分但重放有副作用的 `vault stock-pool-create` 与云盘上传 / 新建文件夹 / 复制 / 删除)。仅连接失败、429 与 token 自愈会重试。服务端可能已经执行并计费,重放会重复扣分、多建一份或把成功报成失败——**一次调用给足超时比失败重跑省钱**
|
|
93
93
|
|
|
94
94
|
<!-- no-replay-endpoints
|
|
95
95
|
上面那句点名的「不重放」端点,完整清单如下(endpoint key,与 `gangtise raw list` 一致):
|
|
@@ -99,6 +99,7 @@ ai.investment-logic
|
|
|
99
99
|
ai.knowledge-batch
|
|
100
100
|
ai.management-discuss-announcement
|
|
101
101
|
ai.management-discuss-earnings-call
|
|
102
|
+
ai.management-sentiment-detail
|
|
102
103
|
ai.one-pager
|
|
103
104
|
ai.peer-comparison
|
|
104
105
|
ai.research-outline
|
|
@@ -113,6 +114,7 @@ bond.announcement
|
|
|
113
114
|
bond.basic-info
|
|
114
115
|
bond.cash-flow
|
|
115
116
|
bond.daily-quote
|
|
117
|
+
bond.default-list
|
|
116
118
|
bond.exercise-notice
|
|
117
119
|
bond.issuance-detail
|
|
118
120
|
bond.issuance-plan
|
|
@@ -190,13 +192,15 @@ vault.stock-pool.create
|
|
|
190
192
|
| `ai hot-topic` / `security-clue` | **3 个月** | 3 个月 |
|
|
191
193
|
| `ai theme-tracking` | **1 个月** | 1 个月 |
|
|
192
194
|
| `ai management-discuss-*` | **1 年** | 1 年 |
|
|
195
|
+
| `ai management-sentiment-indicator` / `-conclusion` | **1 年** | 6 个月 |
|
|
196
|
+
| `ai management-sentiment-detail` | 按 `--source-id` 取整场,不按日期限制 | 同正式 |
|
|
193
197
|
| `ai earnings-review` | 最近 6 期财报 | 同正式 |
|
|
194
198
|
| `ai one-pager` / `investment-logic` / `peer-comparison` / `research-outline` / `viewpoint-debate` / `stock-summary` | 最新截面 | 最新截面 |
|
|
195
199
|
| `ai knowledge-batch` | **不限** | 不限 |
|
|
196
200
|
| `vault my-conference-list` / `my-conference-download` | **1 个月** | 1 个月 |
|
|
197
201
|
| `vault` 其余(速记 / 群消息 / 股票池 / 云盘) | **不限** | 不限 |
|
|
198
202
|
|
|
199
|
-
⚠️ **实际窗口按账号配**,换接口绕不过去(`indicator` 与 `quote day-kline` 同界)。整段在界外返回 `110003`(不是空结果),把日期移进范围或联系客户经理。🔴 **区间跨过下界时各接口不同**:`quote` 日 K / 分钟 K / 资金流向与 `fundamental valuation-analysis` 从下界起返回、**不报错**(首行明显晚于起始日时 CLI 在 stderr 提示);`indicator`、`bond` 与 `fund` 整批报 `110003`;`bond daily-quote` / `bond valuation` 的数据还可能比账号窗口短——区间早于数据起点时返回 `130001
|
|
203
|
+
⚠️ **实际窗口按账号配**,换接口绕不过去(`indicator` 与 `quote day-kline` 同界)。整段在界外返回 `110003`(不是空结果),把日期移进范围或联系客户经理。🔴 **区间跨过下界时各接口不同**:`quote` 日 K / 分钟 K / 资金流向与 `fundamental valuation-analysis` 从下界起返回、**不报错**(首行明显晚于起始日时 CLI 在 stderr 提示);`indicator`、`bond` 与 `fund` 整批报 `110003`;`bond daily-quote` / `bond valuation` 的数据还可能比账号窗口短——区间早于数据起点时返回 `130001`,跨过数据起点时从有数据的那天起返回、不报错(首行明显晚于起始日时 CLI 在 stderr 提示),核对首行日期。上面两处 stderr 提示都只看整批最早的首行:多只同查时有一只够早就不提示,逐只的起点按 `securityCode` 核对。**例外**:`quote minute-kline` 窗口只有 1 个月且随日期滚动,整段在窗外返回空结果、不报错(CLI 在 stderr 提示);`ai hot-topic` 超出账号可查范围时也返回空结果、不报错。
|
|
200
204
|
|
|
201
205
|
### 下载规则(`--file-type` / `--content-type`)
|
|
202
206
|
|
|
@@ -224,7 +228,7 @@ vault.stock-pool.create
|
|
|
224
228
|
|---------|------|
|
|
225
229
|
| 研报 / 券商报告 | `insight research list` |
|
|
226
230
|
| 外资研报 | `insight foreign-report list` |
|
|
227
|
-
| 首席观点 / 内资机构观点 / 分析师观点 | `insight opinion list`(只含摘要 `brief`,1/条);要正文 → `insight opinion detail --chief-opinion-id`(30
|
|
231
|
+
| 首席观点 / 内资机构观点 / 分析师观点 | `insight opinion list`(只含摘要 `brief`,1/条);要正文 → `insight opinion detail --chief-opinion-id`(30/条)。按观点类别(业绩点评 / 异动点评…)、投研标签(强烈推荐 / 超预期 / 涨价 / 龙头…)、机构标签(头部券商 / 新财富)筛 → `--category` / `--llm-tag` / `--broker-tag`,取值见 `insight.md` |
|
|
228
232
|
| 外资机构观点 / 外资券商观点 | `insight foreign-opinion list`(摘要 + 中文摘要);要原文与译文 → `insight foreign-opinion detail --foreign-opinion-id`(30/条) |
|
|
229
233
|
| 外资独立观点 / 独立分析师观点 | `insight independent-opinion list` |
|
|
230
234
|
| 纪要 / 会议纪要(外部) | `insight summary list` |
|
|
@@ -248,6 +252,7 @@ vault.stock-pool.create
|
|
|
248
252
|
| 热点话题 / 早午晚报 | `ai hot-topic` |
|
|
249
253
|
| 管理层讨论(财报) | `ai management-discuss-announcement` |
|
|
250
254
|
| 管理层讨论(业绩会) | `ai management-discuss-earnings-call` |
|
|
255
|
+
| 管理层情绪 / 业绩会问答是否回避 · 乐观 · 确定 / 情绪较上一场的变化 | `ai management-sentiment-indicator`(三维评分,5/条)/ `ai management-sentiment-conclusion`(结论文本与较上一场的对比,5/条);逐条问答与判断依据 → `ai management-sentiment-detail --source-id <source.sourceId>`(10/次)。⚠️ 返回的 `publishTime` 比北京时间早 8 小时,见 `ai.md` |
|
|
251
256
|
| 日 K(历史,A 股 / 港股 / 美股 / 沪深 ETF / 各类指数含全球指数,可混查) | `quote day-kline` |
|
|
252
257
|
| 沪深京指数日 K / 要指数名称 | `quote day-kline` 逐个传指数代码(**没有一次拿全部指数的写法**,`index-day-kline --security all` 会被 CLI 拒绝);指数名称用 `reference securities-search --keyword <指数代码> --category index`(返回 `gtsName`) |
|
|
253
258
|
| ~~港股 / 美股日 K~~ | ⚠️ 已弃用,用 `quote day-kline`(`day-kline-hk` / `day-kline-us` 仍可调但不校验代码) |
|
|
@@ -272,6 +277,7 @@ vault.stock-pool.create
|
|
|
272
277
|
| 评级调整 / 评级变动历史 | `bond rating-change`(债项评级,最多 10 只)、`bond issuer-rating-change`(主体评级,`--security` 或 `--issuer` 二选一) |
|
|
273
278
|
| 利率债发行计划 / 国债发行安排 | `bond issuance-plan`(**只按日期区间查,不收债券码**) |
|
|
274
279
|
| 含权债行权 / 回售 / 赎回提示 | `bond exercise-notice` |
|
|
280
|
+
| 违约债券 / 债券违约记录 / 某主体违约历史 | `bond default-list`(违约日期区间〔两端都给、不超过 1 年〕/ `--security` / `--issuer` **三选一**;`--issuer` 一次一个,用发行人**全称**并核对返回的 `issuerName`) |
|
|
275
281
|
| 基金资料 / 基金分类 / 管理人 / 成立日 / 业绩基准 / 跟踪指数 / 风险等级 | `fund basic-info`(`--security` 用 `005827.OF` / `159967.SZ` 这类带后缀代码;只知道名称时用 `reference securities-search --keyword <基金简称或 6 位代码> --category fund` 换代码(**只取 `category` 为 `fund` 的行**,结果里可能混有债券、债券代码查基金返回空结果;没有就换更具体的简称;场内场外都能搜到;全称常搜不到;不同份额与场内 / 场外代码会一起返回,按 `gtsName` 区分);`--field` 写错**整批拒绝** `100003`) |
|
|
276
282
|
| 基金净值 / 复权净值 / 区间收益 / 货币基金七日年化 | `fund nav`(算收益用 `navAdjusted`) |
|
|
277
283
|
| 基金费率 / 管理费 / 申购赎回费 | `fund fee-rate`(`feeRate` 是字符串) |
|
|
@@ -300,6 +306,7 @@ vault.stock-pool.create
|
|
|
300
306
|
| 题材画像 / 投资逻辑 / 行业空间 / 竞争格局 | `alternative concept-info`(前置:`reference concept-search` 拿 `concept-id`;50/次);**要催化事件**加 `--full`(500/次) |
|
|
301
307
|
| 题材成分股 / 题材深度 F8 | `alternative concept-securities`(前置同上;50/次);**要重点个股标识 / 纳入理由**加 `--full`(500/次) |
|
|
302
308
|
| 多证券已实现财务 / 估值指标搜索(含总市值) | `indicator search` |
|
|
309
|
+
| 多只基金批量取分类 / 复权净值 / 风险收益指标(夏普 / 最大回撤 / Alpha / Beta / 同类排名) | `indicator cross-section`(`--security` 传基金代码;指标与必填参数见 `indicator.md`「基金指标」) |
|
|
303
310
|
| 多证券已实现指标截面(多指标 × 多证券,同一查询日期) | `indicator cross-section`(前置:`indicator search --format json` 通过三项校验) |
|
|
304
311
|
| 多证券已实现指标时序(单指标 × 多证券,按区间) | `indicator time-series`(前置:`indicator search --format json` 通过三项校验) |
|
|
305
312
|
| 条件选股 / 按指标筛股票(市值+PE+经营范围等多条件组合) | `indicator screener`(前置:`indicator search` 拿 code;范围可传板块 ID,见 `reference sector-search`) |
|
|
@@ -318,6 +325,7 @@ vault.stock-pool.create
|
|
|
318
325
|
- "搜索 X" → 数据维度精确(按行业/券商)走对应 `insight ... list`;跨类型语义搜索走 `ai knowledge-batch`
|
|
319
326
|
- 港股代码用在 `insight foreign-opinion --security` 还是 `quote day-kline --security`?前者要"境外"格式(`UBER.N`),后者要 `.HK`
|
|
320
327
|
- "基金" → `fund` 命令组(资料 / 净值 / 持仓 / ETF 申赎);`quote fund-flow` 是 **A 股个股资金流向**,与基金无关。ETF 的日 K 与实时行情仍走 `quote day-kline` / `realtime`,ETF 净值、份额与申赎清单走 `fund`
|
|
328
|
+
- "管理层" → 讨论内容(财报管理层讨论、业绩会要点)走 `ai management-discuss-*`;问答里的态度(是否回避、乐观还是风险、表述是否确定)走 `ai management-sentiment-*`
|
|
321
329
|
- "成分股" → 题材深度(分组;重点标记/纳入理由需 `--full`)走 `alternative concept-securities`;板块(行业/概念分类树,纯代码名单)走 `reference sector-constituents`
|
|
322
330
|
- **证券指标按任务形态路由,不是搜到 EDE 就一律走 EDE**(细节见 `references/commands/indicator.md`):
|
|
323
331
|
- 单证券 → 优先 `fundamental` 专用命令(多数免费 / 低价);多证券批量取**已实现**指标 → `indicator`(EDE)一次拉取:同一日期 / 报告期横比用 `cross-section`,区间走势用 `time-series`(不能多指标 × 多证券同时)
|
|
@@ -326,7 +334,7 @@ vault.stock-pool.create
|
|
|
326
334
|
- 日期参数**只看 `parameterList` 必填哪个**:`tradeDate` → `--date`,`reportDate` → `--indicator-param "code:reportDate=..."`(多数报告期类要后者,但 `_ttm` 整族要 `tradeDate`);两个都必填(如 `div_cash_yld`)就两个都用 `--indicator-param` 显式给,只给 `reportDate` 时 `--date` 不再注入、会报 `100001`。`parameterList` 要 `fiscalYear` 的(预测类 `frcst_*`、分红类 `div_cash_yr` 等)显式给,漏传报 `100001` 并点名。日频估值(`finc_pe_ttm` / `finc_pb_mrq`)用最新交易日,用报告期末日期会取到陈值;参数名同样以 `parameterList` 为准(复权是 `adjustType`)
|
|
327
335
|
- 结果**按 `security` 字段取值**,别按请求下标对位(证券的返回顺序不作保证);批量回填加 `--key-by code`
|
|
328
336
|
- 估值历史:EDE 与 `valuation-analysis` 的财报口径切换时点与财报版本都不同,做分位 / 回测两边都拉交叉核
|
|
329
|
-
- "业绩点评"双义消歧:**检索已有**的业绩点评:研报走 `insight research list --llm-tag earningsReview`(0.1/条;`--llm-tag` 只有 `opinion` / `research` / `foreign-report`
|
|
337
|
+
- "业绩点评"双义消歧:**检索已有**的业绩点评:研报走 `insight research list --llm-tag earningsReview`(0.1/条;`--llm-tag` 只有 `opinion` / `research` / `foreign-report` 三个列表有),首席观点走 `insight opinion list --category earningsReview`(1/条;观点的「业绩点评」是类别,不是 `--llm-tag`),业绩会纪要走 `insight summary list --category earningsCall`;**AI 现生成**一份走 `ai earnings-review`(异步、20/次)。不确定问一句
|
|
330
338
|
|
|
331
339
|
## 公司名 → 证券代码
|
|
332
340
|
|
|
@@ -397,7 +405,7 @@ gangtise reference securities-search --keyword <公司名> --category stock --to
|
|
|
397
405
|
|
|
398
406
|
🔴 **`--end-time` 写到当天末尾 `23:59:59` 最稳**:A 股公告与 `knowledge-batch` 只写日期时 CLI 按当日 23:59:59 换算;其余列表把时间串原样交给接口,写全时间才不依赖接口对「只有日期」的理解。
|
|
399
407
|
|
|
400
|
-
日期参数**按参数名判断、不按命令组**:名字带 `-date` 的(`--start-date` / `--end-date` / `--date` / `--report-date`)收年在前日期(`YYYY-MM-DD` 首选,`YYYY/MM/DD` / `YYYYMMDD` 也收);名字带 `-time` 的(`--start-time` / `--end-time`)收年在前日期 + 可选 ` HH:mm[:ss]`(空格或 `T` 分隔)或 10 / 13
|
|
408
|
+
日期参数**按参数名判断、不按命令组**:名字带 `-date` 的(`--start-date` / `--end-date` / `--date` / `--report-date`)收年在前日期(`YYYY-MM-DD` 首选,`YYYY/MM/DD` / `YYYYMMDD` 也收);名字带 `-time` 的(`--start-time` / `--end-time`)收年在前日期 + 可选 ` HH:mm[:ss]`(空格或 `T` 分隔)或 10 / 13 位时间戳(`ai management-sentiment-indicator` / `-conclusion` 写时刻必须带秒,`HH:mm` 报 `110001`)。易错:Insight / Vault 各 list 用 `-time`,**唯独 `insight performance-calendar` 用 `-date`**;AI 组两种都有(`theme-tracking --date`、`hot-topic` / `management-discuss-*` 用 `-date`,`security-clue` / `knowledge-batch` / `management-sentiment-indicator` / `-conclusion` 用 `-time`);`quote minute-kline` 用 `-time`,其余 Quote / Fundamental / Indicator / `bond` / `fund` / `edb-data` 用 `-date`。拿不准看该命令 `--help`。
|
|
401
409
|
|
|
402
410
|
支持排序切换的 list:opinion / summary / pamirs-summary / research / foreign-report / 三个公告 / foreign-opinion / independent-opinion / official-account。**要最新加 `--rank-type 2`(按 `publishTime` 倒序);要最相关用默认 `--rank-type 1` + `--keyword`**——两者从同一结果集取的是**不同子集**,没有 `--keyword` 时无差异。`--search-type 2`(只有 summary / pamirs-summary / research / foreign-report / 三个公告 / official-account 有)扩大命中总数与 `--rank-type 2` 的候选池,**不改变 `--rank-type 1` 取回的条目**,要相关度不必加。判断这两个参数是否生效的方法见 `references/commands/insight.md` 开头。
|
|
403
411
|
|
|
@@ -431,11 +439,11 @@ gangtise reference securities-search --keyword <公司名> --category stock --to
|
|
|
431
439
|
- 内资观点 / 纪要 / 路演 / 调研 / 策略 / 论坛 / 财报日历(performance-calendar)/ 研报 / 外资研报 / A 股公告 / 港股公告 / 美股公告 / 外资观点 / 独立观点 / 公众号(official-account)/ 投资者问答(qa)/ 研报图表(report-image)→ `references/commands/insight.md`
|
|
432
440
|
- 行情命令(A 股 / 港股 / 美股 / ETF / 指数日 K、分钟 K、实时行情、资金流向 fund-flow,含全球指数清单) → `references/commands/quote.md`
|
|
433
441
|
- 三大报表(A 股 / 港股 / 美股)/ 主营 / 估值 / 盈利预测 / 股东 → `references/commands/fundamental.md`
|
|
434
|
-
- knowledge-batch / security-clue / 个股看点(stock-summary)/ AI agent / 异步任务 / 主题跟踪 / 热点 / 管理层讨论 → `references/commands/ai.md`
|
|
442
|
+
- knowledge-batch / security-clue / 个股看点(stock-summary)/ AI agent / 异步任务 / 主题跟踪 / 热点 / 管理层讨论 / 管理层情绪 → `references/commands/ai.md`
|
|
435
443
|
- drive / record / my-conference / wechat / 股票池 → `references/commands/vault.md`
|
|
436
444
|
- 行业指标数据库(EDB)/ 题材指数画像与成分股(concept-info / concept-securities)→ `references/commands/alternative.md`
|
|
437
445
|
- 数据指标(EDE:search / cross-section / time-series / screener,证券级指标截面、时序与条件选股)→ `references/commands/indicator.md`
|
|
438
|
-
- 债券(basic-info / issuer-info / daily-quote / valuation / cash-flow / announcement / issuance-* / rating-overview / rating-change / issuer-rating-change / exercise-notice)→ `references/commands/bond.md`
|
|
446
|
+
- 债券(basic-info / issuer-info / daily-quote / valuation / cash-flow / announcement / issuance-* / rating-overview / rating-change / issuer-rating-change / exercise-notice / default-list)→ `references/commands/bond.md`
|
|
439
447
|
- 公募基金(basic-info / nav / fee-rate / manager-* / asset-size / holder-structure / top10-holders / asset-allocation / 持仓与分布六个 / etf-pcf-* / etf-share-change)→ `references/commands/fund.md`
|
|
440
448
|
- PDF 解析(file-parse)/ 联网搜索(web-search)→ `references/commands/tool.md`
|
|
441
449
|
- securities-search / chiefs-search(首席 ID)/ institution-search(机构 ID)/ official-account-search(公众号 ID)/ 常量查询(constant-category / constant-list)/ 题材 ID(concept-search)/ 板块(sector-search / sector-constituents)/ lookup 本地表 / 行业别名 / raw call → `references/commands/reference-and-lookup.md`
|
|
@@ -170,3 +170,45 @@ gangtise ai management-discuss-earnings-call --report-date <date> --security-cod
|
|
|
170
170
|
- `--report-date`:接受 `xxxx-03-31` / `xxxx-06-30` / `xxxx-09-30` / `xxxx-12-31`
|
|
171
171
|
- `--dimension`(**必选**):`businessOperation` | `financialPerformance` | `developmentAndRisk`(注意:不支持 `all`,与财报版不同)
|
|
172
172
|
- 返回 `content` 为字符串
|
|
173
|
+
|
|
174
|
+
## 管理层情绪 `ai management-sentiment-indicator` / `-conclusion` / `-detail`
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
gangtise ai management-sentiment-indicator [--security <code>...] [--start-time <datetime>] [--end-time <datetime>] [--from <n>] [--size <n>] [--yes]
|
|
178
|
+
gangtise ai management-sentiment-conclusion [--security <code>...] [--start-time <datetime>] [--end-time <datetime>] [--from <n>] [--size <n>] [--yes]
|
|
179
|
+
gangtise ai management-sentiment-detail --source-id <id> [--source-type <type>]
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
管理层在业绩会问答里的三维情绪:**正面回应程度**(正面回答还是回避)、**回复乐观度**(回答对公司是利好还是风险)、**回复确定度**(表述是否明确)。列表一条 = 一只证券 × 一场来源会议(同一证券开过几场就有几条,用 `source.sourceId` 区分),按发布时间倒序。来源类型目前只有 `conference`(电话会议)。
|
|
183
|
+
|
|
184
|
+
- **积分**:`indicator` / `conclusion` **5/条**(按返回条数);`detail` **10/次**(超时不自动重发)
|
|
185
|
+
- **数据范围**:两个列表正式账号前溯 1 年、试用 6 个月,`--start-time` 早于范围报 `110003`;`detail` 按 `--source-id` 取整场,不按日期限制
|
|
186
|
+
- `--security`:可重复,只收具体代码(`aShares` 这类市场关键词报 `120001`),任一代码非法整批报 `120001`。**不传 = 全部证券**——按条计费,省略 `--size` 时 CLI 先取 1 条拿到总数估算,超过 1000 积分报错退出,确认后加 `--yes`
|
|
187
|
+
- `--start-time` / `--end-time`:按发布时间筛,写 `yyyy-MM-dd`、`yyyy-MM-dd HH:mm:ss` 或 10 / 13 位时间戳——**写日期时间就要带秒**(`HH:mm` 报 `110001`);只写日期的 `--end-time` 含当天整天
|
|
188
|
+
- `--from` / `--size`:自动翻页(单页 100);省略 `--size` 拉全量
|
|
189
|
+
- 🔴 **返回的 `publishTime`(含 `conclusion` 里的 `previousSource.publishTime`)比北京时间早 8 小时**:北京时间 20:30 开的业绩会返回 `12:30:00`。`--start-time` / `--end-time` 按北京时间筛(`--start-time "2026-10-23 20:00:00"` 取得到这一场)。展示时刻、与纪要 / 路演按时间对齐、按日期归档前先加 8 小时——否则北京时间 0–8 点开的会会落到前一天
|
|
190
|
+
|
|
191
|
+
**`indicator`**:整场评分 `sentimentResponsiveness` / `sentimentPolarity` / `sentimentConviction`(0–5,两位小数)、有效问答数 `qaCount`、回避 / 风险 / 低确定度三个占比 `qaEvasionRatio` / `qaRiskRatio` / `qaUncertaintyRatio`(**百分数**:`7.14` 即 7.14%,分母是 `qaCount`),以及按问题类型拆分的 `questionCategoryList`。
|
|
192
|
+
|
|
193
|
+
- `questionCategoryList` 只列这一场出现过的类型(11 类,取值同 `insight qa list --question-category`),各类 `questionCategoryQaCount` 之和等于 `qaCount`。某类只有一两条问答时评分由单条决定、波动大,`isImportant` 标出重要类型
|
|
194
|
+
|
|
195
|
+
**`conclusion`**:结论文本 `sentimentSummary`(`overallSentiment` 总体情绪、`questionCategorySentiment` 主要影响因素、`qaSentimentChange` 重点变化)、三维信号文本 `sentimentSignal`、与上一场同一事项的问答对照 `qaSentimentContrast`(`previousQaList` 上一场、`currentQaList` 本场;`qTrace` / `aTrace` 是录音里的毫秒区间 `"起-止"`),对比基准见 `previousSource`。
|
|
196
|
+
|
|
197
|
+
- **没有可比的上一场时**:`qaSentimentChange` 为 `null`、`qaSentimentContrast` 为 `[]`、`previousSource` 为 `null`,结论文本照常返回、只是不含「较上一次」
|
|
198
|
+
- `*Signal` 是自然语言、不含分数,要分数用 `indicator`
|
|
199
|
+
|
|
200
|
+
**`detail`**:一场会议的全部问答,一次返回、不分页。每条给三维档位 `qaResponsiveness` / `qaPolarity` / `qaConviction`(只取 `5.0` / `2.5` / `0.0` 三档)和依据(`*Quote` 回答原文节选、`*Reason` 判断理由)。
|
|
201
|
+
|
|
202
|
+
- `--source-id` 从两个列表返回行的 `source.sourceId` 取;`--source-type` 默认 `conference`。**`--source-id` 写错不报错、返回空结果**——拿到空先核对 ID 是不是从列表里取的
|
|
203
|
+
- 返回行不带来源字段,批量取多场时自己记下每次的 `--source-id`
|
|
204
|
+
- `question` / `answer` 是录音转写原文(口语、可能有同音错字),展示时配合 `questionBrief`
|
|
205
|
+
|
|
206
|
+
**示例:**
|
|
207
|
+
```bash
|
|
208
|
+
# 某公司最近几场业绩会的三维评分
|
|
209
|
+
gangtise ai management-sentiment-indicator --security 300285.SZ --size 5 --format json
|
|
210
|
+
# 较上一场的变化
|
|
211
|
+
gangtise ai management-sentiment-conclusion --security 300285.SZ --size 1 --format json
|
|
212
|
+
# 取上面返回的 source.sourceId,看逐条问答与依据
|
|
213
|
+
gangtise ai management-sentiment-detail --source-id 554030 --format json
|
|
214
|
+
```
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
⚠️ **`--start-date` 早于可回溯下界时整批返回 `110003`「超出时间范围限制」**(这三个命令都是)——即使 `--end-date` 在窗口内,也不会只返回窗口内那一段。把 `--start-date` 移进窗口再查;实际下界随账号服务等级而定,以返回为准。
|
|
20
20
|
|
|
21
|
-
⚠️ **`bond daily-quote` / `bond valuation` 的数据可能比账号窗口短**:区间在窗口内、但早于数据起点时整段返回 `130001
|
|
21
|
+
⚠️ **`bond daily-quote` / `bond valuation` 的数据可能比账号窗口短**:区间在窗口内、但早于数据起点时整段返回 `130001`「数据未找到」;跨过数据起点时从有数据的那天起返回、不报错(首行比 `--start-date` 晚超过 14 天时 CLI 在 stderr 提示,退出码仍为 0)。按年份取长序列时按 `securityCode` 逐只核对首行日期——CLI 的提示只看整批最早的首行,多只同查时有一只数据够早就不会提示。
|
|
22
22
|
|
|
23
23
|
## `basic-info` 债券基本资料
|
|
24
24
|
|
|
@@ -102,6 +102,22 @@ gangtise bond issuance-plan --start-date <d> --end-date <d> [--field <name>]
|
|
|
102
102
|
|
|
103
103
|
🔴 **只按日期区间查,不收债券码**,日期必填。默认返回 `issueDate`。返回计划年份、发行人、债券性质与类型、期限、计划发行量、利率类型、付息频率、是否跨市场。
|
|
104
104
|
|
|
105
|
+
## `default-list` 违约债券
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
gangtise bond default-list (--start-date <d> --end-date <d> | --security <code>... | --issuer <name>) [--field <name>]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
🔴 **三种查法三选一**,同传或都不传 CLI 先本地拦下:
|
|
112
|
+
|
|
113
|
+
- **按违约日期**:`--start-date` 与 `--end-date` 必须同时给,区间不超过 1 个自然年(`2025-01-01`~`2026-01-01` 可以,`2026-01-02` 报 `110002`)
|
|
114
|
+
- **按债券**:`--security` 不限只数,没有违约记录的代码不产生行
|
|
115
|
+
- **按发行人**:`--issuer` **一次一个**(传多个或用逗号拼在一起 CLI 本地报错,分次调用)。⚠️ **用发行人全称**:传简称也会返回结果,但只返回最匹配的**一家**——如「上海世茂」只返回上海世茂建设有限公司的记录,同样有违约记录的上海世茂股份有限公司不在其中。拿到结果先核对 `issuerName` 是不是要查的那家
|
|
116
|
+
|
|
117
|
+
默认返回 `securityCode` + `defaultDate`,其余字段:`securityName` / `defaultAmount` 违约金额(**亿元**)/ `issuerName` 发行人全称 / `defaultReason` 违约原因,缺值为 `null`。按违约日期降序、代码升序,同一只债券每次违约一行。🔴 **`--field` 写错报 `100005`**(其余 `bond` 命令是 `100003`),同样整批拒绝并点名。
|
|
118
|
+
|
|
119
|
+
历史范围不限。条件下一条记录都没有时返回 `130001`(见下「空结果」)。
|
|
120
|
+
|
|
105
121
|
## `announcement` 债券公告
|
|
106
122
|
|
|
107
123
|
```bash
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
- LOF / ETF 的场内代码(`161005.SZ`)与场外代码(`161005.OF`)都能查,返回的 `fundCode` 与 `fundName` 跟随传入的代码(场内简称 / 场外简称不同);同一只基金别两种代码混着传,会重复
|
|
10
10
|
- A / C 等份额各有代码,要合并到同一只基金用 `basic-info` 的 `mainFundCode`
|
|
11
11
|
- 多只基金的结果**按 `fundCode` 字段对应**,别按请求顺序对位
|
|
12
|
+
- 多只基金横向比分类、复权净值与风险收益指标(夏普 / 最大回撤 / Alpha / 同类排名)用 `indicator cross-section`,见 `indicator.md`「基金指标」
|
|
12
13
|
|
|
13
14
|
⚠️ **超时 / 5xx 不自动重放**(避免重复扣费),偶发失败自行重跑。
|
|
14
15
|
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
|
|
10
10
|
| 请求形态 | 优先接口 |
|
|
11
11
|
| :--- | :--- |
|
|
12
|
-
| 单证券的财务 / 股东 / 主营,或 A股单证券估值 | 对应 `fundamental`
|
|
12
|
+
| 单证券的财务 / 股东 / 主营,或 A股单证券估值 | 对应 `fundamental` 专用命令;多数免费,且字段口径固定。多证券批量取股东户数 / 户均持股 / 前十大与第 N 大股东走 EDE,见下方「股东结构指标」 |
|
|
13
13
|
| 多证券批量取一组**已实现**财务 / 估值指标 | 先 `indicator search`,通过下方三项校验后用 `cross-section` / `time-series` 一次拉取,避免逐只循环 |
|
|
14
14
|
| A股盈利预测 / 一致预期(含预测 EPS) | `fundamental earning-forecast`;EDE 搜到的基本 / 稀释 EPS 是已实现值,不能替代预测 |
|
|
15
15
|
| A股估值历史分位 | `fundamental valuation-analysis` |
|
|
16
16
|
| **估值指标的历史序列**(分位 / 回测 / 择时) | 两个接口口径不同、都要交叉核——EDE 按正式财报披露日切换财报口径,`valuation-analysis` 按业绩快报切,见下方专门小节 |
|
|
17
17
|
| 开高低收 / 成交量等行情与 K 线 | `quote`;免费且支持多证券批量。**换接口不换口径**:`quote` 的 `volume` 与 EDE `qte_vol` 逐位相同(A股 / 港股 / 美股,单位均为股)。EDE 只在 `quote` 不提供的口径上才需要——周 / 月 / 季 / 年 / 区间成交量 |
|
|
18
|
+
| 单只基金的净值 / 持仓 / 规模 / 经理 | `fund` 命令组;多只基金批量取分类、复权净值与风险收益指标才用 EDE,见下方「基金指标」 |
|
|
18
19
|
| 单证券资金流向(要占比字段) | `quote fund-flow`;免费,且有 EDE 没有的 `*Ratio` 占比。多证券批量取某一两个档位才用 EDE 的 `flow_*` |
|
|
19
20
|
| 单证券三大报表全部科目 | 对应 `fundamental` 利润表 / 资产负债表 / 现金流量表命令 |
|
|
20
21
|
|
|
@@ -61,7 +62,7 @@ gangtise indicator cross-section --indicator <code> [--indicator <code2>] \
|
|
|
61
62
|
| 无 `tradeDate`、`parameterList` 为空 | 只加 `--indicator-param "<code>:"` |
|
|
62
63
|
|
|
63
64
|
- **空冒号那条与真实参数可以共存**:`"div_cash_yr:" "div_cash_yr:fiscalYear=2025"` 两条一起给,前者只关掉日期注入,不会把 `fiscalYear` 清掉
|
|
64
|
-
- **哪些指标属于后两种**:已知是 `pty_*`(公司属性:注册地址 / 法定代表人 / 经营范围 / 公司简介…)与 `scr_*`(证券属性:证券简称 / ISIN / 上市市场 / 上市板块 / 上市日期…)两族,加上 `div_cash_paid_ratio` / `div_cash_yr` / `pty_shr_reg`。🔴 **这只是当前已知的快照,不是完整清单**——`indicator search` 必须给关键词、`--limit` 上限 100 且没有翻页,所以指标库无法整体枚举。**永远以 `parameterList` 为准**;要重新生成某一族用 `indicator search --keyword <前缀>_ --limit 100`,返回条数小于 100 即该族已列全
|
|
65
|
+
- **哪些指标属于后两种**:已知是 `pty_*`(公司属性:注册地址 / 法定代表人 / 经营范围 / 公司简介…)与 `scr_*`(证券属性:证券简称 / ISIN / 上市市场 / 上市板块 / 上市日期…)两族,加上 `div_cash_paid_ratio` / `div_cash_yr` / `pty_shr_reg` 与基金的 `fund_main_code` / `fund_estb_dt`。🔴 **这只是当前已知的快照,不是完整清单**——`indicator search` 必须给关键词、`--limit` 上限 100 且没有翻页,所以指标库无法整体枚举。**永远以 `parameterList` 为准**;要重新生成某一族用 `indicator search --keyword <前缀>_ --limit 100`,返回条数小于 100 即该族已列全
|
|
65
66
|
- ⚠️ **别把「有 `fiscalYear`」当成「不要 `tradeDate`」**——`frcst_pe` / `frcst_shnp` / `frcst_op_rev` 等预测类指标 `parameterList` 里**两个都是必填**,照常用 `--date` 再加一条 `fiscalYear`,**不要**加空冒号那条
|
|
66
67
|
- ⚠️ **也别把「有 `reportDate`」当成「不受影响」**——报告期类指标同样拒收注入的 `tradeDate`,只是解法(自己传 `reportDate`)刚好顺带关掉了注入
|
|
67
68
|
- 🔴 **吃 `reportDate` 的指标必须显式传 `reportDate`**:`--indicator-param "code:reportDate=2024-12-31"`。服务端不接受 `tradeDate`——只给 `--date` 会报 `100003「指标 xxx 不支持参数 tradeDate; 指标 xxx 缺少必填参数 reportDate」`。哪些指标属于这一类看 `indicator search` 的 `parameterList`:`reportDate` 标 `required: true` 且列表里没有 `tradeDate` 的就是。利润表 / 资产负债表 / 现金流量表类(`is_*` 等)都在此列;行情与估值类(`qte_*` / `finc_*`)仍用 `--date` 即可。CLI 检测到你已为某指标传了 `tradeDate` 或 `reportDate` 就不再注入 `--date`,所以补上 `--indicator-param` 就能正常取数
|
|
@@ -140,7 +141,7 @@ gangtise indicator screener --indicator <F1:code> [--indicator <F2:code2>] \
|
|
|
140
141
|
- 文本:`contains` / `notcontains`(不区分大小写,**仅对 `dataType: string` 的指标有效**)
|
|
141
142
|
- 逻辑:`&&` `||`,分组 `(` `)`
|
|
142
143
|
- `--date`(**必选**):下发为**每个**指标的 `tradeDate`(已带 `tradeDate`/`reportDate` 的不覆盖)。绝大多数指标必填 `tradeDate`,漏传服务端报 `100001`,所以必填
|
|
143
|
-
- 🔴 **`parameterList` 里一个日期参数都没有的指标(`pty_*` / `scr_*` 静态属性两族、`div_cash_paid_ratio` / `div_cash_yr`、`pty_shr_reg`)必须显式声明「不要日期」**:写 `--indicator-param "F1:"`(冒号后什么都不写)。不写的话 `--date` 会给它注入 `tradeDate`,而这些指标不接受该参数,**整条请求**报 `100003 指标 xxx 不支持参数 tradeDate`。`F1:` 与真参数可组合,`div_cash_*` 要同时给 `F1:` 和 `F1:fiscalYear=2025`。这与 `cross-section` 的 `"code:"` 是同一个写法。注意只有**没有任何日期参数**的指标需要,报告期类(`is_*` 等)给 `F1:reportDate=...` 即可
|
|
144
|
+
- 🔴 **`parameterList` 里一个日期参数都没有的指标(`pty_*` / `scr_*` 静态属性两族、`div_cash_paid_ratio` / `div_cash_yr`、`pty_shr_reg`、`fund_main_code` / `fund_estb_dt`)必须显式声明「不要日期」**:写 `--indicator-param "F1:"`(冒号后什么都不写)。不写的话 `--date` 会给它注入 `tradeDate`,而这些指标不接受该参数,**整条请求**报 `100003 指标 xxx 不支持参数 tradeDate`。`F1:` 与真参数可组合,`div_cash_*` 要同时给 `F1:` 和 `F1:fiscalYear=2025`。这与 `cross-section` 的 `"code:"` 是同一个写法。注意只有**没有任何日期参数**的指标需要,报告期类(`is_*` 等)给 `F1:reportDate=...` 即可
|
|
144
145
|
- `--indicator-param`:格式是 **`F1:key=value`(按变量,不是按 code)**。引用了没绑定的变量会直接报错,不会静默丢弃
|
|
145
146
|
- `--expression` 里引用未绑定的变量,CLI **本地就拦**(不发请求、不计费);服务端也会报 `100003`
|
|
146
147
|
- **输出(宽表)**:同 `cross-section`,每行一只**命中**的证券,列为 `security / name / <各指标名>…`;无命中返回空表
|
|
@@ -370,6 +371,58 @@ gangtise indicator cross-section --indicator scr_indu_citic --indicator scr_indu
|
|
|
370
371
|
|
|
371
372
|
**`finc_pb_mrq`(市净率 MRQ)是日频指标**:每个交易日都有数且逐日变动,别按报告期末取(那会拿到几个月前的陈值)。
|
|
372
373
|
|
|
374
|
+
### 股东结构指标(`shr_*`)
|
|
375
|
+
|
|
376
|
+
`scopeList` 只有 **A 股**。两种日期口径,按 `parameterList` 区分:
|
|
377
|
+
|
|
378
|
+
| 维度 | 按交易日(`tradeDate`,取截至该日最新披露的值) | 按报告期(`reportDate`) |
|
|
379
|
+
| :--- | :--- | :--- |
|
|
380
|
+
| 股东户数 | `shr_hld` 股东户数、`shr_hld_tot` 股东总户数、`shr_hld_g_rti` / `shr_hld_tot_g_rti` 区间增长率(另需 `sDate`)、`shr_hld_chg_dt` 最新变更日期、`shr_hld_dcl_dt` 最新披露日期 | `shr_hld_rp`、`shr_hld_tot_rp` |
|
|
381
|
+
| 户均持股 | `shr_avg_qty` 数量、`shr_avg_pct` 比例、`shr_avg_qty_g_rti` / `shr_avg_pct_g_rti` 区间增长率(另需 `sDate`) | `shr_avg_qty_rp`、`shr_avg_pct_rp`;半年 / 季度增长率 `shr_avg_qty_hyrg_rp` / `shr_avg_qty_qtrg_rp` / `shr_avg_pct_hyrg_rp` / `shr_avg_pct_qtrg_rp`;`shr_avg_pct_chg_rp` 较上一报告期变化 |
|
|
382
|
+
| 前十大股东 | — | `shr_top10_hld_name` 名称、`shr_top10_hld_pct` 持股比例合计、`shr_top10_hld_qty` 持股数量合计 |
|
|
383
|
+
| 大股东(前十大里指定排名的一位) | — | `shr_top_hld_name` 名称、`shr_top_hld_pct` 持股比例、`shr_top_hld_qty` 持股数量、`shr_top_hld_cat` 类型、`shr_top_hld_typ` 性质、`shr_top_hld_ntr` 持股股本性质 |
|
|
384
|
+
|
|
385
|
+
- 🔴 **两个必填参数要显式传**,漏传报 `100001`:大股东系列的 `rank`(前十大股东里的排名,`1` = 第一大股东);户均持股系列的 `shareType`(`1` 流通股 / `2` 总股本)——`parameterList` 给 `shareType` 列了默认值 `1`,但仍须显式传
|
|
386
|
+
- 单只证券要前十大股东逐个明细,用 `fundamental top-holders`(免费);EDE 适合多证券批量取汇总值或第 N 大股东
|
|
387
|
+
|
|
388
|
+
```bash
|
|
389
|
+
gangtise indicator cross-section --indicator shr_top_hld_name --indicator shr_top_hld_pct \
|
|
390
|
+
--indicator-param "shr_top_hld_name:reportDate=2025-12-31" --indicator-param "shr_top_hld_name:rank=1" \
|
|
391
|
+
--indicator-param "shr_top_hld_pct:reportDate=2025-12-31" --indicator-param "shr_top_hld_pct:rank=1" \
|
|
392
|
+
--security 600519.SH --security 000001.SZ --date 2025-12-31
|
|
393
|
+
# 茅台 2025 年报第一大股东「中国贵州茅台酒厂(集团)有限责任公司」54.4038%
|
|
394
|
+
|
|
395
|
+
gangtise indicator cross-section --indicator shr_hld --indicator shr_avg_qty \
|
|
396
|
+
--indicator-param "shr_avg_qty:shareType=2" --security 600519.SH --date 2026-10-15
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### 基金指标
|
|
400
|
+
|
|
401
|
+
`--security` 传基金代码(场外 `.OF`,场内 `.SH` / `.SZ`,如 `005827.OF` / `510300.SH`)。
|
|
402
|
+
|
|
403
|
+
| 类别 | 指标 | 日期参数 |
|
|
404
|
+
| :-- | :-- | :-- |
|
|
405
|
+
| 基础属性与分类(`scopeList` 只有基金) | `fund_main_code` 基金主代码(A / C 等份额归到主份额,如 `000004.OF` → `000003.OF`)、`fund_estb_dt` 成立日期 | 没有日期参数,带 `--indicator-param "<code>:"` |
|
|
406
|
+
| | `fund_opr_st` 运行状态、`fund_cls1_typ` / `fund_cls2_typ` Gangtise 基金一级 / 二级分类、`fund_adj_nav` 复权单位净值 | `tradeDate`(`--date`) |
|
|
407
|
+
| 业绩与风险(区间指标,`sDate` 到 `tradeDate`) | 只有基金:`fund_calmar` 卡玛比率、`fund_ret_rank` 收益率同类排名(文本,如 `"5/120"`)/ `fund_ret_rank_pct` 排名百分位。股票与基金通用(部分也覆盖指数,看 `scopeList`):`finc_ann_ret` 年化收益率、`finc_avg_ret` / `finc_avg_ret_ann` 平均收益率、`finc_vol` / `finc_vol_ann` 波动率、`finc_intvl_max_dd` 区间最大回撤、`finc_sharpe` / `finc_sharpe_ann`、`finc_treynor` / `finc_treynor_ann`、`finc_jensen` / `finc_jensen_ann`、`finc_alpha`、`finc_beta`、`finc_corr` 相关系数、`finc_unsys_risk` 非系统风险 | `sDate`(`--indicator-param "<code>:sDate=..."`)+ `tradeDate`(`--date`) |
|
|
408
|
+
|
|
409
|
+
- 🔴 **区间指标的其余参数一律显式传**,漏传报 `100001`(`parameterList` 列了默认值也一样):`changePeriod` 变化周期、`yieldType`(`0` 普通 / `1` 对数收益率)、`riskFreeRate`(`0` = 常数 0)、`benchmarkCode` 基准代码(Alpha / Beta / 相关系数 / Jensen / Treynor / 非系统风险要)、`industryLevel`(同类排名按哪一级分类)。每个指标要哪几个以 `parameterList` 为准
|
|
410
|
+
- ⚠️ **`changePeriod` 列出的默认值 `6`(区间)不是每个指标都收**:Sharpe 等的 `description` 写明只支持日 / 周 / 月 / 年(`0` / `1` / `2` / `5`),传 `6` 报 `100003`
|
|
411
|
+
- `finc_intvl_max_dd` 返回负的百分数(`-19.23` 即 -19.23%),无回撤为 `0`;`fund_estb_dt` 返回 `yyyyMMdd` 整数(如 `20180905`),不是日期字符串
|
|
412
|
+
- 这批区间指标的 `scopeList` 标着「不支持指标时间序列接口」,用 `cross-section` 取
|
|
413
|
+
- 单只基金的净值序列、持仓、规模走 `fund` 命令组;EDE 适合多只基金横向比
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
gangtise indicator cross-section --indicator fund_cls2_typ --indicator fund_adj_nav \
|
|
417
|
+
--indicator finc_intvl_max_dd --indicator-param "finc_intvl_max_dd:sDate=2025-10-24" \
|
|
418
|
+
--security 005827.OF --security 510300.SH --date 2026-10-23
|
|
419
|
+
|
|
420
|
+
gangtise indicator cross-section --indicator finc_sharpe_ann \
|
|
421
|
+
--indicator-param "finc_sharpe_ann:sDate=2025-10-24" --indicator-param "finc_sharpe_ann:changePeriod=0" \
|
|
422
|
+
--indicator-param "finc_sharpe_ann:yieldType=0" --indicator-param "finc_sharpe_ann:riskFreeRate=0" \
|
|
423
|
+
--security 005827.OF --security 510300.SH --date 2026-10-23
|
|
424
|
+
```
|
|
425
|
+
|
|
373
426
|
## 取数最佳实践
|
|
374
427
|
|
|
375
428
|
- **先 search 做三项校验**:看 `indicatorName` + `description` 确认语义和口径,看 `scopeList` 确认覆盖全部目标市场 / 证券类型(并看 `usageRestriction` 有无接口限制),再看 `parameterList` 补齐必填参数(required)并核对专属参数**名称**与枚举(`adjustType`/`scale`/`currency` 等);任一不符就回退专用接口。**参数名一律以 search 返回的 `parameterList` 为准,不要照抄任何示例里的参数名**——参数名会随版本调整,写错会报 `100003` 并指出是哪个指标的哪个参数,按报错改即可。
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
## 内资机构观点 `insight opinion list/detail`
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
gangtise insight opinion list [--keyword <text>] [--research-area <id>] [--chief <id>] [--security <code>] [--broker <id>] [--industry <id>] [--concept <id>] [--llm-tag <tag>] [--source <src>] [--rank-type <n>] [--with-content]
|
|
41
|
+
gangtise insight opinion list [--keyword <text>] [--research-area <id>] [--chief <id>] [--security <code>] [--broker <id>] [--industry <id>] [--concept <id>] [--category <name>] [--llm-tag <tag>] [--broker-tag <tag>] [--source <src>] [--rank-type <n>] [--with-content]
|
|
42
42
|
gangtise insight opinion detail --chief-opinion-id <id> [--chief-opinion-id <id>...]
|
|
43
43
|
```
|
|
44
44
|
|
|
@@ -47,10 +47,18 @@ gangtise insight opinion detail --chief-opinion-id <id> [--chief-opinion-id <id>
|
|
|
47
47
|
- 🔴 **列表只含摘要**:`brief` 是正文前 200 字的截断,**1 积分/条**。要正文用 `detail` 按 `chiefOpinionId` 取(`content`,**30 积分/条**,按返回条数计);或 `list --with-content` 让列表直接带正文(30 积分/条)。只需判断相关性、做筛选时看 `brief` 就够,别默认加 `--with-content`
|
|
48
48
|
- `detail` 与 `--with-content` 都按返回条数计费,**超时 / 5xx 不自动重发**(重发可能对已交付的正文再计一次费),偶发失败自行重跑
|
|
49
49
|
- ⚠️ **`--with-content` 返回的是旧版结构**:标题与正文在 `contentList.title` / `contentList.content`(`contentList` 是对象,不是数组),顶层没有 `title` / `brief`。按 `content` 字段名取会取不到;要统一成 `detail` 的结构就走 `list` + `detail`
|
|
50
|
+
- ⚠️ **`--with-content` 的筛选项与默认列表不同**:不支持 `--category` / `--broker-tag`(同时传本地直接报错:旧版列表不认这两个字段,会按 30/条返回未经筛选的结果);`--llm-tag` 只收 `strongRcmd` / `earningsReview` / `topBroker` / `newFortune` 四个值,下面的投研业务标签除 `strongRcmd` 外传给它都报 `100005`。返回行也没有 `categoryList` / `brokerTagList`。既要按类别 / 标签筛、又要正文,走 `list` + `detail`
|
|
50
51
|
- `detail`:ID 可重复传或逗号分隔,CLI 去重后按 **20 个一批**自动拆分请求。**没有有效正文的 ID 不报错、直接跳过**(ID 写错时即如此;刚发布的观点也可能暂时取不到,稍后重取)。CLI 比对请求与返回,缺的 ID 列在 `missingIds`;某一批请求失败或返回异常时,已取到的正文(包括这一批里已返回的)照常输出,没取到的 ID 列在 `unfetchedIds`、原因在 `unfetchedError`,只需对这些 ID 重跑。两种情况都标 `partial`、**退出 3**
|
|
51
|
-
- 返回字段(list):`chiefOpinionId` / `publishTime` / `title` / `brief` / `author{chiefId, chiefName, researchAreaList, brokerID, brokerName}` / `securityList[]` / `industryList[]` / `conceptList[]` / `llmTagList
|
|
52
|
-
|
|
53
|
-
- `--
|
|
52
|
+
- 返回字段(list):`chiefOpinionId` / `publishTime` / `title` / `brief` / `author{chiefId, chiefName, researchAreaList, brokerID, brokerName}` / `securityList[]` / `industryList[]` / `conceptList[]` / `categoryList` / `llmTagList` / `brokerTagList`(三个标签字段取值同下方筛选项的英文标识,无标签时为 `[]`);`detail` 另加 `content`。`author.chiefId` / `chiefName` 在机构点评类观点上为 `null`
|
|
53
|
+
|
|
54
|
+
- `--category`(观点类别):`earningsReview` 业绩点评 | `abnormalReview` 异动点评 | `researchUpdate` 调研/访谈更新 | `tradingDesk` 交易台 | `industryAnalysis` 行业分析。一条观点可同时属于多个类别
|
|
55
|
+
- `--llm-tag`(投研业务标签):
|
|
56
|
+
- 推荐:`strongRcmd` 强烈推荐 | `undervalued` 低估值 | `highElasticity` 高弹性 | `highDividend` 高股息 | `reversal` 拐点/反转 | `bottom` 底部 | `beatExpect` 超预期 | `expectGap` 预期差 | `oversold` 错杀/超跌 | `targetPrice` 目标股价/市值 | `certainty` 确定性
|
|
57
|
+
- 业绩侧:`highGrowth` 高增 | `withProfitForecast` 含盈利预测 | `withGuidance` 含指引 | `marginalImprovement` 边际改善
|
|
58
|
+
- 产业链:`priceHike` 涨价 | `tightSupplyDemand` 供需趋紧 | `capacityRelease` 产能释放 | `newOrder` 新订单 | `orderSurge` 订单高增/大单 | `keyCustomer` 大客户 | `soleSupplier` 独供/一供 | `coreSupplier` 核心供应商 | `industryEntry` 产业导入
|
|
59
|
+
- 壁垒:`leader` 龙头 | `moat` 壁垒 | `scarcity` 稀缺性 | `breakthrough` 突破
|
|
60
|
+
- `--broker-tag`(机构标签):`topBroker` 头部券商 | `newFortune` 新财富团队
|
|
61
|
+
- 三个标签选项传非法值报 `100005`。**同一选项传多个值取并集**(命中任一即返回):`--llm-tag strongRcmd --llm-tag beatExpect` 是「强烈推荐或超预期」,不是「两者都有」;要两者都有,取回后按返回行的 `llmTagList` 自行过滤
|
|
54
62
|
- `--source`:`realTime` 实时 | `openSource` 开放来源
|
|
55
63
|
- `--industry`:用 `citicIndustry` 码 `1008001xx`;申万码 `104xx0000` 也生效,但**两套码的行业成分不同、取回的结果集不一致**,同一批查询别混用。`--research-area`:行业用 `citicIndustry` 码 `1008001xx`、方向用 `gangtiseIndustry` 码 `122000xxx`,**申万码在本端点返 0**。详见 `reference-and-lookup.md`
|
|
56
64
|
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
- **日期用「年在前」写法**:`YYYY-MM-DD`(首选)、`YYYY/MM/DD`、`YYYYMMDD` 三种 CLI 都收,并**统一归一成 `YYYY-MM-DD` 再发出**;时间加 `[ HH:mm[:ss]]`(秒可省、空格或 `T` 分隔)或用 10/13 位时间戳。🔴 **「年在后」写法(`01-07-2026`、`07/01/2026`)CLI 直接报 `ValidationError`,这是有意的**——接口本身会解析它,且**一律按美式「月在前」**(`01-07-2026` = 1 月 7 日,`07-01-2026` = 7 月 1 日)。按欧洲/国际习惯写 `01-07-2026` 想表达「7 月 1 日」的,会拿到差半年的数据且**不报错**;本地拒掉才有信号,还省一次请求与计费。绕过 CLI 直连接口时务必自己统一用 `YYYY-MM-DD`
|
|
42
42
|
- **财报接口的日期按「报告期末」过滤**,不是公告日:`fundamental balance-sheet` 等的 `--start-date`/`--end-date` 匹配的是 `endDate` 字段(如 `20200630`);公告日看 `earliestAnncDate`(首次公告日,做时点对齐用这个)而不是 `announcementDate`。**查某期财报要传季度末日期**(`2020-06-30` / `2020-03-31` / `2020-09-30` / `2020-12-31`);传 `2020-07-01` 这类非报告期日期会返回 0 行,属正常行为,不是没数据
|
|
43
43
|
- **非法证券代码**:`quote day-kline` / `realtime` / `minute-kline` / `fund-flow` 与 Fundamental 系都会报 `120001`,按报错核对后缀即可。⚠️ **三个已弃用的旧端点 `quote day-kline-hk` / `day-kline-us` / `index-day-kline` 则返回空结果**,与"该票该区间真无数据"无法区分——**用这三个拿到空结果时先回头核对代码后缀**。它们的能力已并入统一 `day-kline`(支持 A 股 / 港股 / 美股 / 沪深 ETF / 交易所指数 / 概念指数 `.GT` / 行业指数 `.CI` `.SWI` / 全球指数),新代码直接用 `day-kline`
|
|
44
|
-
- **枚举值拼错不一定报错**:`--search-type` / `--rank-type` 传非法值报 `100005`;但 `insight foreign-report --region` 写错区域码会返回全量、不报错,拿到「看着正常」的结果。⚠️ **「该端点根本没有这个参数」同样静默**:经 `raw call` 手写请求体时,传端点不支持的字段名(如给 `opinion` 传 `searchType`——它只有 `--rank-type`)会被丢弃、按未传处理,返回未经筛选的结果(专用命令对不存在的选项直接报 unknown option)。**CLI 本地拦截的**:全部 `--search-type` / `--rank-type`、全部 `--file-type`(`foreign-report` 为 1–4、其余 1–2)、`pamirs-summary` 与财报日历的 `--category` / `--market`、`--top` 上限、`reference securities-search` / `institution-search` / `official-account-search` 的 `--category`、`vault record-download` / `my-conference-download` 的 `--content-type`、`ai hot-topic --category`、`ai security-clue --source`。**其余取值(如 `foreign-report --region`、`--llm-tag`、`theme-tracking --type`)CLI
|
|
44
|
+
- **枚举值拼错不一定报错**:`--search-type` / `--rank-type` 传非法值报 `100005`;但 `insight foreign-report --region` 写错区域码会返回全量、不报错,拿到「看着正常」的结果。⚠️ **「该端点根本没有这个参数」同样静默**:经 `raw call` 手写请求体时,传端点不支持的字段名(如给 `opinion` 传 `searchType`——它只有 `--rank-type`)会被丢弃、按未传处理,返回未经筛选的结果(专用命令对不存在的选项直接报 unknown option)。**CLI 本地拦截的**:全部 `--search-type` / `--rank-type`、全部 `--file-type`(`foreign-report` 为 1–4、其余 1–2)、`pamirs-summary` 与财报日历的 `--category` / `--market`、`--top` 上限、`reference securities-search` / `institution-search` / `official-account-search` 的 `--category`、`vault record-download` / `my-conference-download` 的 `--content-type`、`ai hot-topic --category`、`ai security-clue --source`。**其余取值(如 `foreign-report --region`、`--llm-tag`、`theme-tracking --type`)CLI 不拦**(`opinion list` 的 `--category` / `--llm-tag` / `--broker-tag` 写错由服务端报 `100005`),写之前对照 `--help` 与对应命令文档核对拼写——**拼错的筛选条件会伪装成「结果正常」**
|
|
45
45
|
- **股票池写操作的单条失败不报错**:`vault stock-pool-add-stock` / `stock-pool-remove-stock` / `stock-pool-delete` 是逐条处理的,证券代码不存在这类单条失败仍返回成功信封(`code` 为 `000000`),失败明细在 `failList` 里。**CLI 已拦**:`failList` 非空时 stderr 列出失败项、结果标 `partial`、退出码 3。绕过 CLI 直连接口时要自己读 `failList`,别只看 `code`
|
|
46
46
|
- **`viewpoint-debate` 的观点过不了平台的敏感词检测时不会被提前拦截**——不返回 `240002`,而是照常受理、扣 20 积分、生成阶段才以 `410111` 失败;同样的内容重提仍会失败。**提交前自己把关措辞**
|
|
47
47
|
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
```
|
|
37
37
|
1. 路由 → insight opinion list
|
|
38
|
-
2. "最近" → Insight 默认 7 天;"AI" → --keyword AI
|
|
38
|
+
2. "最近" → Insight 默认 7 天;"AI" → --keyword AI(用户限定「业绩点评」「超预期」「头部券商」这类 → --category / --llm-tag / --broker-tag,取值见 commands/insight.md)
|
|
39
39
|
3. Pre-flight:模糊时间已映射,认证 OK,无歧义
|
|
40
40
|
4. gangtise insight opinion list \
|
|
41
41
|
--keyword AI \
|
|
@@ -20,8 +20,8 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
|
|
|
20
20
|
|
|
21
21
|
| 命令 | data 结构 | 关键提取字段 |
|
|
22
22
|
|------|----------|------------|
|
|
23
|
-
| insight opinion list | `{list, total}` | `list[].chiefOpinionId`(`detail` 用)/ `list[].title` / `list[].brief`(正文前 200 字)/ `list[].publishTime` / `list[].author{chiefId, chiefName, researchAreaList, brokerID, brokerName}`(机构点评类 `chiefId` / `chiefName` 为 `null`)/ `list[].securityList[]{securityCode, securityName}` / `list[].industryList[]{industryCode, industryName}` / `list[].conceptList[]{conceptId, conceptName}` / `list[].llmTagList` |
|
|
24
|
-
| insight opinion list --with-content | `{list, total}`(旧版结构) | 同上但**没有顶层 `title` / `brief`**;标题与正文在 `list[].contentList.title` / `list[].contentList.content`(对象,不是数组) |
|
|
23
|
+
| insight opinion list | `{list, total}` | `list[].chiefOpinionId`(`detail` 用)/ `list[].title` / `list[].brief`(正文前 200 字)/ `list[].publishTime` / `list[].author{chiefId, chiefName, researchAreaList, brokerID, brokerName}`(机构点评类 `chiefId` / `chiefName` 为 `null`)/ `list[].securityList[]{securityCode, securityName}` / `list[].industryList[]{industryCode, industryName}` / `list[].conceptList[]{conceptId, conceptName}` / `list[].categoryList` / `list[].llmTagList` / `list[].brokerTagList`(无标签为 `[]`) |
|
|
24
|
+
| insight opinion list --with-content | `{list, total}`(旧版结构) | 同上但**没有顶层 `title` / `brief`,也没有 `categoryList` / `brokerTagList`**;标题与正文在 `list[].contentList.title` / `list[].contentList.content`(对象,不是数组) |
|
|
25
25
|
| insight opinion detail | `{total, list}`;缺失时另有 `missingIds` / `unfetchedIds` / `unfetchedError` + `partial` | `list[]` 同 list 的字段 + `content`(正文全文) |
|
|
26
26
|
| insight summary list | `{list, total}` | `list[].summaryId` / `list[].title` / `list[].publishTime` |
|
|
27
27
|
| insight summary download | 文件路径(stdout) | — |
|
|
@@ -77,6 +77,9 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
|
|
|
77
77
|
| ai theme-tracking | `[{type, date, content}, ...]`(列表,每元素一份报告) | 遍历筛选 `type === "morning" / "night"`;某主题在该日期可能只有一种类型,或两种都没(空列表) |
|
|
78
78
|
| ai hot-topic | `{list, total}` | `list[].title` / `list[].reportDate` / `list[].category` / `list[].topics[].topicTitle` / `list[].topics[].driverEvent` / `list[].topics[].investLogic` |
|
|
79
79
|
| ai management-discuss-* | `{securityCode, reportDate, discussionDimension, content}` | `content` 为字符串(业绩会)或字符串数组(财报) |
|
|
80
|
+
| ai management-sentiment-indicator | `{list, total}`,一条 = 一只证券 × 一场业绩会 | `list[].securityCode` / `publishTime` / `sentimentResponsiveness` · `sentimentPolarity` · `sentimentConviction`(0–5)/ `qaCount` / `qaEvasionRatio` · `qaRiskRatio` · `qaUncertaintyRatio`(百分数)/ `questionCategoryList[]` / `source.sourceType` + `source.sourceId` |
|
|
81
|
+
| ai management-sentiment-conclusion | `{list, total}`,粒度同上 | `list[].sentimentSummary.{overallSentiment, questionCategorySentiment, qaSentimentChange}` / `sentimentSignal.*Signal`(文本)/ `qaSentimentContrast[]` / `source` / `previousSource`(无可对比的上一场时为 `null`) |
|
|
82
|
+
| ai management-sentiment-detail | `{list, total}`,一条 = 一条问答,不分页 | `list[].qaId` / `questionCategory` / `questionBrief` / `question` / `answer` / `qaResponsiveness` · `qaPolarity` · `qaConviction`(`5.0` / `2.5` / `0.0` 三档)/ 三组 `*Quote` + `*Reason` |
|
|
80
83
|
| ai earnings-review | `{dataId, status, hint}`(提交)/ `{dataId, status:"pending", hint}` 或 `{date, content}`(check) | `dataId` 用于轮询;最终 `content` 直接呈现 |
|
|
81
84
|
| ai viewpoint-debate | 同 earnings-review | — |
|
|
82
85
|
| vault drive-list | `{list, total}` | `list[].fileId`(下载用 `--file-id`)/ `list[].title` / `list[].fileType` / `list[].uploadTime` |
|
|
@@ -103,7 +106,7 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
|
|
|
103
106
|
| alternative edb-data | 列表,每行 `{date, <indicatorId>: value, ...}` 宽表 | `date` + 每个 `--indicator-id` 一列(该日指标值) |
|
|
104
107
|
| alternative concept-info | `{conceptId, conceptName, ...}`(单对象,**非列表**) | `conceptName` / `definition` / `investmentLogic` / `industrySpace` / `competitiveLandscape`;**`keyEvents[].date` / `keyEvents[].content` 仅 `--full`**;文本字段未配置为 `null` |
|
|
105
108
|
| alternative concept-securities | `{conceptId, conceptName, securityCount, securityDetail}`(单对象,分组) | `securityCount` / `securityDetail[].groupName` / `securityDetail[].securityList[].securityCode` / `.securityName` / `.isKey` / `.inclusionReason`(**这两列仅 `--full`**);无成分股时 `securityDetail` 为 `null` |
|
|
106
|
-
| bond basic-info / issuer-info / daily-quote / valuation / cash-flow / issuance-detail / rating-overview / rating-change / issuer-rating-change / issuance-plan / exercise-notice | 列式 `{fieldList, list, total}` → 规范化后 `{list: [{...}], total}` | 字段名按 `--field` 或全部;每条命令的默认列恒在最前(如 `securityCode` + `tradeDate`、`issuerName`、`issueDate`),见 `commands/bond.md` |
|
|
109
|
+
| bond basic-info / issuer-info / daily-quote / valuation / cash-flow / issuance-detail / rating-overview / rating-change / issuer-rating-change / issuance-plan / exercise-notice / default-list | 列式 `{fieldList, list, total}` → 规范化后 `{list: [{...}], total}` | 字段名按 `--field` 或全部;每条命令的默认列恒在最前(如 `securityCode` + `tradeDate`、`issuerName`、`issueDate`、`securityCode` + `defaultDate`),见 `commands/bond.md` |
|
|
107
110
|
| bond announcement | 列式 `{fieldList, list}`(**无 `total`**)→ 规范化后为行数组 | `announcementDate` / `securityCode` + 其余字段;翻过末页为 `[]` |
|
|
108
111
|
| fund basic-info | `{list}`(**无 `total`**、不分页)→ 行数组;代码不存在返回 `[]` | `[].fundCode` / `fundName` / `mainFundCode`(A/C 份额共用)/ `investTypeCodeLevel1` / `investTypeNameLevel1` / `…Level2` / `mgrComp` / `setupDate` / `operationMode` / `exchange`(场外为 `null`)/ `riskLevel` / `isIndexFund`(布尔)/ `trackIndexCode` / `trackIndexName` |
|
|
109
112
|
| fund nav | 同上 | `[].fundCode` / `tradeDate`(倒序)/ `navUnit` / `navAccumulated` / `adjustFactor` / `navAdjusted` / `mmfAnnualizedYield` / `mmfUnitYield`(后两列仅货币基金有值) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gangtise-openapi-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"description": "CLI for Gangtise OpenAPI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"commander": "^14.0.0",
|
|
40
|
-
"undici": "^7.
|
|
40
|
+
"undici": "^7.30.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^20.19.43",
|