gangtise-openapi-cli 0.30.1 → 0.32.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.
@@ -4,7 +4,21 @@
4
4
 
5
5
  时间格式:`"YYYY-MM-DD HH:mm:ss"`(datetime,需引号)。
6
6
 
7
- 支持 `--rank-type` 的命令:opinion / summary / research / foreign-report / announcement / announcement-hk / announcement-us / foreign-opinion / independent-opinion / official-account。
7
+ 支持 `--rank-type` 的命令:opinion / summary / **pamirs-summary** / research / foreign-report / announcement / announcement-hk / announcement-us / foreign-opinion / independent-opinion / official-account。
8
+
9
+ ⚠️ **`--rank-type` 的效果同时依赖 `--keyword` 和 `--search-type`,而且强弱按端点不同**(2026-08-08 全量实测三个端点 × 两种 searchType):
10
+
11
+ 下表三个端点是本次实测对象;**支持 `--rank-type` 的另外 8 个端点未验证**,别把结论外推过去。在这三个上,`--rank-type 2` 都是严格按 `publishTime` 倒序、稳定可依赖,差别全在 `1`(综合排序)上:
12
+
13
+ | 端点 | `--search-type 1`(标题) | `--search-type 2`(全文) |
14
+ | :--- | :--- | :--- |
15
+ | `pamirs-summary` | 与 `2` **完全相同**(结果集无并列时间戳) | 🔴 **真正的相关度重排**——`rank1` 对 `publishTime`/`summaryTime` 都不单调,`rank2` 的首条在 `rank1` 里排到第 118 位 |
16
+ | `summary` | 与 `2` 有差异,但 `rank1` **仍严格时间倒序**——差异只发生在时间戳并列处(`keyword=机器人` 前 200 条有 22 处并列) | 同左 |
17
+ | `research` | 与 `2` **完全相同** | 有差异,同样只在并列处(4 处并列) |
18
+
19
+ **没有 `--keyword` 时一律无差异**(综合排序无从计算),这不是参数失效。
20
+
21
+ 实用结论:**要"最相关"而不是"最新",三个实测端点里只有 `pamirs-summary --search-type 2` 真能做到**;`summary` / `research` 的 `rank-type 1` 至多改变同一时间戳内几条的先后,别指望它能把更相关的旧内容提到前面。未验证的端点按 `summary` 的保守预期对待,需要时自己按「跨 `searchType` × 全量取回 × 比 `total` 再比序列」复测。
8
22
  **不支持** `--rank-type` 的命令:roadshow / site-visit / strategy / forum(API 无此参数)。
9
23
 
10
24
  `--rank-type`:`1` 综合排序(默认)| `2` 时间倒序
