gangtise-openapi-cli 0.32.0 → 0.34.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.
@@ -37,7 +37,7 @@ gangtise vault my-conference-download --conference-id <id> --content-type <type>
37
37
 
38
38
  - `--category`:`earningsCall` 业绩会 | `strategyMeeting` 策略会 | `fundRoadshow` 基金路演 | `shareholdersMeeting` 股东大会 | `maMeeting` 并购会议 | `specialMeeting` 特别会议 | `companyAnalysis` 公司分析 | `industryAnalysis` 行业分析 | `other`(可重复)
39
39
  - `--source`:录制来源 `1`=企微会议助理 | `2`=会议服务微信群(可重复;不传返回全部)
40
- - `--keyword` vs `--research-area`:用户说"关于AI的"用 `--keyword AI`;说"电子行业的会议"用 `--research-area 100800126`(research-area 用 `gangtiseIndustry` 码 `1008001xx` + 方向 `122000xxx`,**不要用申万码 `104xxx`**)
40
+ - `--keyword` vs `--research-area`:用户说"关于AI的"用 `--keyword AI`;说"电子行业的会议"用 `--research-area 100800126`(行业用 `citicIndustry` 码 `1008001xx`、方向用 `gangtiseIndustry` 码 `122000xxx`,**不要用申万码 `104xx0000`**——本端点传申万码一律返 0 且不报错,食饮 / 电子 / 医药三个行业交叉验证过,换中信码即正常过滤)
41
41
  - `--content-type`(download **必选**):`asr` 语音识别 | `summary` AI 速记
42
42
  - 返回字段:`conferenceId` / `title` / `publishTime` / `category` / `institution{...}` / `security{...}` / `researchArea{...}` / `guest` / `sourceList`(录制来源,`1`/`2`)
43
43
 
