gangtise-openapi-cli 0.27.0 → 0.28.1

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.
@@ -182,7 +182,7 @@
182
182
  gangtise ai earnings-review-check --data-id xxx --format json
183
183
  - 若 {status: "pending"} → 再等再 check(最多 3 次)
184
184
  - 若 {date, content} → 取 content 呈现
185
- - 若 410111 终态失败,告知用户重试
185
+ - 若 410111(新码 140002)→ 终态失败,**不要重提同一任务**(会再扣 50 积分且结果相同);改参数后再提交,或直接告知用户该期数据暂不可用
186
186
  ```
187
187
 
188
188
  ## 例 13:题材画像 + 成分股(先查 ID 再拉两接口)
@@ -222,37 +222,42 @@
222
222
  5. 呈现:total + 前 20 只列表
223
223
  ```
224
224
 
225
- ## 例 15:指标取数(search cross-section / time-series)
226
-
227
- **用户**:"茅台和泡泡玛特上周的收盘价、成交量对比一下"
228
-
229
- ```
230
- 1. 路由 → indicator(证券级指标,需证券代码 → EDE,不是 alternative edb)
231
- 2. 先拿 indicatorCode(绝不猜):
232
- gangtise indicator search --keyword 收盘价 --format table → qte_close
233
- gangtise indicator search --keyword 成交量 --format table → qte_vol
234
- 3. 取数二选一:
235
- - 单日横向对比 cross-section(多指标 × 多证券):
236
- gangtise indicator cross-section \
237
- --indicator qte_close --indicator qte_vol \
238
- --security 600519.SH --security 09992.HK \
239
- --date 2026-05-22 --format table
240
- 每行一只证券,列 = date/security/name/日收盘价/成交量
241
- - 一段区间走势 time-series(这里两只证券 → 只能单指标 × 多证券):
242
- gangtise indicator time-series --indicator qte_close \
243
- --security 600519.SH --security 09992.HK \
244
- --start-date 2026-05-18 --end-date 2026-05-22 --format table
245
- 每行一个日期,列 = date/贵州茅台/泡泡玛特
246
- 4. 复权:要前复权收盘价加 --indicator-param "qte_close:adjustmentType=2"
247
- (参数 key 以 indicator search --format json 的 parameterList 为准)
248
- 5. 陷阱:time-series 不能多指标 × 多证券同时(报 410001),那种情况用 cross-section
249
- 6. 必填参数:很多指标默认调用会缺参报错(服务端指明缺哪个,如「必填参数 periodNum 不能为空」)→ 先看 parameterList 的 required,补
250
- periodNum(N期统计)/startDate(区间周期类,如 qte_amp_mo)/fiscalYear(年度分红):
251
- gangtise indicator cross-section --indicator finc_roe_avg_avg --security 600519.SH \
252
- --date 2026-03-31 --indicator-param "finc_roe_avg_avg:periodNum=4"
253
- 7. 无数据:截面/时序对无此科目的**格**返回 null(不丢行);**整个查询无数据**(节假日/未来日期/未覆盖标的)
254
- 仍报 999999+HTTP 500,CLI 不重试并提示检查条件 → 财务用报告期末、现金流附注用年报
255
- 日期(2025-12-31)、行情用交易日;银行/券商/保险科目不同,换对公司类型。详见 commands/indicator.md
225
+ ## 例 15:多证券已实现财务 / 估值指标(EDE 多截面,按日期语义拆分)
226
+
227
+ **用户**:"把茅台、五粮液、宁德时代 2025 年营收和已实现 EPS,与最新 PE/PB 做成一张表"
228
+
229
+ > 示例日期为**截至 2026-07-23 的实测快照**:`2026-07-22`=当时最新交易日、`2026-03-31`=当时最近有 PB 的报告期末;实跑时替换为当下的最新交易日 / 最近报告期末。
230
+
231
+ ```
232
+ 1. 路由 indicator:多证券批量取一组已实现财务 / 估值指标;不是逐只 fundamental,也不是 EDB。
233
+ 若改成单票、盈利预测/一致预期、估值历史分位、完整报表或 OHLCV/K 线,则分别走 fundamental / quote 专用命令。
234
+ 2. 每个概念都先 search --format json(绝不猜 code,也不能只取第一条):
235
+ gangtise indicator search --keyword 营业收入 --limit 10 --format json
236
+ gangtise indicator search --keyword 基本每股收益 --limit 10 --format json
237
+ gangtise indicator search --keyword 市盈率 --limit 10 --format json
238
+ gangtise indicator search --keyword 市净率 --limit 10 --format json
239
+ 对每个候选同时核对:
240
+ - indicatorName + description:累计/单季、营业收入/营业总收入、已实现/预测等语义准确
241
+ - scopeList:覆盖全部三只 A 股;缺失/null/空也视为不通过
242
+ - parameterList:补 required 参数并核对枚举
243
+ 任一不符 回退相应专用接口。
244
+ 3. 三类指标日期语义不同 拆三次截面(省略 reportType 即取合并口径;⚠️ 该枚举 label 与实测不符、value=2/4 会 999999,需指定报表口径改用 fundamental income-statement --report-type):
245
+ a) 财务(营收/EPS)用报告期末 2025-12-31:
246
+ gangtise indicator cross-section \
247
+ --indicator is_op_rev --indicator is_eps_bas \
248
+ --security 600519.SH --security 000858.SZ --security 300750.SZ \
249
+ --date 2025-12-31 --format json
250
+ b) PE 日频,用最新交易日 2026-07-22(此日 PB 为 null,勿并入):
251
+ gangtise indicator cross-section --indicator finc_pe_ttm \
252
+ --security 600519.SH --security 000858.SZ --security 300750.SZ \
253
+ --date 2026-07-22 --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 --format json
258
+ 4. 按 security 合并三张宽表(各取所需日期的值);不要把不同日期语义的指标塞进同一个 --date。
259
+ 5. 计费:search 免费;三次取数各按请求单元格数量计费,每次不足 100 单元格按 100 计。
260
+ 6. 无数据:单元格缺值返回 null 且不丢证券行;整个查询无数据仍可能报 999999,先核对日期语义、scopeList、公司类型和指标参数。
256
261
  ```
257
262
 
258
263
  ## 例 16:A 股资金流向(个股 vs 全市场按日分片)
@@ -55,8 +55,8 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
55
55
  | quote fund-flow | `{fieldList, list, total}` 列式 → 规范化后 `{list: [{...}], total}` 宽表 | `securityCode` / `tradeDate` + 请求的字段(`mainNetInflow` / `largeInflow` / `xlargeOutflow` / …) |
56
56
  | fundamental income-statement / balance-sheet / cash-flow(含 quarterly / -hk / -us) | `{total, list: [{...}]}` | `fiscalYear` / `period` / `endDate` / `companyName` / `companyType`(企业类型名称,如 `一般企业`/`银行`)+ 各 `--field` 字段;港股/美股另含 `timeCovered`(不规则跨度) |
57
57
  | fundamental main-business | `{list: [{...}]}` | `endDate` / `breakdownName` / `revenue` / `revenueRatio` / `grossProfitRatio` |
58
- | fundamental valuation-analysis | `{list: [{...}]}` | `tradeDate` / `value` / `percentileRank` |
59
- | fundamental earning-forecast | `{securityCode, securityName, updateList: [...]}` | `updateList[].date` / `updateList[].fieldList[].forecastYear` + 各 consensus 指标 |
58
+ | fundamental valuation-analysis(仅 A 股) | `{list: [{...}]}` | `tradeDate` / `value` / `percentileRank` |
59
+ | fundamental earning-forecast(仅 A 股) | `{securityCode, securityName, updateList: [...]}` | `updateList[].date` / `updateList[].fieldList[].forecastYear` + 各 consensus 指标 |
60
60
  | fundamental top-holders | `{holderType, list: [{...}]}` | `reportPeriod` / `rank` / `shareholderName` / `holdingNum` / `holdingPct` / `chgNum` / `chgPct` |
61
61
  | ai knowledge-batch | `{list: [{...}]}` | `list[].resourceType` / `list[].sourceId` / `list[].title` / `list[].summary` |
62
62
  | ai security-clue | `{list, total}` | `list[].securityCode` / `list[].title` / `list[].clueType` / `list[].clueDate` |
@@ -79,7 +79,7 @@ CLI 自动处理 envelope:`{code, msg, data}` 信封会按 `code === "000000"`
79
79
  | alternative edb-data | 列表,每行 `{date, <indicatorId>: value, ...}` 宽表 | `date` + 每个 `--indicator-id` 一列(该日指标值) |
80
80
  | alternative concept-info | `{conceptId, conceptName, ...}`(单对象,**非列表**) | `conceptName` / `definition` / `investmentLogic` / `industrySpace` / `competitiveLandscape` / `keyEvents[].date` / `keyEvents[].content`;文本字段未配置为 `null` |
81
81
  | alternative concept-securities | `{conceptId, conceptName, securityCount, securityDetail}`(单对象,分组) | `securityCount` / `securityDetail[].groupName` / `securityDetail[].securityList[].securityCode` / `.securityName` / `.isKey` / `.inclusionReason`;无成分股时 `securityDetail` 为 `null` |
82
- | indicator search | `[{indicatorCode, indicatorName, ...}]`(列表) | `indicatorCode` / `indicatorName` / `description` / `scope` / `parameterList[].paramKey` / `.enumList[].value`(专属参数及枚举) / `score` |
82
+ | indicator search | `[{indicatorCode, indicatorName, ...}]`(列表) | `indicatorCode` / `indicatorName` / `description` / `scopeList[].market` / `scopeList[].securityType` / `parameterList[].paramKey` / `.enumList[].value`(专属参数及枚举) / `score` |
83
83
  | indicator cross-section | CLI 拍平为宽表 `{list, total}` | `list[].date` / `list[].security` / `list[].name` + 每个指标名一列;**单日多指标 × 多证券**,每行一只证券 |
84
84
  | indicator time-series | CLI 拍平为宽表 `{list, total}` | `list[].date` + 序列列:单证券时列=各指标、多证券时列=各证券;每行一个日期 |
85
85
  | lookup broker-org / meeting-org list | `[...]` | `[].id` / `[].name` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gangtise-openapi-cli",
3
- "version": "0.27.0",
3
+ "version": "0.28.1",
4
4
  "description": "CLI for Gangtise OpenAPI",
5
5
  "license": "MIT",
6
6
  "repository": {