@@ -36,6 +50,42 @@ gangtise insight summary download --summary-id <id> [--file-type <n>] [--output
36
50
  - `--category`:`earningsCall` 业绩会 | `strategyMeeting` 策略会 | `fundRoadshow` 基金路演 | `shareholdersMeeting` 股东大会 | `maMeeting` 并购会议 | `specialMeeting` 特别会议 | `companyAnalysis` 公司分析 | `industryAnalysis` 行业分析 | `other`
37
51
  - `--file-type`(download 可选):`1` 原始内容(默认)| `2` HTML 格式;**仅影响来源为会议平台的纪要**
38
52
 
53
+ ## 帕米尔纪要 `insight pamirs-summary list/download`
54
+
55
+ ```bash
56
+ gangtise insight pamirs-summary list [--search-type <n>] [--rank-type <n>] [--research-area <id>] [--security <code>] [--category <name>] [--market <name>]
57
+ gangtise insight pamirs-summary download --summary-id <id> [--file-type <n>] [--output <path>]
58
+ ```
59
+
60
+ 帕米尔(Pamirs)是平台内一个特殊牵头机构的**专家纪要库**,走独立端点,不是 `summary list` 的一个筛选项。⚠️ **需单独购买专家纪要数据库**,未购买调用报权限错误。**不限制历史数据范围**(不受 3 个月窗口约束)。
61
+
62
+ - **筛选项比 `summary` 少**:没有 `--source` / `--institution` / `--participant-role`。服务端会静默丢弃不认识的 body 字段,所以别照搬 `summary` 的参数,那样只会拿到没过滤的全量
63
+ - `--search-type`:`1` 标题搜索(默认)| `2` 全文搜索。实测 `--keyword PCB`:标题 36 条 vs 全文 113 条
64
+ - `--rank-type`:`1` 综合排序(默认)| `2` 时间倒序。⚠️ 效果依赖 `--keyword`,详见本文开头的公共说明;本端点是该结论的实测对象之一
65
+ - `--category`:`companyAnalysis` 公司分析 | `industryAnalysis` 行业分析(实测 2673 / 279)
66
+ - `--market`:`aShares` | `hkStocks` | `usChinaConcept` | `usStocks`
67
+ - `--research-area`:**citic(`1008001xx`)和申万(`104xx0000`)都生效**(实测食品饮料:citic 373 条 / 申万 145 条)——这点与多数 insight list 不同(那些的 `--research-area` 只吃 gangtise 码)
68
+ - `--file-type`(download 可选):`1` 原始文件(默认)| `2` HTML;**只有这两种**
69
+ - 单页上限 50(CLI 按此翻页;服务端实测未执行该上限,传 100 会返 100),省略 `--size` 自动翻页拉全量。翻页完整性实测干净:三页无重复无缺口、可重放、`total` 不漂移
70
+ - 返回字段:`summaryId` / `title` / `brief`(摘要)/ `summaryTime`(纪要注明的生成时间)/ `publishTime`(发布时间)/ `categoryList` / `securityList[]{securityCode, securityName}` / `researchAreaList[]{researchAreaId, researchAreaName}` / `conceptList[]{conceptId, conceptName}` / `marketList`
71
+ - ⚠️ **标签字段大面积不回填**(2026-08-08 实测 6 种查法 × 30 条):
72
+ - **`conceptList` 在所有查法下恒为空**(无过滤 / category / market / security / researchArea / keyword 全是 `[]`),而接口**没有** concept 过滤参数——所以**目前拿不到主题概念标签,没有变通办法**,别写依赖它的逻辑
73
+ - **`categoryList` 与 `marketList` 绑定在一起**:只要用 `--category` **或** `--market` 任一过滤,两个字段就都回填(30/30);其余查法(含无过滤、`--security`、`--research-area`、`--keyword`)两个都是空。回填的是该记录的**全部**值(多市场纪要按 `aShares` 过滤也回 `["aShares","hkStocks"]`,不是"回显过滤值")
74
+ - **所以别拉全量再本地分组**——标签会全丢。要按类别/市场分组就逐个枚举值各查一遍再合并(请求数放大 2~4 倍),或直接让服务端筛
75
+ - `researchAreaList`(抽 200 条 6% 空)和 `securityList`(10% 空)基本正常
76
+
77
+ ```bash
78
+ # 近一周的帕米尔纪要
79
+ gangtise insight pamirs-summary list --start-time 2026-08-01 --end-time 2026-08-07 --format table
80
+
81
+ # 全文搜 + 时间倒序,只要前 20 条
82
+ gangtise insight pamirs-summary list --keyword PCB --search-type 2 --rank-type 2 --size 20
83
+
84
+ # 下载 HTML(省略 --output 自动用标题命名)
85
+ gangtise insight pamirs-summary download --summary-id 5863771 --file-type 2
86
+ # → PCB钻针:高端钻针扩产有壁垒,供需紧缺会持续到28年.html
87
+ ```
88
+
39
89
  ## 路演 / 调研 / 策略会 / 论坛
40
90
 
41
91
  ```bash
@@ -53,7 +53,7 @@ gangtise quote realtime [--security <code>] [--field <name>]
53
53
  - 返回**最新时刻**的行情快照(最新价/开高低/涨跌/成交量额/振幅)
54
54
  - 非交易时间返回最近一个交易日的收盘快照;停牌证券返回停牌前最后一个有效快照
55
55
  - **实测全量字段(16 个,2026-07-24)**:`securityCode` `exchange` `tradeDate` `tradeTime` `open` `high` `low` `latestPrice` `preClose` `change` `pctChange` `volume` `amount` `turnoverRate` `amplitude` `volumeRatio`
56
- - **没有 `close`**——收盘价语义用 `latestPrice`(非交易时间即为收盘价),或改用 `quote day-kline` 的 `close`;**也没有市值**,总市值走 `indicator cross-section --indicator qte_mkt_cptl`(仅 A 股)
56
+ - **没有 `close`**——收盘价语义用 `latestPrice`(非交易时间即为收盘价),或改用 `quote day-kline` 的 `close`;**也没有市值**,总市值走 `indicator cross-section --indicator qte_mkt_cptl`(2026-08-03 起 A/港/美股均有数)
57
57
  - 字段速查:见 `references/fields.md` 中的"实时行情"小节
58
58
 
59
59
  ## A股资金流向 `quote fund-flow`
@@ -96,7 +96,7 @@ gangtise reference constant-category [--format json]
96
96
  | category | 名称 | 结构 | 用于参数 |
97
97
  |----------|------|------|---------|
98
98
  | `citicIndustry` | 中信一级行业(30,`1008001xx`) | flat | `--industry` 全命令通用首选(见下方说明) |
99
- | `swIndustry` | 申万一级行业(31,`104xxx`) | flat | `--industry`(仅 6 个 insight list;wechat 静默忽略,见下方说明) |
99
+ | `swIndustry` | 申万一级行业(31,`104xxx`) | flat | `--industry`(仅 6 个 insight list;`vault wechat-message-list` 的 `--industry` 当前两套码都不生效) |
100
100
  | `gangtiseIndustry` | Gangtise 行业(30 行业 `1008001xx` + 6 方向 `122000xxx`) | flat | `--research-area` 首选(含宏观/策略等方向,见下方说明) |
101
101
  | `domesticCity` | 国内城市(省级 ID) | flat | `--location`(roadshow / site-visit / strategy / forum)|
102
102
  | `aShareAnnouncementCategory` | A股公告分类 | tree(2 级) | `insight announcement --category` |
@@ -105,7 +105,7 @@ gangtise reference constant-category [--format json]
105
105
  | `regionCategory` | 区域分类 | flat | `insight foreign-report --region` |
106
106
 
107
107
  > **行业 / 研究方向过滤——选哪套 category(⭐ 权威口径,其他文件引用此处、勿重复枚举命令清单以免漂移;实测 + spec,2026-06-15):**
108
- > - **`--industry`(industryList)→ 用 `citicIndustry`(`1008001xx`)**:opinion / research / foreign-report / foreign-opinion / independent-opinion / official-account / wechat-message 全部正确过滤。`swIndustry`(`104xxx`)在 6 个 insight list(含 official-account)上等效(spec 多数命令写 citic+sw),但 **`vault wechat-message-list` 只认中信码、传申万码会静默返回全量** → 统一用中信码最稳。
108
+ > - **`--industry`(industryList)→ 用 `citicIndustry`(`1008001xx`)**:opinion / research / foreign-report / foreign-opinion / independent-opinion / official-account 正确过滤。⚠️ **`vault wechat-message-list` 例外——该命令的 `--industry` 当前两套码都不生效**(2026-08-08 复测,详见 `vault.md`)。`swIndustry`(`104xxx`)在 6 个 insight list(含 official-account)上等效(spec 多数命令写 citic+sw)→ 统一用中信码最稳。
109
109
  > - **`--research-area`(researchAreaList)→ 用 `gangtiseIndustry`**:完整研究方向分类 = 30 个行业(`1008001xx`,与 citicIndustry 相同)+ 6 个方向(宏观 `122000001` / 策略 `122000002` / 固收 `122000003` / 金工 `122000004` / 海外 `122000005` / 其他 `122000007`)。行业码与方向码均已实测正确过滤(opinion / summary / roadshow / site-visit / forum)。`citicIndustry` 也能用但只含行业、无方向;`swIndustry`(`104xxx`)除 summary / my-conference 外返 0,勿用。
110
110
 
111
111
  ## 常量值 `reference constant-list`
@@ -209,9 +209,9 @@ gangtise lookup meeting-org list # 会议/牵头机构全量(--instit
209
209
  | 银行 / 银行股 | 银行 | `104480000` | `821047.SWI` |
210
210
  | 汽车 / 新车 | 汽车 | `104280000` | `821036.SWI` |
211
211
 
212
- > ¹ 第 3 列是**申万码**(`104xxx`),仅在 opinion / research / foreign-report / foreign-opinion / independent-opinion / official-account 这 6 个 insight list 上作 `--industry` 等效;`vault wechat-message-list` 会静默返回全量、`--research-area` 返 0——通用/推荐的**中信码**(`1008001xx`)见 `references/lookup-ids.md` 中信表或 `constant-list --category citicIndustry`。
212
+ > ¹ 第 3 列是**申万码**(`104xxx`),仅在 opinion / research / foreign-report / foreign-opinion / independent-opinion / official-account 这 6 个 insight list 上作 `--industry` 等效;`--research-area` 返 0。`vault wechat-message-list` 的 `--industry` 与码表无关——**两套码都不生效**——通用/推荐的**中信码**(`1008001xx`)见 `references/lookup-ids.md` 中信表或 `constant-list --category citicIndustry`。
213
213
 
214
- > **参数名选择**:`--industry`(industryList,用 `citicIndustry` 码 `1008001xx`)用于 opinion / research / foreign-report / foreign-opinion / independent-opinion / official-account / wechat-message;`--research-area`(researchAreaList,用 `gangtiseIndustry` 码 = 行业 `1008001xx` + 方向 `122000xxx`)用于 opinion / summary / roadshow / site-visit / forum / my-conference;`--gts-code` 仅用于 `ai security-clue`(需申万格式 `821xxx.SWI`,不是数字 ID)。注意 strategy(线下策略会)无 `--research-area`,只按 `--institution` / `--location` 筛。
214
+ > **参数名选择**:`--industry`(industryList,用 `citicIndustry` 码 `1008001xx`)用于 opinion / research / foreign-report / foreign-opinion / independent-opinion / official-account(`vault wechat-message-list` 也有这个参数,但**当前不生效**,见 `vault.md`);`--research-area`(researchAreaList,用 `gangtiseIndustry` 码 = 行业 `1008001xx` + 方向 `122000xxx`)用于 opinion / summary / roadshow / site-visit / forum / my-conference;`--gts-code` 仅用于 `ai security-clue`(需申万格式 `821xxx.SWI`,不是数字 ID)。注意 strategy(线下策略会)无 `--research-area`,只按 `--institution` / `--location` 筛。
215
215
 
216
216
  > **"消费"歧义**:用户说"消费/大消费"覆盖多个子行业(食品饮料 `104340000` / 商贸零售 `104450000` / 社会服务 `104460000` / 家电 `104330000` / 纺织服饰 `104350000` / 美容护理 `104770000`),需向用户确认具体方向,或用 `--keyword 消费` 做宽泛搜索。
217
217
 
@@ -49,11 +49,11 @@ gangtise vault wechat-message-list [--keyword <text>] [--security <code>] [--wec
49
49
 
50
50
  - 数据权限:仅用户已绑定并激活群消息助理、且助理已入群的群消息
51
51
  - `--security`:按证券代码过滤(如 `000001.SZ`),可重复
52
- - `--industry`:行业 ID,**必须用中信码 `citicIndustry`(`1008001xx`)**;实测传申万码 `104xxx` 会被静默忽略、返回全量
52
+ - `--industry`:⚠️ **本命令上该过滤当前不生效**(2026-08-08 复测:不传 / 中信码 `100800111` / 申万码 `104340000` / 乱码,四种都返回同一个 total)。中信码和申万码都不起作用,需要按行业收窄时改在本地按返回内容筛
53
53
  - `--wechat-group-id`:先用 `vault wechat-chatroom-list` 查;可重复
54
54
  - `--category`:`text` | `image` | `documents` | `url`(可重复)
55
55
  - `--tag`:`roadShow` | `research` | `strategyMeeting` | `meetingSummary` | `industryComment` | `companyComment` | `earningsReview`(可重复)
56
- - 返回字段(实测 2026-07-25):`msgId` / **`content`**(正文)/ **`url`**(链接)/ `msgTime` / `wechatGroupId` / `wechatGroupName` / `speakerName` / `category` / `tagList[]{tagCode, tagName}` / `securityList[]{securityCode, securityName}` / `quoteMsg{quoteMsgId, quoteContent, quoteUrl}`。旧版本文档写作 `msgContent` / `contentUrl` 是错的,取值请用 `content` / `url`
56
+ - 返回字段(实测 2026-07-25):`msgId` / **`content`**(正文)/ **`url`**(链接)/ `msgTime` / `wechatGroupId` / `wechatGroupName` / `speakerName` / `category` / `tagList[]{tagCode, tagName}` / `securityList[]{securityCode, securityName}` / `quoteMsg{quoteMsgId, quoteContent, quoteUrl}`。正文取 `content`、链接取 `url`(不是 `msgContent` / `contentUrl`)
57
57
  - `quoteMsg`(2026-07-24 新增):被引用的消息,无引用时为 `null`;`quoteContent` / `quoteUrl` 也可能为空。做上下文还原时用它把「回复」接回原消息
58
58
  - 未打标签/未关联证券的消息,`tagList` / `securityList` 返回 `null`(不是空数组)
59
59
 
@@ -226,7 +226,7 @@
226
226
 
227
227
  **用户**:"把茅台、五粮液、宁德时代 2025 年营收和已实现 EPS,与最新 PE/PB 做成一张表"
228
228
 
229
- > 示例日期为**截至 2026-07-23 的实测快照**:`2026-07-22`=当时最新交易日、`2026-03-31`=当时最近有 PB 的报告期末;实跑时替换为当下的最新交易日 / 最近报告期末。
229
+ > 示例日期为**截至 2026-08-02 的实测快照**:`2026-07-31`=当时最新交易日。PE 与 PB 现在同为日频(`finc_pb_mrq` 2026-08-02 复测任意交易日都有数),实跑时替换为当下的最新交易日即可。
230
230
 
231
231
  ```
232
232
  1. 路由 → indicator:多证券批量取一组已实现财务 / 估值指标;不是逐只 fundamental,也不是 EDB。
@@ -241,23 +241,47 @@
241
241
  - scopeList:覆盖全部三只 A 股;缺失/null/空也视为不通过
242
242
  - parameterList:补 required 参数并核对枚举
243
243
  任一不符 → 回退相应专用接口。
244
- 3. 三类指标日期语义不同 → 拆三次截面,均加 `--key-by code`(列头用 indicatorCode,跨三张表按 code 稳定合并、免受同名/服务端重排干扰;省略 reportType 即取合并口径,label 与取数已一致:1=合并 2=合并(调整) 3=母公司 4=母公司(调整)):
244
+ 3. 两类指标日期语义不同 → 拆两次截面,均加 `--key-by code`(列头用 indicatorCode,跨表按 code 稳定合并、免受同名/服务端重排干扰;省略 reportType 即取合并口径,label 与取数已一致:1=合并 2=合并(调整) 3=母公司 4=母公司(调整)):
245
245
  a) 财务(营收/EPS)用报告期末 2025-12-31:
246
246
  gangtise indicator cross-section \
247
247
  --indicator is_op_rev --indicator is_eps_bas \
248
248
  --security 600519.SH --security 000858.SZ --security 300750.SZ \
249
249
  --date 2025-12-31 --key-by code --format json
250
- b) PE 日频,用最新交易日 2026-07-22(此日 PB 为 null,勿并入):
251
- gangtise indicator cross-section --indicator finc_pe_ttm \
250
+ b) 估值 PE + PB 同为日频,用同一个最新交易日即可(2026-08-02 复测 finc_pb_mrq
251
+ 在任意交易日都有数;用季末日期会拿到几个月前的陈值)。
252
+ ⚠️ 要估值指标的历史序列做分位/回测,两个接口都拉一遍交叉核:EDE 按正式财报
253
+ 披露日切换财报口径,fundamental valuation-analysis 按业绩快报切,同一天取到
254
+ 的值可能不同(已验证 PE TTM;PB 是 MRQ 口径,规则未单独验证)。详见 indicator.md:
255
+ gangtise indicator cross-section --indicator finc_pe_ttm --indicator finc_pb_mrq \
252
256
  --security 600519.SH --security 000858.SZ --security 300750.SZ \
253
- --date 2026-07-22 --key-by code --format json
254
- c) PB(MRQ) 只在报告期末打值,用最近报告期末 2026-03-31:
255
- gangtise indicator cross-section --indicator finc_pb_mrq \
256
- --security 600519.SH --security 000858.SZ --security 300750.SZ \
257
- --date 2026-03-31 --key-by code --format json
258
- 4. 按 security 合并三张宽表(列头即 indicatorCode,各取所需日期的值);不要把不同日期语义的指标塞进同一个 --date。
259
- 5. 计费:search 免费;三次取数各按请求单元格数量计费,每次不足 100 单元格按 100 计。
260
- 6. 无数据:单元格缺值返回 null 且不丢证券行;整个查询无数据返回空表(不再报 999999)——空表也可能是参数名/日期语义写错,先核对 parameterList、日期语义、scopeList 和公司类型。
257
+ --date 2026-07-31 --key-by code --format json
258
+ 4. 按 security 合并两张宽表(列头即 indicatorCode,各取所需日期的值);不要把不同日期语义的指标塞进同一个 --date。
259
+ 5. 计费:search 免费;两次取数各按请求单元格数量计费,每次不足 100 单元格按 100 计。
260
+ 6. 无数据(无覆盖 / 非交易日 / 未来日期)一律是单元格 null 且行列都在,退出码 0。整列/整行消失现在只意味着那个 code 服务端不认识——指标码拼错,或证券后缀错(美股用 .O/.N,不是 .US),CLI 会标 partial + 退出码 3 并在 stderr 列出。空表则是「一个 code 都没认出来」或参数名写错,先核对代码后缀与 parameterList。
261
+ ```
262
+
263
+ ## 例 15b:帕米尔专家纪要(新库,筛选项与踩坑都和 summary 不同)
264
+
265
+ **用户**:"看看帕米尔最近有什么 PCB 相关的纪要" / "帕米尔纪要下载一篇"
266
+
267
+ ```
268
+ 1. 确认走的是帕米尔而不是普通纪要——两者是不同的库,pamirs 需单独购买专家纪要数据库。
269
+ 用户没点名"帕米尔/Pamirs"就走 insight summary。
270
+ 2. 检索(全文 + 按相关度):
271
+ gangtise insight pamirs-summary list --keyword PCB --search-type 2 --rank-type 1 \
272
+ --size 20 --format json
273
+ - --search-type 2 = 全文(标题搜索是 1,命中少很多:PCB 标题 36 / 全文 113)
274
+ - --rank-type 1 只在「有 keyword + 全文」时才是真正的相关度排序;要最新就用 2
275
+ - 筛选项比 summary 少:没有 --source / --institution / --participant-role
276
+ 3. 🔴 别拉全量再本地按类别/市场分组——服务端只在你用该字段过滤时才回填标签:
277
+ 不带 --category 查,categoryList 100% 是空数组;conceptList 任何查法都是空。
278
+ 要分组就让服务端筛:
279
+ gangtise insight pamirs-summary list --category industryAnalysis --market aShares --size 50
280
+ 4. 下载(省略 --output 自动用标题命名):
281
+ gangtise insight pamirs-summary download --summary-id 5863771 --file-type 2
282
+ → PCB钻针:高端钻针扩产有壁垒,供需紧缺会持续到28年.html
283
+ --file-type 只有 1(原始)/ 2(HTML)两种
284
+ 5. 数据范围不限历史;单价未公布,大批量前先小量试。
261
285
  ```
262
286
 
263
287
  ## 例 16:A 股资金流向(个股 vs 全市场按日分片)
@@ -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 / wechat-message 都正确过滤;这套 ID 同时也是 `--research-area` 的行业部分(见下方研究方向)。
9
+ 完整列表用 `reference constant-list --category citicIndustry`。**`--industry` 全命令通用首选用这套(`1008001xx`)**——opinion / research / foreign-report / foreign-opinion / independent-opinion 都正确过滤(⚠️ `vault wechat-message-list` 例外,该命令的 `--industry` 当前两套码都不生效);这套 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` 会**静默返全量**——哪套码用于哪些命令的**权威口径见 `references/commands/reference-and-lookup.md`「行业 / 研究方向过滤——选哪套 category」**,勿在此重复枚举。拿不准就统一用上方中信码。
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」**,勿在此重复枚举。拿不准就统一用上方中信码。
34
34
 