@@ -49,7 +49,8 @@ gangtise vault wechat-message-list [--keyword <text>] [--security <code>] [--wec
49
49
 
50
50
  - 数据权限:仅用户已绑定并激活群消息助理、且助理已入群的群消息
51
51
  - `--security`:按证券代码过滤(如 `000001.SZ`),可重复
52
- - `--industry`:⚠️ **本命令上该过滤当前不生效**(2026-08-08 复测:不传 / 中信码 `100800111` / 申万码 `104340000` / 乱码,四种都返回同一个 total)。中信码和申万码都不起作用,需要按行业收窄时改在本地按返回内容筛
52
+ - `--industry`:**只认中信码**(`1008001xx`,见 `reference constant-list --category citicIndustry`)。⚠️ 申万码(`104xx0000`)和任何不认识的值都会被**静默忽略、返回未过滤的全量**,不报错——所以别混用码表,拿到的条数与不加过滤一样时先核对码系。返回行里不含行业标签字段,过滤在服务端完成
53
+ - 🔴 **`--industry` 是收窄工具,不是全量召回**:行业标签由服务端标注,**同一条消息可能挂多个行业,也可能一个都没挂**。实测同一个关键词加上「本行业」过滤后,命中数掉到三到四成——**少掉的既有没打标签的,也有被标到相邻行业去的**(如半导体相关的消息在计算机 / 机械 / 通信下同样查得到)。所以「按行业筛出 N 条」不能读成「该行业只有 N 条」;要尽量全,用 `--keyword` 取回后本地判断,或把相邻行业码一起查再去重
53
54
  - `--wechat-group-id`:先用 `vault wechat-chatroom-list` 查;可重复
54
55
  - `--category`:`text` | `image` | `documents` | `url`(可重复)
55
56
  - `--tag`:`roadShow` | `research` | `strategyMeeting` | `meetingSummary` | `industryComment` | `companyComment` | `earningsReview`(可重复)
@@ -74,13 +74,13 @@
74
74
  **用户**:"比亚迪 A 股和港股最近的日 K 线"
75
75
 
76
76
  ```
77
- 1. 路由 → quote day-kline + quote day-kline-hk(跨市场需分别调用)
77
+ 1. 路由 → quote day-kline(2026-08-14 起一个命令覆盖 A/港/美股,跨市场可一次查完)
78
78
  2. 比亚迪 A 股 002594.SZ,港股 01211.HK
79
79
  "最近" → K 线默认今日往前 45 天(保证含最近 10 个交易日)
80
80
  3. Pre-flight:认证 OK
81
- 4. gangtise quote day-kline --security 002594.SZ --start-date 2026-03-19 --end-date 2026-05-03 --format json
82
- gangtise quote day-kline-hk --security 01211.HK --start-date 2026-03-19 --end-date 2026-05-03 --format json
83
- 5. 合并两次结果,按 tradeDate 取尾部最近 10 个交易日
81
+ 4. gangtise quote day-kline --security 002594.SZ --security 01211.HK --start-date 2026-03-19 --end-date 2026-05-03 --format json
82
+ 5. 按 securityCode 分组,各自按 tradeDate 取尾部最近 10 个交易日
83
+ 注意:两地交易日历不同(A 股与港股假期不重合),同一日期未必两边都有行——按 securityCode 分组后再取尾部,别按行下标对齐
84
84
  ```
85
85
 
86
86
  ## 例 6:指数最近值(务必拉范围)
@@ -88,10 +88,10 @@
88
88
  **用户**:"查上证综指最近的指数"
89
89
 
90
90
  ```
91
- 1. 路由 → quote index-day-kline
91
+ 1. 路由 → quote day-kline(指数已并入,index-day-kline 已下线)
92
92
  2. 上证综指 → 000001.SH;"最近" → 今日往前 45 天
93
93
  3. Pre-flight:认证 OK;今天若周末 end-date 仍填当天,API 返回最近交易日
94
- 4. gangtise quote index-day-kline --security 000001.SH --start-date 2026-03-19 --end-date 2026-05-03 --format json
94
+ 4. gangtise quote day-kline --security 000001.SH --start-date 2026-03-19 --end-date 2026-05-03 --format json
95
95
  5. 按 tradeDate 取尾部最近 10 个交易日。**不要用 --limit 20**(截取的是窗口开头)
96
96
  ```
97
97
 
@@ -257,7 +257,7 @@
257
257
  --date 2026-07-31 --key-by code --format json
258
258
  4. 按 security 合并两张宽表(列头即 indicatorCode,各取所需日期的值);不要把不同日期语义的指标塞进同一个 --date。
259
259
  5. 计费:search 免费;两次取数各按请求单元格数量计费,每次不足 100 单元格按 100 计。
260
- 6. 无数据(无覆盖 / 非交易日 / 未来日期)一律是单元格 null 且行列都在,退出码 0。整列/整行消失现在只意味着那个 code 服务端不认识——指标码拼错,或证券后缀错(美股用 .O/.N,不是 .US),CLI 会标 partial + 退出码 3 并在 stderr 列出。空表则是「一个 code 都没认出来」或参数名写错,先核对代码后缀与 parameterList。
260
+ 6. 无数据(无覆盖 / 非交易日 / 未来日期)一律保留行列并给占位单元格,退出码 0——但占位值多数是 null、个别指标(如 is_dnrpnp)是 0,0 会穿过比较与聚合,别当真值(见 commands/indicator.md)。代码写错或参数名写错则直接报 100003 并点名是哪个(指标码拼错、证券后缀错如美股写成 .US、参数名写错、同 code 重复配置),按报错改即可。
261
261
  ```
262
262
 
263
263
  ## 例 15b:帕米尔专家纪要(新库,筛选项与踩坑都和 summary 不同)
@@ -6,9 +6,9 @@
6
6
 
7
7
  ## Quote 行情
8
8
 
9
- ### 日K线(A股 `quote day-kline` / 港股 `quote day-kline-hk` / 美股 `quote day-kline-us`)
9
+ ### 日K线 `quote day-kline`(A股 / 港股 / 美股 / 各类指数;旧的 `day-kline-hk` / `day-kline-us` 已下线,字段相同)
10
10
 
11
- 三者字段相同(货币单位随市场:A股=元、港股=港元、美股=美元):
11
+ 各市场字段相同(货币单位随市场:A股=元、港股=港元、美股=美元;**指数为点位、无货币单位,且 `adjustFactor` 恒为 `null`**):
12
12
 
13
13
  | 字段 | 含义 | 字段 | 含义 |
14
14
  |------|------|------|------|
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## 中信行业分类(--industry 参数)
8
8
 
9
- 完整列表用 `reference constant-list --category citicIndustry`。**`--industry` 全命令通用首选用这套(`1008001xx`)**——opinion / research / foreign-report / foreign-opinion / independent-opinion 都正确过滤(⚠️ `vault wechat-message-list` 例外,该命令的 `--industry` 当前两套码都不生效);这套 ID 同时也是 `--research-area` 的行业部分(见下方研究方向)。
9
+ 完整列表用 `reference constant-list --category citicIndustry`(30 条)。**`--industry` 全命令通用首选用这套(`1008001xx`)**——opinion / research / foreign-report / official-account 都正确过滤,`vault wechat-message-list` 也认这一套(⚠️ 两个例外:`insight foreign-opinion` / `independent-opinion` 传了 `--industry` 拿不到数据、且 **payload 是字面 `null` 不是空 list**);这套 ID 同时也是 `--research-area` **行业维度唯一全端点通吃的一套**(见下方研究方向)。
10
10
 
11
11
  | ID | 行业 | ID | 行业 |
12
12
  |----|------|----|------|
@@ -30,7 +30,7 @@
30
30
 
31
31
  ## 申万行业(--industry 参数)
32
32
 
33
- 完整列表用 `reference constant-list --category swIndustry`。⚠️ 申万码(`104xxx`)只在**部分** insight list 上作 `--industry` 等效、**不能用于 `--research-area`(返 0)**;`vault wechat-message-list` 的 `--industry` **两套码都不生效**(连不存在的码也返全量,该过滤整个被忽略)——哪套码用于哪些命令的**权威口径见 `references/commands/reference-and-lookup.md`「行业 / 研究方向过滤——选哪套 category」**,勿在此重复枚举。拿不准就统一用上方中信码。
33
+ 完整列表用 `reference constant-list --category swIndustry`(31 条)。⚠️ 申万码(`104xx0000`)只在**部分** insight list 上可作 `--industry` 使用,且**与中信码不等效**——两套码行业成分不同,实测 opinion 与 official-account 上取回的结果集就对不上(同一行业相差约 2%–5%),别混用;用于 `--research-area` 时**只有 `summary` / `pamirs-summary` 认,其余端点返 0**(不报错,与传乱码表现一致)。`vault wechat-message-list` 的 `--industry` **只认中信码**,传申万码会被静默忽略并返回全量——哪套码用于哪些命令的**权威口径见 `references/commands/reference-and-lookup.md`「行业 / 研究方向过滤——选哪套 category」**(含逐端点实测矩阵),勿在此重复枚举。拿不准就统一用上方中信码。
34
34
 
35
35
  | ID | 行业 | ID | 行业 | ID | 行业 |
36
36
  |----|------|----|------|----|------|
@@ -109,9 +109,11 @@
109
109
 
110
110
  ## 常用研究方向(--research-area 参数)
111
111
 
112
- `--research-area` 用 **gangtiseIndustry**:= 30 个行业(`1008001xx`,与上方「中信行业分类」表完全相同)+ 6 个方向。完整列表用 `reference constant-list --category gangtiseIndustry`。适用 opinion / summary / roadshow / site-visit / forum / my-conference(strategy 无此参数)。
112
+ `--research-area` 吃两个维度:**行业**用上方「中信行业分类」表的 `1008001xx`(category `citicIndustry`),**方向**用下表的 `122000xxx`(category `gangtiseIndustry`)。适用 opinion / summary / pamirs-summary / roadshow / site-visit / forum / my-conference(strategy 无此参数)。
113
113
 
114
- **6 个研究方向(gangtiseIndustry 独有,citicIndustry 没有,已实测正确过滤):**
114
+ ⚠️ **`gangtiseIndustry` 里只有下面这 6 条方向码,不含任何行业码**——`constant-list --category gangtiseIndustry` 返回的就是 6 条,去它那里找「食品饮料」找不到,行业码要查 `citicIndustry`。
115
+
116
+ **6 个研究方向(citicIndustry 没有,已实测正确过滤):**
115
117
 
116
118
  | ID | 方向 | ID | 方向 |
117
119
  |----|------|----|------|
@@ -119,7 +121,7 @@
119
121
  | 122000003 | 固收 | 122000004 | 金工 |
120
122
  | 122000005 | 海外 | 122000007 | 其他 |
121
123
 
122
- 30 个行业的 ID 直接用上方「中信行业分类」表(`1008001xx`)。⚠️ **申万码 `104xxx` 不能用于 `--research-area`**(除 summary / my-conference 的 spec 例外,其余返 0)。
124
+ 行业维度的 ID 直接用上方「中信行业分类」表(`1008001xx`),这是唯一在全部 7 个端点上都生效的一套。⚠️ **申万码 `104xx0000` 用于 `--research-area` 只有 `summary` / `pamirs-summary` 认**,opinion / roadshow / site-visit / forum / my-conference 一律返 0(与传乱码表现一致,不报错)。反过来方向码 `122000xxx` 在 `pamirs-summary` 上返 0。完整实测矩阵见 `commands/reference-and-lookup.md`。
123
125
 
124
126
  ---
125
127
 
@@ -4,7 +4,7 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
4
4
 
5
5
  > 例外:`indicator`(EDE)四个接口(`search` / `cross-section` / `time-series` / `screener`)成功时**双层信封**(`data` 里再裹一层 `{code, status, data}`)。内层字段名 2026-08-01 起为 `securityCodeList` / `securityNameList` / `indicatorList[{code,name,dataType}]`(screener 另带 `field`),`values` 是 2D 矩阵:**截面与 screener 为 `[证券][指标]`**(该版转置过,此前是 `[指标][证券]`)、时序仍为 `[序列][日期]`。
6
6
  >
7
- > **缺数据 vs 代码写错**(2026-08-08 实测):无数据 / 无覆盖一律是单元格 `null`,行列都保留。仍会整列 / 整行消失的只有**服务端解析不了的 code**——指标 code 拼错,或证券 code 后缀错(美股是 `.O`/`.N`,`AAPL.US` 会整行消失)。请求里没有任何可解析 code 时才是全空数组。CLI 的 `indicator` 子命令已二次解包、拍平成宽表,并在整列/整行被略过时标 `partial` + `omittedIndicators`/`omittedSecurities` + 退出码 3——**这个信号现在读作「有 code 写错了」**。**`screener` 例外**:把缺列的变量当作无法求值,按表达式的**布尔结构**判断是否还有分支能成立(`A && B` 要两边、`A || B` 只要一边)。一条都不剩 → **退出码 1 且不输出**(那些行以「通过了该条件」的名义呈现,而条件根本无法证明被执行过);仍有分支可求值、或缺的只是输出用的辅助变量 → `partial` + 退出码 3。直接 `raw call indicator.*` 只会剥外层,内层需自行处理。
7
+ > **缺数据 vs 代码写错**(2026-08-15 实测):无数据 / 无覆盖一律保留行列并给占位单元格——**多数指标是 `null`,个别(如 `is_dnrpnp`)是 `0`,`0` 会穿过比较与聚合,详见 `commands/indicator.md`**。**代码写错则直接报 `100003` 并点名**(指标 code 拼错 →「指标 xxx 不存在」;证券 code 后缀错 →「xxx 不是有效证券或者板块ID」,美股是 `.O`/`.N` 不是 `.US`),**无论同批有没有正确的 code 都会报**。CLI 的 `indicator` 子命令已二次解包、拍平成宽表;`partial` + `omittedIndicators`/`omittedSecurities` + 退出码 3 的差集检测仍保留作兜底,但当前服务端行为下基本收不到样本。**`screener` 例外**:把缺列的变量当作无法求值,按表达式的**布尔结构**判断是否还有分支能成立(`A && B` 要两边、`A || B` 只要一边)。一条都不剩 → **退出码 1 且不输出**(那些行以「通过了该条件」的名义呈现,而条件根本无法证明被执行过);仍有分支可求值、或缺的只是输出用的辅助变量 → `partial` + 退出码 3。直接 `raw call indicator.*` 只会剥外层,内层需自行处理。
8
8
 
9
9
  ## 通用模式(5 类)
10
10
 
@@ -23,7 +23,7 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
23
23
  | insight opinion list | `{list, total}` | `list[].id` / `list[].title` / `list[].publishDate` / `list[].chiefName` / `list[].securityCode` / `list[].institutionName` |
24
24
  | insight summary list | `{list, total}` | `list[].summaryId` / `list[].title` / `list[].publishTime` |
25
25
  | insight summary download | 文件路径(stdout) | — |
26
- | insight pamirs-summary list | `{list, total}` | `list[].summaryId` / `list[].title` / `list[].brief` / `list[].summaryTime`(纪要生成时间)/ `list[].publishTime`(发布时间)/ `list[].securityList[]{securityCode, securityName}` / `list[].researchAreaList[]{researchAreaId, researchAreaName}` / `list[].conceptList[]{conceptId, conceptName}` / `list[].categoryList` / `list[].marketList`。⚠️ 标签字段大面积不回填:`conceptList` **在所有查法下恒为空**(接口也没有 concept 过滤参数,拿不到);`categoryList` 与 `marketList` **只在用 `--category` 或 `--market` 任一过滤时才回填**(两者绑定,一起有或一起没有)。拉全量再本地分组会丢标签 |
26
+ | insight pamirs-summary list | `{list, total}` | `list[].summaryId` / `list[].title` / `list[].brief` / `list[].summaryTime`(纪要生成时间)/ `list[].publishTime`(发布时间)/ `list[].securityList[]{securityCode, securityName}` / `list[].researchAreaList[]{researchAreaId, researchAreaName}` / `list[].conceptList[]{conceptId, conceptName}` / `list[].categoryList` / `list[].marketList`。⚠️ `conceptList` / `categoryList` / `marketList` 三个标签字段**稀疏,且是否有值随记录和查法而变**:不带筛选时经常整条为空,用 `--category` 或 `--market` 任一过滤时回填率明显更高(这两个字段绑定,一起有或一起没有)。所以**别拉全量再本地分组**(会漏记录),也**别据此断言某条记录没有该属性**(为空只说明这次没回填)。详见 `commands/insight.md` |
27
27
  | insight pamirs-summary download | 文件路径(stdout) | — |
28
28
  | insight roadshow / site-visit / strategy / forum list | `{list, total}` | `list[].id` / `list[].title` / `list[].publishTime` / `list[].institution.institutionName` |
29
29
  | insight research list | `{list, total}` | `list[].reportId` / `list[].title` / `list[].brief`(全文摘要) / `list[].publishTime` / `list[].publisher.brokerName` / `list[].securityList[].rating` |
@@ -56,11 +56,11 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
56
56
  | reference concept-search | `{returnedCount, list}` | `list[].conceptId` / `list[].conceptName` / `list[].matchScore` |
57
57
  | reference sector-search | `{returnedCount, list}` | `list[].sectorId` / `list[].sectorName` / `list[].hierarchy`(层级路径) / `list[].matchScore` |
58
58
  | reference sector-constituents | `{total, list}` | `list[].gtsCode` / `list[].gtsName`;total=0 说明 sectorId 不对(先 sector-search 确认) |
59
- | quote day-kline / day-kline-hk / day-kline-us / index-day-kline | `{fieldList, list}` 或规范化后 `{list: [{...}]}` | `tradeDate` / `securityCode` / `open` / `close` / `pctChange` / `volume`;index 另含 `securityName`(指数名称,v0.15.0 起) |
59
+ | quote day-kline(及已下线的 day-kline-hk / day-kline-us / index-day-kline) | `{fieldList, list}` 或规范化后 `{list: [{...}]}` | `tradeDate` / `securityCode` / `open` / `close` / `pctChange` / `volume` / `adjustFactor`(指数为 `null`);`index-day-kline` 另含 `securityName`(指数名称,v0.15.0 起) |
60
60
  | quote minute-kline | `{list: [{...}]}` | `tradeTime` / `open` / `close` / `volume` |
61
61
  | quote realtime | `{fieldList, list, total}` 或规范化后 `{list: [{...}]}` | `securityCode` / `exchange` / `tradeDate` / `tradeTime` / `open` / `high` / `low` / `latestPrice` / `preClose` / `change` / `pctChange` / `volume` / `amount` / `turnoverRate` / `amplitude` / `volumeRatio`(共 16 个,**无 `close`、无市值**) |
62
62
  | quote fund-flow | `{fieldList, list, total}` 列式 → 规范化后 `{list: [{...}], total}` 宽表 | `securityCode` / `tradeDate` + 请求的字段(`mainNetInflow` / `largeInflow` / `xlargeOutflow` / …) |
63
- | fundamental income-statement / balance-sheet / cash-flow(含 quarterly / -hk / -us) | `{total, list: [{...}]}` | `fiscalYear` / `period` / `endDate` / `companyName` / `companyType` / `currency` / `unit` + 各 `--field` 字段;港股/美股另含 `timeCovered`(不规则跨度)。⚠️ **A 股累计口径的 `balance-sheet` / `cash-flow` 两个命令**,`companyType` 与 `currency` 的值是互换的(实测 2026-07-24:`companyType=人民币`、`currency=银行`/`一般企业`;A 股 `income-statement` 正确,港股/美股三表均正确);A 股 `*-quarterly` 单季表则是 `companyType` 返回未映射的数字码(如 `102119999`)、`currency` 正确。读这两列按**值**判断语义,别按列名;科目数字不受影响 |
63
+ | fundamental income-statement / balance-sheet / cash-flow(含 quarterly / -hk / -us) | `{total, list: [{...}]}` | `fiscalYear` / `period` / `endDate` / `companyName` / `companyType` / `currency` / `unit` + 各 `--field` 字段;港股/美股另含 `timeCovered`(不规则跨度)。⚠️ A 股 `*-quarterly` 单季表的 `companyType` 返回未映射的数字码(如 `102119999`),`currency` 正常;累计口径的三张表两列均正确。科目数字不受影响 |
64
64
  | fundamental main-business | `{fieldList, list}` 列式 → 规范化后 `{list: [{...}]}` | 前 3 列恒定:`periodName` / `periodEndDate` / `categoryName`(分项名,随 `--breakdown` 变)+ `opRevenue` / `opRevenueYoy` / `opRevenueRatio` / `opCost` / `opCostYoy` / `opCostRatio` / `grossProfit` / `grossProfitYoy` / `grossProfitRatio` / `grossMargin` / `grossMarginYoy` / `grossMarginRatio`(共 15 个,实测 2026-07-24)。`--field` 只能从后 12 个里选 |
65
65
  | fundamental valuation-analysis(仅 A 股) | `{fieldList, list}` 列式 → 规范化后 `{list: [{...}]}` | `tradeDate` / `value` / `percentileRank` / `average` / `median` / `upper1Std` / `lower1Std`(共 7 个,实测 2026-07-24);**无 `securityCode`**——误传会拿到一列重复的 `tradeDate` |
66
66
  | fundamental earning-forecast(仅 A 股) | `{securityCode, securityName, updateList: [...]}` | `updateList[].date` / `updateList[].fieldList[].forecastYear` + 各 consensus 指标 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gangtise-openapi-cli",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "description": "CLI for Gangtise OpenAPI",
5
5
  "license": "MIT",
6
6
  "repository": {