35
35
  | ID | 行业 | ID | 行业 | ID | 行业 |
36
36
  |----|------|----|------|----|------|
@@ -2,7 +2,9 @@
2
2
 
3
3
  CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"` 解包,stdout 直接是 `data`。无 envelope 的响应原样透传。
4
4
 
5
- > 例外:`indicator`(EDE)三个接口成功时**双层信封**(`data` 里再裹一层 `{code, status, data}`),内层字段名为 `securityCodeList/securityNameList/indicatorCodeList/indicatorNameList/dataTypes`,`values` 是 2D 矩阵(截面 `[指标][证券]`、时序 `[序列][日期]`);无数据为 `null` 单元格。`indicator` 子命令已在客户端二次解包并拍平成宽表;但直接 `raw call indicator.*` 只会剥外层,需自行处理内层。
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
+ >
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.*` 只会剥外层,内层需自行处理。
6
8
 
7
9
  ## 通用模式(5 类)
8
10
 
@@ -21,6 +23,8 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
21
23
  | insight opinion list | `{list, total}` | `list[].id` / `list[].title` / `list[].publishDate` / `list[].chiefName` / `list[].securityCode` / `list[].institutionName` |
22
24
  | insight summary list | `{list, total}` | `list[].summaryId` / `list[].title` / `list[].publishTime` |
23
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` 任一过滤时才回填**(两者绑定,一起有或一起没有)。拉全量再本地分组会丢标签 |
27
+ | insight pamirs-summary download | 文件路径(stdout) | — |
24
28
  | insight roadshow / site-visit / strategy / forum list | `{list, total}` | `list[].id` / `list[].title` / `list[].publishTime` / `list[].institution.institutionName` |
25
29
  | insight research list | `{list, total}` | `list[].reportId` / `list[].title` / `list[].brief`(全文摘要) / `list[].publishTime` / `list[].publisher.brokerName` / `list[].securityList[].rating` |
26
30
  | insight research download | 文件路径(stdout) | — |
@@ -76,7 +80,7 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
76
80
  | vault record-download | 文件路径(stdout) | — |
77
81
  | vault my-conference-list | `{list, total}` | `list[].conferenceId` / `list[].title` / `list[].category` / `list[].institution.institutionName` / `list[].publishTime` |
78
82
  | vault my-conference-download | 文件路径(stdout) | — |
79
- | vault wechat-message-list | `{list, total}` | `list[].msgId` / `list[].content`(正文)/ `list[].url` / `list[].msgTime` / `list[].wechatGroupName` / `list[].speakerName` / `list[].category` / `list[].tagList[].tagCode` / `list[].securityList[].securityCode` / `list[].quoteMsg.quoteContent`(引用消息,无引用为 `null`)。**不是 `msgContent`/`contentUrl`**(旧文档笔误,实测 2026-07-25) |
83
+ | vault wechat-message-list | `{list, total}` | `list[].msgId` / `list[].content`(正文)/ `list[].url` / `list[].msgTime` / `list[].wechatGroupName` / `list[].speakerName` / `list[].category` / `list[].tagList[].tagCode` / `list[].securityList[].securityCode` / `list[].quoteMsg.quoteContent`(引用消息,无引用为 `null`)。**字段名是 `content` / `url`**,不是 `msgContent` / `contentUrl`(实测 2026-07-25) |
80
84
  | vault wechat-chatroom-list | `{list, total}` | `list[].chatroomName` / `list[].chatroomId` |
81
85
  | alternative edb-search | `{list: [...]}` 指标列表 | `indicatorId` / `indicatorName` / `dataSource` / `frequency` / `unit` |
82
86
  | alternative edb-data | 列表,每行 `{date, <indicatorId>: value, ...}` 宽表 | `date` + 每个 `--indicator-id` 一列(该日指标值) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gangtise-openapi-cli",
3
- "version": "0.30.1",
3
+ "version": "0.32.0",
4
4
  "description": "CLI for Gangtise OpenAPI",
5
5
  "license": "MIT",
6
6
  "repository": {