echopai 2.1.0 → 2.3.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.
@@ -143,79 +143,155 @@ export const OPERATIONS = {
143
143
  ]
144
144
  }
145
145
  },
146
- "auth.whoami": {
147
- "cliKey": "auth.whoami",
148
- "cliName": "auth whoami",
146
+ "announcements.detail": {
147
+ "cliKey": "announcements.detail",
148
+ "cliName": "announcements detail",
149
149
  "method": "GET",
150
- "path": "/v1/auth/whoami",
151
- "description": "Returns the calling token's kind, scopes, audience, app metadata,\nrate_limit, allowed_clients, agent_budget (if kind=agent), api_version,\nfeature_flags. Any valid JWT can call — no specific scope required.\n\nCLI/MCP call this once at startup, cache 5 minutes in-process, and use\nthe response to derive `verbs.available` (intersection of curated verb\nscopes with token scopes) and to populate `echopai doctor` checks.\n\nSee `docs/PLAN_CLI_V2_AGENT_SURFACE.md` §5.1.\n",
152
- "summary": "Token introspection (CLI/MCP capability discovery)",
153
- "positional": [],
150
+ "path": "/v1/announcements/{announcement_id}",
151
+ "description": "返回公告完整内容:content_md、content_text、cninfo 元数据、解析状态。",
152
+ "summary": "Fetch a single announcement by id",
153
+ "positional": [
154
+ "announcement_id"
155
+ ],
154
156
  "outputDefault": "json",
155
157
  "pagination": "none",
156
158
  "stream": false,
157
- "billable": false,
159
+ "billable": true,
158
160
  "idempotencyRequired": false,
159
- "scopesAny": [],
161
+ "scopesAny": [
162
+ "announcements:read"
163
+ ],
160
164
  "sideEffect": "read",
161
165
  "dryRunSupported": false,
162
166
  "inputSchema": {
163
167
  "type": "object",
164
- "properties": {},
165
- "additionalProperties": false
168
+ "properties": {
169
+ "announcement_id": {
170
+ "type": "string",
171
+ "format": "uuid",
172
+ "description": "UUID(feed / stock 返回的 items[].id)。"
173
+ }
174
+ },
175
+ "additionalProperties": false,
176
+ "required": [
177
+ "announcement_id"
178
+ ]
166
179
  }
167
180
  },
168
- "backtest.excess-distribution": {
169
- "cliKey": "backtest.excess-distribution",
170
- "cliName": "backtest excess-distribution",
181
+ "announcements.feed": {
182
+ "cliKey": "announcements.feed",
183
+ "cliName": "announcements feed",
171
184
  "method": "GET",
172
- "path": "/v1/backtest/excess-distribution",
173
- "description": "信号相对基准(沪深 300 / 中证 1000 等)持有期超额收益的直方分布。",
174
- "summary": "Excess-return distribution over a benchmark",
185
+ "path": "/v1/announcements/feed",
186
+ "description": "A 股公告 feed,按 published_at 降序、同日按 cninfo source_id 降序。可按 type / since 过滤。需要 `announcements:read` scope。",
187
+ "summary": "List recent A-share announcements",
175
188
  "positional": [],
176
189
  "outputDefault": "json",
177
- "pagination": "none",
190
+ "pagination": "offset",
178
191
  "stream": false,
179
- "billable": false,
192
+ "billable": true,
180
193
  "idempotencyRequired": false,
181
- "scopesAny": [],
194
+ "scopesAny": [
195
+ "announcements:read"
196
+ ],
182
197
  "sideEffect": "read",
183
198
  "dryRunSupported": false,
184
199
  "inputSchema": {
185
200
  "type": "object",
186
- "properties": {},
201
+ "properties": {
202
+ "since": {
203
+ "type": "string",
204
+ "format": "date-time",
205
+ "description": "ISO datetime 下限(published_at >= since)。"
206
+ },
207
+ "type": {
208
+ "type": "string",
209
+ "maxLength": 64,
210
+ "description": "分类 slug(见 classifier.py TYPES,如 annual_report、equity_change)。"
211
+ },
212
+ "limit": {
213
+ "type": "integer",
214
+ "minimum": 1,
215
+ "maximum": 200,
216
+ "default": 50,
217
+ "description": "Max items per page."
218
+ },
219
+ "offset": {
220
+ "type": "integer",
221
+ "minimum": 0,
222
+ "default": 0,
223
+ "description": "Pagination offset (items to skip)."
224
+ }
225
+ },
187
226
  "additionalProperties": false
188
227
  }
189
228
  },
190
- "backtest.rolling-win-rate": {
191
- "cliKey": "backtest.rolling-win-rate",
192
- "cliName": "backtest rolling-win-rate",
229
+ "announcements.stock": {
230
+ "cliKey": "announcements.stock",
231
+ "cliName": "announcements stock",
193
232
  "method": "GET",
194
- "path": "/v1/backtest/rolling-win-rate",
195
- "description": "信号在滚动窗口(默认 60 个交易日)内的胜率时间序列。",
196
- "summary": "Rolling win rate of a signal series",
233
+ "path": "/v1/announcements/stock",
234
+ "description": "指定股票代码的公告列表(含历史窗口)。代码接受 6 位纯数字或 SSE:600519 / SZSE:000001 / BSE:430000 形式。需要 `announcements:read` scope。",
235
+ "summary": "List announcements for a specific A-share security",
197
236
  "positional": [],
198
237
  "outputDefault": "json",
199
- "pagination": "none",
238
+ "pagination": "offset",
200
239
  "stream": false,
201
- "billable": false,
240
+ "billable": true,
202
241
  "idempotencyRequired": false,
203
- "scopesAny": [],
242
+ "scopesAny": [
243
+ "announcements:read"
244
+ ],
204
245
  "sideEffect": "read",
205
246
  "dryRunSupported": false,
206
247
  "inputSchema": {
207
248
  "type": "object",
208
- "properties": {},
209
- "additionalProperties": false
249
+ "properties": {
250
+ "code": {
251
+ "type": "string",
252
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
253
+ "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
254
+ "example": "SSE:600519"
255
+ },
256
+ "since_days": {
257
+ "type": "integer",
258
+ "minimum": 1,
259
+ "maximum": 1825,
260
+ "default": 30,
261
+ "description": "回看天数(最多 5 年)。"
262
+ },
263
+ "type": {
264
+ "type": "string",
265
+ "maxLength": 64,
266
+ "description": "分类 slug 过滤(与 /v1/announcements/feed 同集合)。"
267
+ },
268
+ "limit": {
269
+ "type": "integer",
270
+ "minimum": 1,
271
+ "maximum": 200,
272
+ "default": 50,
273
+ "description": "Max items per page."
274
+ },
275
+ "offset": {
276
+ "type": "integer",
277
+ "minimum": 0,
278
+ "default": 0,
279
+ "description": "Pagination offset (items to skip)."
280
+ }
281
+ },
282
+ "additionalProperties": false,
283
+ "required": [
284
+ "code"
285
+ ]
210
286
  }
211
287
  },
212
- "backtest.summary": {
213
- "cliKey": "backtest.summary",
214
- "cliName": "backtest summary",
288
+ "auth.whoami": {
289
+ "cliKey": "auth.whoami",
290
+ "cliName": "auth whoami",
215
291
  "method": "GET",
216
- "path": "/v1/backtest/summary",
217
- "description": "信号回测汇总:胜率、平均超额收益、Sharpe-like 评分、最大回撤等。",
218
- "summary": "Backtest summary metrics for a signal series",
292
+ "path": "/v1/auth/whoami",
293
+ "description": "Returns the calling token's kind, scopes, audience, app metadata,\nrate_limit, allowed_clients, agent_budget (if kind=agent), api_version,\nfeature_flags. Any valid JWT can call — no specific scope required.\n\nCLI/MCP call this once at startup, cache 5 minutes in-process, and use\nthe response to derive `verbs.available` (intersection of curated verb\nscopes with token scopes) and to populate `echopai doctor` checks.\n\nSee `docs/PLAN_CLI_V2_AGENT_SURFACE.md` §5.1.\n",
294
+ "summary": "Token introspection (CLI/MCP capability discovery)",
219
295
  "positional": [],
220
296
  "outputDefault": "json",
221
297
  "pagination": "none",
@@ -255,8 +331,8 @@ export const OPERATIONS = {
255
331
  "properties": {
256
332
  "code": {
257
333
  "type": "string",
334
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
258
335
  "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
259
- "description": "Single canonical code.",
260
336
  "example": "SSE:600519"
261
337
  },
262
338
  "from": {
@@ -306,7 +382,9 @@ export const OPERATIONS = {
306
382
  "type": "array",
307
383
  "items": {
308
384
  "type": "string",
309
- "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$"
385
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
386
+ "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
387
+ "example": "SSE:600519"
310
388
  },
311
389
  "minItems": 1,
312
390
  "maxItems": 100,
@@ -359,8 +437,8 @@ export const OPERATIONS = {
359
437
  "properties": {
360
438
  "code": {
361
439
  "type": "string",
440
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
362
441
  "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
363
- "description": "Single canonical code.",
364
442
  "example": "SSE:600519"
365
443
  },
366
444
  "date": {
@@ -403,7 +481,9 @@ export const OPERATIONS = {
403
481
  "type": "array",
404
482
  "items": {
405
483
  "type": "string",
406
- "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$"
484
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
485
+ "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
486
+ "example": "SSE:600519"
407
487
  },
408
488
  "minItems": 1,
409
489
  "maxItems": 20,
@@ -432,67 +512,135 @@ export const OPERATIONS = {
432
512
  ]
433
513
  }
434
514
  },
435
- "digest.get": {
436
- "cliKey": "digest.get",
437
- "cliName": "digest get",
515
+ "concepts.alerts": {
516
+ "cliKey": "concepts.alerts",
517
+ "cliName": "concepts alerts",
438
518
  "method": "GET",
439
- "path": "/v1/digest/{code}",
440
- "description": "Composite endpoint: in one HTTP call returns views (PRIMARY research),\nresearch-entity performance (quality layer), real-time quote, market\nsentiment context, and supplementary news. Partial-failure tolerant:\neach bucket is independently fetched and per-bucket failures surface\nin `meta.partial_failures[]` rather than poisoning the response. If\nevery sub-bucket fails the endpoint returns 502.\n\nBucket scopes are checked *per bucket* (not at gateway level): a\ntoken with only `views:read` gets the views bucket populated and the\nrest reported as `scope_insufficient` partial failures. This mirrors\nthe CLI fan-out contract exactly so `echopai digest` can either call\nthis endpoint (preferred, single round-trip) or fall back to local\nfan-out without behavior drift.\n\nSee `docs/PLAN_CLI_V2_AGENT_SURFACE.md` §3.3 (digest spec) and §11\nPhase 5.2 (server endpoint).\n",
441
- "summary": "One-shot research digest for a single security (composite)",
442
- "positional": [
443
- "code"
519
+ "path": "/v1/concepts/alerts",
520
+ "description": "Returns the live `concept_alerts:active` hash. Two rules:\n - big_move: abs(pct_change) > 3%\n - limit_up_cluster: limit_up_count >= 3 AND stock_count >= 5\nSee PLAN_CONCEPT_INDUSTRY_QUOTE §5.5 \"异动检测与推送\".\n",
521
+ "summary": "Currently active concept alerts (big_move / limit_up_cluster)",
522
+ "positional": [],
523
+ "outputDefault": "json",
524
+ "pagination": "none",
525
+ "stream": false,
526
+ "billable": false,
527
+ "idempotencyRequired": false,
528
+ "scopesAny": [
529
+ "quote:l1",
530
+ "quote:l2",
531
+ "quote:delayed"
444
532
  ],
533
+ "sideEffect": "read",
534
+ "dryRunSupported": false,
535
+ "inputSchema": {
536
+ "type": "object",
537
+ "properties": {},
538
+ "additionalProperties": false
539
+ }
540
+ },
541
+ "concepts.alerts-history": {
542
+ "cliKey": "concepts.alerts-history",
543
+ "cliName": "concepts alerts-history",
544
+ "method": "GET",
545
+ "path": "/v1/concepts/alerts/history",
546
+ "description": "Concept异动 historical events (default last 24h). Filter by rule (big_move / limit_up_cluster) and time window. Used by AI agent / admin review.",
547
+ "summary": "Concept alerts history (last 24h)",
548
+ "positional": [],
445
549
  "outputDefault": "json",
446
550
  "pagination": "none",
447
551
  "stream": false,
448
- "billable": true,
552
+ "billable": false,
449
553
  "idempotencyRequired": false,
450
- "scopesAny": [],
554
+ "scopesAny": [
555
+ "quote:l1",
556
+ "quote:l2",
557
+ "quote:delayed"
558
+ ],
451
559
  "sideEffect": "read",
452
560
  "dryRunSupported": false,
453
561
  "inputSchema": {
454
562
  "type": "object",
455
563
  "properties": {
456
- "code": {
457
- "type": "string",
458
- "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
459
- "description": "Canonical security code, e.g. SSE:600519."
460
- },
461
- "views_since_days": {
564
+ "from": {
462
565
  "type": "integer",
463
- "minimum": 1,
464
- "maximum": 90,
465
- "default": 7,
466
- "description": "Views lookback in days (1-90)."
566
+ "description": "Unix ms; default = now - 24h"
467
567
  },
468
- "news_hours": {
568
+ "to": {
469
569
  "type": "integer",
470
- "minimum": 1,
471
- "maximum": 168,
472
- "default": 24,
473
- "description": "News lookback in hours (1-168)."
570
+ "description": "Window end. For daily/minute bars: ISO date `YYYY-MM-DD`. For alerts history: Unix milliseconds (default = now)."
474
571
  },
475
- "limit_per_bucket": {
572
+ "rule": {
573
+ "type": "string",
574
+ "enum": [
575
+ "big_move",
576
+ "limit_up_cluster"
577
+ ],
578
+ "description": "Filter by alert rule: big_move (|pct| > 3%) or limit_up_cluster (≥3 limit-ups & ≥5 stocks)."
579
+ },
580
+ "limit": {
476
581
  "type": "integer",
477
582
  "minimum": 1,
478
- "maximum": 50,
479
- "default": 10,
480
- "description": "Per-bucket item cap for views / news (1-50)."
583
+ "maximum": 2000,
584
+ "default": 500,
585
+ "description": "Maximum number of items to return."
586
+ }
587
+ },
588
+ "additionalProperties": false
589
+ }
590
+ },
591
+ "concepts.daily-bars": {
592
+ "cliKey": "concepts.daily-bars",
593
+ "cliName": "concepts daily-bars",
594
+ "method": "GET",
595
+ "path": "/v1/concepts/{concept_id}/daily-bars",
596
+ "description": "Returns daily OHLC (concept index points, not stock prices average),\nbreadth fields, and is_backfilled flag. See PLAN §5.4 algorithm.\n",
597
+ "summary": "Concept index daily bars (chain-linked equal-weight, base 1000)",
598
+ "positional": [
599
+ "concept_id"
600
+ ],
601
+ "outputDefault": "json",
602
+ "pagination": "none",
603
+ "stream": false,
604
+ "billable": true,
605
+ "idempotencyRequired": false,
606
+ "scopesAny": [
607
+ "bars:read"
608
+ ],
609
+ "sideEffect": "read",
610
+ "dryRunSupported": false,
611
+ "inputSchema": {
612
+ "type": "object",
613
+ "properties": {
614
+ "concept_id": {
615
+ "type": "integer",
616
+ "description": "Concept primary key (PG concepts.id)."
617
+ },
618
+ "from": {
619
+ "type": "string",
620
+ "format": "date",
621
+ "description": "Window start. For daily/minute bars: ISO date `YYYY-MM-DD`. For alerts history: Unix milliseconds (default = now - 24h)."
622
+ },
623
+ "to": {
624
+ "type": "string",
625
+ "format": "date",
626
+ "description": "Window end. For daily/minute bars: ISO date `YYYY-MM-DD`. For alerts history: Unix milliseconds (default = now)."
481
627
  }
482
628
  },
483
629
  "additionalProperties": false,
484
630
  "required": [
485
- "code"
631
+ "concept_id",
632
+ "from",
633
+ "to"
486
634
  ]
487
635
  }
488
636
  },
489
- "financials.pit": {
490
- "cliKey": "financials.pit",
491
- "cliName": "financials pit",
637
+ "concepts.list": {
638
+ "cliKey": "concepts.list",
639
+ "cliName": "concepts list",
492
640
  "method": "GET",
493
- "path": "/v1/financials/pit",
494
- "description": "基于 TDX 财务数据的 Point-in-time 查询。给定 `code` `date`,返回该\n`trade_date` 当时市场上可见的最新一期财务报告(`announce_date <= date`,\n无公告日时保守延迟 90 天)。专为回测、AI agent、量化策略防未来函数泄漏。\n\n返回字段包括:EPS(基本/扣非/稀释)、BPS、ROE、毛利率、营收/净利润/总资产/\n归母权益等核心 ~25 字段。\n",
495
- "summary": "Point-in-time financial indicators for one A-share at a given date",
641
+ "path": "/v1/concepts",
642
+ "description": "Concept list joining CH `v_concept_meta` with Redis snapshot hash\n`stockpulse:concept_snapshots:latest`. Each item includes 6 live\nfields (pct_change / index_value / up/down_count / limit_up_count /\namount) refreshed every ~15s by stockpulse-rs collector.\n\nSource / status / index are computed per PLAN_CONCEPT_INDUSTRY_QUOTE\n§5.4 algorithm (chain-linked equal-weight returns, base = 1000).\n",
643
+ "summary": "List concepts with live snapshot (6 fields)",
496
644
  "positional": [],
497
645
  "outputDefault": "json",
498
646
  "pagination": "none",
@@ -500,91 +648,783 @@ export const OPERATIONS = {
500
648
  "billable": true,
501
649
  "idempotencyRequired": false,
502
650
  "scopesAny": [
503
- "financials:read"
651
+ "quote:l1",
652
+ "quote:l2",
653
+ "quote:delayed"
504
654
  ],
505
655
  "sideEffect": "read",
506
656
  "dryRunSupported": false,
507
657
  "inputSchema": {
508
658
  "type": "object",
509
659
  "properties": {
510
- "code": {
660
+ "status": {
511
661
  "type": "string",
512
- "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
513
- "description": "Canonical A-share code.",
514
- "example": "SSE:600519"
662
+ "enum": [
663
+ "active",
664
+ "pending_review",
665
+ "deprecated"
666
+ ],
667
+ "default": "active",
668
+ "description": "Concept status filter (active / pending_review / deprecated)."
515
669
  },
516
- "date": {
670
+ "sort": {
671
+ "type": "string",
672
+ "enum": [
673
+ "pct",
674
+ "amount",
675
+ "limit_up",
676
+ "stock_count"
677
+ ],
678
+ "default": "pct",
679
+ "description": "Sort field for the snapshot view: pct / amount / limit_up / stock_count."
680
+ },
681
+ "limit": {
682
+ "type": "integer",
683
+ "minimum": 1,
684
+ "maximum": 1000,
685
+ "default": 500,
686
+ "description": "Maximum number of items to return."
687
+ }
688
+ },
689
+ "additionalProperties": false
690
+ }
691
+ },
692
+ "concepts.minute-bars": {
693
+ "cliKey": "concepts.minute-bars",
694
+ "cliName": "concepts minute-bars",
695
+ "method": "GET",
696
+ "path": "/v1/concepts/{concept_id}/minute-bars",
697
+ "description": "Concept index minute-level OHLC (chain-linked equal-weight, base = 1000), max 7 days per request. See PLAN_CONCEPT_INDUSTRY_QUOTE §5.4.",
698
+ "summary": "Concept index minute bars (max 7 days)",
699
+ "positional": [
700
+ "concept_id"
701
+ ],
702
+ "outputDefault": "json",
703
+ "pagination": "none",
704
+ "stream": false,
705
+ "billable": true,
706
+ "idempotencyRequired": false,
707
+ "scopesAny": [
708
+ "bars:read"
709
+ ],
710
+ "sideEffect": "read",
711
+ "dryRunSupported": false,
712
+ "inputSchema": {
713
+ "type": "object",
714
+ "properties": {
715
+ "concept_id": {
716
+ "type": "integer",
717
+ "description": "Concept primary key (PG concepts.id)."
718
+ },
719
+ "from": {
517
720
  "type": "string",
518
721
  "format": "date",
519
- "description": "Trade date in YYYY-MM-DD; defaults to today.",
520
- "example": "2024-11-01"
722
+ "description": "Window start. For daily/minute bars: ISO date `YYYY-MM-DD`. For alerts history: Unix milliseconds (default = now - 24h)."
723
+ },
724
+ "to": {
725
+ "type": "string",
726
+ "format": "date",
727
+ "description": "Window end. For daily/minute bars: ISO date `YYYY-MM-DD`. For alerts history: Unix milliseconds (default = now)."
521
728
  }
522
729
  },
523
730
  "additionalProperties": false,
524
731
  "required": [
525
- "code"
732
+ "concept_id",
733
+ "from",
734
+ "to"
526
735
  ]
527
736
  }
528
737
  },
529
- "financials.reports": {
530
- "cliKey": "financials.reports",
531
- "cliName": "financials reports",
738
+ "concepts.news": {
739
+ "cliKey": "concepts.news",
740
+ "cliName": "concepts news",
741
+ "method": "GET",
742
+ "path": "/v1/concepts/{concept_id}/news",
743
+ "description": "Short-term implementation: ILIKE on news.title + content with the\nconcept name and full_name. Long-term: news AI tagging.\n",
744
+ "summary": "Related news matching concept name (ILIKE)",
745
+ "positional": [
746
+ "concept_id"
747
+ ],
748
+ "outputDefault": "json",
749
+ "pagination": "none",
750
+ "stream": false,
751
+ "billable": true,
752
+ "idempotencyRequired": false,
753
+ "scopesAny": [
754
+ "news:read"
755
+ ],
756
+ "sideEffect": "read",
757
+ "dryRunSupported": false,
758
+ "inputSchema": {
759
+ "type": "object",
760
+ "properties": {
761
+ "concept_id": {
762
+ "type": "integer",
763
+ "description": "Concept primary key (PG concepts.id)."
764
+ },
765
+ "days": {
766
+ "type": "integer",
767
+ "minimum": 1,
768
+ "maximum": 365,
769
+ "default": 30,
770
+ "description": "Lookback window in days for news search."
771
+ },
772
+ "limit": {
773
+ "type": "integer",
774
+ "minimum": 1,
775
+ "maximum": 200,
776
+ "default": 50,
777
+ "description": "Maximum number of items to return."
778
+ }
779
+ },
780
+ "additionalProperties": false,
781
+ "required": [
782
+ "concept_id"
783
+ ]
784
+ }
785
+ },
786
+ "concepts.show": {
787
+ "cliKey": "concepts.show",
788
+ "cliName": "concepts show",
789
+ "method": "GET",
790
+ "path": "/v1/concepts/{concept_id}",
791
+ "description": "Detail view for one concept: meta (full_name / source / status / approved_at / first_listed_at) plus current member securities with their latest snapshots.",
792
+ "summary": "Concept detail (meta + member securities)",
793
+ "positional": [
794
+ "concept_id"
795
+ ],
796
+ "outputDefault": "json",
797
+ "pagination": "none",
798
+ "stream": false,
799
+ "billable": true,
800
+ "idempotencyRequired": false,
801
+ "scopesAny": [
802
+ "quote:l1",
803
+ "quote:l2",
804
+ "quote:delayed"
805
+ ],
806
+ "sideEffect": "read",
807
+ "dryRunSupported": false,
808
+ "inputSchema": {
809
+ "type": "object",
810
+ "properties": {
811
+ "concept_id": {
812
+ "type": "integer",
813
+ "description": "Concept primary key (PG concepts.id)."
814
+ }
815
+ },
816
+ "additionalProperties": false,
817
+ "required": [
818
+ "concept_id"
819
+ ]
820
+ }
821
+ },
822
+ "concepts.snapshot": {
823
+ "cliKey": "concepts.snapshot",
824
+ "cliName": "concepts snapshot",
825
+ "method": "GET",
826
+ "path": "/v1/concepts/snapshot",
827
+ "description": "Returns the full concept_snapshots:latest hash. Use ?codes= to filter.",
828
+ "summary": "Bulk Redis snapshot of all concepts",
829
+ "positional": [],
830
+ "outputDefault": "json",
831
+ "pagination": "none",
832
+ "stream": false,
833
+ "billable": true,
834
+ "idempotencyRequired": false,
835
+ "scopesAny": [
836
+ "quote:l1",
837
+ "quote:l2",
838
+ "quote:delayed"
839
+ ],
840
+ "sideEffect": "read",
841
+ "dryRunSupported": false,
842
+ "inputSchema": {
843
+ "type": "object",
844
+ "properties": {
845
+ "codes": {
846
+ "type": "string",
847
+ "description": "Comma-separated concept_id list (e.g. `1,2,3`); omit for all."
848
+ }
849
+ },
850
+ "additionalProperties": false
851
+ }
852
+ },
853
+ "concepts.views": {
854
+ "cliKey": "concepts.views",
855
+ "cliName": "concepts views",
856
+ "method": "GET",
857
+ "path": "/v1/concepts/{concept_id}/views",
858
+ "description": "JOIN concept_views × broker_views (ai_status=done) sorted by published_at desc.",
859
+ "summary": "Broker views associated with this concept",
860
+ "positional": [
861
+ "concept_id"
862
+ ],
863
+ "outputDefault": "json",
864
+ "pagination": "none",
865
+ "stream": false,
866
+ "billable": true,
867
+ "idempotencyRequired": false,
868
+ "scopesAny": [
869
+ "views:read"
870
+ ],
871
+ "sideEffect": "read",
872
+ "dryRunSupported": false,
873
+ "inputSchema": {
874
+ "type": "object",
875
+ "properties": {
876
+ "concept_id": {
877
+ "type": "integer",
878
+ "description": "Concept primary key (PG concepts.id)."
879
+ },
880
+ "limit": {
881
+ "type": "integer",
882
+ "minimum": 1,
883
+ "maximum": 200,
884
+ "default": 50,
885
+ "description": "Maximum number of items to return."
886
+ }
887
+ },
888
+ "additionalProperties": false,
889
+ "required": [
890
+ "concept_id"
891
+ ]
892
+ }
893
+ },
894
+ "digest.get": {
895
+ "cliKey": "digest.get",
896
+ "cliName": "digest get",
897
+ "method": "GET",
898
+ "path": "/v1/digest/{code}",
899
+ "description": "Composite endpoint: in one HTTP call returns views (PRIMARY research),\nreal-time quote, valuation snapshot (PE/PB/PS/换手率/股息率/量比 等 14 字段),\nmarket sentiment context, and supplementary news.\nPartial-failure tolerant:\neach bucket is independently fetched and per-bucket failures surface\nin `meta.partial_failures[]` rather than poisoning the response. If\nevery sub-bucket fails the endpoint returns 502.\n\nBucket scopes are checked *per bucket* (not at gateway level): a\ntoken with only `views:read` gets the views bucket populated and the\nrest reported as `scope_insufficient` partial failures. This mirrors\nthe CLI fan-out contract exactly so `echopai digest` can either call\nthis endpoint (preferred, single round-trip) or fall back to local\nfan-out without behavior drift.\n\nSee `docs/PLAN_CLI_V2_AGENT_SURFACE.md` §3.3 (digest spec) and §11\nPhase 5.2 (server endpoint).\n",
900
+ "summary": "One-shot research digest for a single security (composite)",
901
+ "positional": [
902
+ "code"
903
+ ],
904
+ "outputDefault": "json",
905
+ "pagination": "none",
906
+ "stream": false,
907
+ "billable": true,
908
+ "idempotencyRequired": false,
909
+ "scopesAny": [],
910
+ "sideEffect": "read",
911
+ "dryRunSupported": false,
912
+ "inputSchema": {
913
+ "type": "object",
914
+ "properties": {
915
+ "code": {
916
+ "type": "string",
917
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
918
+ "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
919
+ "example": "SSE:600519"
920
+ },
921
+ "views_since_days": {
922
+ "type": "integer",
923
+ "minimum": 1,
924
+ "maximum": 90,
925
+ "default": 7,
926
+ "description": "Views lookback in days (1-90)."
927
+ },
928
+ "news_hours": {
929
+ "type": "integer",
930
+ "minimum": 1,
931
+ "maximum": 168,
932
+ "default": 24,
933
+ "description": "News lookback in hours (1-168)."
934
+ },
935
+ "limit_per_bucket": {
936
+ "type": "integer",
937
+ "minimum": 1,
938
+ "maximum": 50,
939
+ "default": 10,
940
+ "description": "Per-bucket item cap for views / news (1-50)."
941
+ }
942
+ },
943
+ "additionalProperties": false,
944
+ "required": [
945
+ "code"
946
+ ]
947
+ }
948
+ },
949
+ "financials.pit": {
950
+ "cliKey": "financials.pit",
951
+ "cliName": "financials pit",
952
+ "method": "GET",
953
+ "path": "/v1/financials/pit",
954
+ "description": "基于 TDX 财务数据的 Point-in-time 查询。给定 `code` 和 `date`,返回该\n`trade_date` 当时市场上可见的最新一期财务报告(`announce_date <= date`,\n无公告日时保守延迟 90 天)。专为回测、AI agent、量化策略防未来函数泄漏。\n\n返回字段包括:EPS(基本/扣非/稀释)、BPS、ROE、毛利率、营收/净利润/总资产/\n归母权益等核心 ~25 字段。\n",
955
+ "summary": "Point-in-time financial indicators for one A-share at a given date",
956
+ "positional": [],
957
+ "outputDefault": "json",
958
+ "pagination": "none",
959
+ "stream": false,
960
+ "billable": true,
961
+ "idempotencyRequired": false,
962
+ "scopesAny": [
963
+ "financials:read"
964
+ ],
965
+ "sideEffect": "read",
966
+ "dryRunSupported": false,
967
+ "inputSchema": {
968
+ "type": "object",
969
+ "properties": {
970
+ "code": {
971
+ "type": "string",
972
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
973
+ "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
974
+ "example": "SSE:600519"
975
+ },
976
+ "date": {
977
+ "type": "string",
978
+ "format": "date",
979
+ "description": "Trade date in YYYY-MM-DD; defaults to today.",
980
+ "example": "2024-11-01"
981
+ }
982
+ },
983
+ "additionalProperties": false,
984
+ "required": [
985
+ "code"
986
+ ]
987
+ }
988
+ },
989
+ "financials.quote-snapshot": {
990
+ "cliKey": "financials.quote-snapshot",
991
+ "cliName": "financials quote-snapshot",
992
+ "method": "GET",
993
+ "path": "/v1/financials/quote-snapshot",
994
+ "description": "一站式估值快照 —— 一次返回 14 个字段,**全部基于 TDX 原始数据 + Sina 实时\n价自算,不依赖 Tushare**:\n\n- 估值: `pe` / `pe_ttm` / `pb` / `ps` / `ps_ttm`\n- 股本(万股): `total_share` / `float_share` / `free_share`\n- 市值(万元): `total_mv` / `circ_mv`\n- 流动性: `turnover_rate` / `turnover_rate_f`(%)/ `volume_ratio`(倍)\n- 分红: `dv_ratio` / `dv_ttm`(%)\n\n计算口径:\n- PE-TTM = 当前总市值 / 近 4 季度滚动净利润(PIT 表 `ni_parent_ttm`)\n- PE = 当前总市值 / 上年报净利润(`ni_parent_last1y`)\n- PB = 当前总市值 / 归母净资产(`equity_parent`,PIT 防穿越)\n- 换手率 = 当日累计成交量 / 流通股本 × 100\n- 量比 = 当日累计 / 近 5 日同时段累计平均(实时模式)\n / 近 5 日全日成交量平均(指定历史日期模式)\n- 股息率 = Σ(去年 / 近12月内派息事件 派现/10) / 现价 × 100\n\n默认 `date` 留空 → 实时(Sina 5s 快照价 + 当日累计成交量);\n给 `date=YYYY-MM-DD` 则按当日 close 取值(用于历史回测 / 校验)。\n\n财报数据走 `security_financial_indicators_pit` PIT 视图:保证 `visible_date`\n≤ trade_date,避免未来函数。\n\n准确性已对照 Tushare `daily_basic` 校验(见 `scripts/validation/validate_quote_snapshot_vs_tushare.py`)。\n",
995
+ "summary": "Real-time valuation / share / turnover snapshot for one A-share",
996
+ "positional": [],
997
+ "outputDefault": "json",
998
+ "pagination": "none",
999
+ "stream": false,
1000
+ "billable": true,
1001
+ "idempotencyRequired": false,
1002
+ "scopesAny": [
1003
+ "financials:read"
1004
+ ],
1005
+ "sideEffect": "read",
1006
+ "dryRunSupported": false,
1007
+ "inputSchema": {
1008
+ "type": "object",
1009
+ "properties": {
1010
+ "code": {
1011
+ "type": "string",
1012
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
1013
+ "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
1014
+ "example": "SSE:600519"
1015
+ },
1016
+ "date": {
1017
+ "type": "string",
1018
+ "format": "date",
1019
+ "description": "Trade date YYYY-MM-DD; omit for real-time (Redis snapshot price).\n",
1020
+ "example": "2026-05-13"
1021
+ }
1022
+ },
1023
+ "additionalProperties": false,
1024
+ "required": [
1025
+ "code"
1026
+ ]
1027
+ }
1028
+ },
1029
+ "financials.reports": {
1030
+ "cliKey": "financials.reports",
1031
+ "cliName": "financials reports",
1032
+ "method": "GET",
1033
+ "path": "/v1/financials/reports",
1034
+ "description": "返回该股票最近 N 期财务报告的核心指标(EPS/BPS/ROE/毛利率/营收/净利润/总\n资产/归母权益/经营现金流/总股本 等 ~25 字段)。可按 `kind` 过滤季报/半年报/\n年报。每期 `announce_date` 字段告知何时市场可见,建议结合回测时使用。\n\n**`kind` 口径说明**:\n\n- `Q1` / `H1` / `Q3` / `annual` —— 四个标准季度末快照(3-31 / 6-30 /\n 9-30 / 12-31),TDX 财务源数据全部落在这四个 report_date。\n- `preliminary` —— **当前数据源结构上不存在**。业绩预告 / 快报 是 indicators\n 行内的字段(`forecast_ni_lower` / `forecast_ni_upper` /\n `express_ni_parent` / `express_revenue` 等),通过 `financials.series`\n metric 参数访问,不是单独的 report_kind 行。`kind=preliminary` 会返\n 空列表 + meta.note。\n",
1035
+ "summary": "Recent financial reports for one A-share security",
1036
+ "positional": [],
1037
+ "outputDefault": "json",
1038
+ "pagination": "none",
1039
+ "stream": false,
1040
+ "billable": true,
1041
+ "idempotencyRequired": false,
1042
+ "scopesAny": [
1043
+ "financials:read"
1044
+ ],
1045
+ "sideEffect": "read",
1046
+ "dryRunSupported": false,
1047
+ "inputSchema": {
1048
+ "type": "object",
1049
+ "properties": {
1050
+ "code": {
1051
+ "type": "string",
1052
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
1053
+ "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
1054
+ "example": "SSE:600519"
1055
+ },
1056
+ "limit": {
1057
+ "type": "integer",
1058
+ "minimum": 1,
1059
+ "maximum": 100,
1060
+ "default": 12,
1061
+ "description": "Max periods to return (1-100, default 12)."
1062
+ },
1063
+ "kind": {
1064
+ "type": "string",
1065
+ "enum": [
1066
+ "Q1",
1067
+ "H1",
1068
+ "Q3",
1069
+ "annual",
1070
+ "preliminary"
1071
+ ],
1072
+ "description": "Filter by report kind."
1073
+ }
1074
+ },
1075
+ "additionalProperties": false,
1076
+ "required": [
1077
+ "code"
1078
+ ]
1079
+ }
1080
+ },
1081
+ "financials.series": {
1082
+ "cliKey": "financials.series",
1083
+ "cliName": "financials series",
1084
+ "method": "GET",
1085
+ "path": "/v1/financials/series",
1086
+ "description": "返回某只股票某个财务指标的历史时间序列(按报告期排列)。`metric` 是\nindicators 表中的字段名(如 `roe_simple` / `revenue` / `ni_parent` /\n`debt_asset_ratio` / `gross_margin` / `eps_basic` 等共 150 个)。\n\n典型用法:画茅台 10 年 ROE 走势、对比 5 只白酒股 net_margin。\n",
1087
+ "summary": "Time series of a single financial metric for one security",
1088
+ "positional": [],
1089
+ "outputDefault": "json",
1090
+ "pagination": "none",
1091
+ "stream": false,
1092
+ "billable": true,
1093
+ "idempotencyRequired": false,
1094
+ "scopesAny": [
1095
+ "financials:read"
1096
+ ],
1097
+ "sideEffect": "read",
1098
+ "dryRunSupported": false,
1099
+ "inputSchema": {
1100
+ "type": "object",
1101
+ "properties": {
1102
+ "code": {
1103
+ "type": "string",
1104
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
1105
+ "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
1106
+ "example": "SSE:600519"
1107
+ },
1108
+ "metric": {
1109
+ "type": "string",
1110
+ "minLength": 1,
1111
+ "maxLength": 64,
1112
+ "description": "Indicator field name (e.g. roe_simple, revenue, ni_parent).",
1113
+ "example": "roe_simple"
1114
+ },
1115
+ "from": {
1116
+ "type": "string",
1117
+ "format": "date",
1118
+ "description": "Inclusive earliest report_date."
1119
+ },
1120
+ "to": {
1121
+ "type": "string",
1122
+ "format": "date",
1123
+ "description": "Inclusive latest report_date."
1124
+ },
1125
+ "limit": {
1126
+ "type": "integer",
1127
+ "minimum": 1,
1128
+ "maximum": 200,
1129
+ "default": 40,
1130
+ "description": "Max points (1-200, default 40)."
1131
+ }
1132
+ },
1133
+ "additionalProperties": false,
1134
+ "required": [
1135
+ "code",
1136
+ "metric"
1137
+ ]
1138
+ }
1139
+ },
1140
+ "index.daily-bars": {
1141
+ "cliKey": "index.daily-bars",
1142
+ "cliName": "index daily-bars",
1143
+ "method": "GET",
1144
+ "path": "/v1/index/bars/daily",
1145
+ "description": "指数日线 OHLC。覆盖 v2 表中的指数(上证综指 `SSE:000001` / 深证成指\n`SZSE:399001` / 沪深300 `SSE:000300` / 北证50 `BSE:899050` / 中证系列 `CSI:000922` 等)。\n与 `/v1/bars/daily` 同语义,但 index 没有 `turnover_rate` / `paused` 等股票特有字段。\n",
1146
+ "summary": "Daily OHLC bars for one A-share index",
1147
+ "positional": [],
1148
+ "outputDefault": "json",
1149
+ "pagination": "none",
1150
+ "stream": false,
1151
+ "billable": true,
1152
+ "idempotencyRequired": false,
1153
+ "scopesAny": [
1154
+ "quote:l1",
1155
+ "quote:l2",
1156
+ "quote:delayed"
1157
+ ],
1158
+ "sideEffect": "read",
1159
+ "dryRunSupported": false,
1160
+ "inputSchema": {
1161
+ "type": "object",
1162
+ "properties": {
1163
+ "code": {
1164
+ "type": "string",
1165
+ "description": "Canonical index code.",
1166
+ "example": "SSE:000001"
1167
+ },
1168
+ "from": {
1169
+ "type": "string",
1170
+ "format": "date",
1171
+ "description": "Inclusive start date (YYYY-MM-DD).",
1172
+ "example": "2024-01-01"
1173
+ },
1174
+ "to": {
1175
+ "type": "string",
1176
+ "format": "date",
1177
+ "description": "Inclusive end date.",
1178
+ "example": "2024-12-31"
1179
+ }
1180
+ },
1181
+ "additionalProperties": false,
1182
+ "required": [
1183
+ "code",
1184
+ "from",
1185
+ "to"
1186
+ ]
1187
+ }
1188
+ },
1189
+ "index.minute-bars": {
1190
+ "cliKey": "index.minute-bars",
1191
+ "cliName": "index minute-bars",
1192
+ "method": "GET",
1193
+ "path": "/v1/index/bars/minute",
1194
+ "description": "指数 1min OHLC。日期范围 ≤ 7 天(与 `/v1/bars/minute-batch` 对齐)。\n返回 `bar_time` / `trade_date` / OHLC / volume / amount / pct_change。\n",
1195
+ "summary": "Minute OHLC bars for one A-share index",
1196
+ "positional": [],
1197
+ "outputDefault": "json",
1198
+ "pagination": "none",
1199
+ "stream": false,
1200
+ "billable": true,
1201
+ "idempotencyRequired": false,
1202
+ "scopesAny": [
1203
+ "quote:l1",
1204
+ "quote:l2",
1205
+ "quote:delayed"
1206
+ ],
1207
+ "sideEffect": "read",
1208
+ "dryRunSupported": false,
1209
+ "inputSchema": {
1210
+ "type": "object",
1211
+ "properties": {
1212
+ "code": {
1213
+ "type": "string",
1214
+ "description": "Canonical index code.",
1215
+ "example": "SSE:000001"
1216
+ },
1217
+ "from": {
1218
+ "type": "string",
1219
+ "format": "date",
1220
+ "description": "Inclusive start date (YYYY-MM-DD)."
1221
+ },
1222
+ "to": {
1223
+ "type": "string",
1224
+ "format": "date",
1225
+ "description": "Inclusive end date. Range ≤ 7 calendar days."
1226
+ }
1227
+ },
1228
+ "additionalProperties": false,
1229
+ "required": [
1230
+ "code",
1231
+ "from",
1232
+ "to"
1233
+ ]
1234
+ }
1235
+ },
1236
+ "index.snapshot": {
1237
+ "cliKey": "index.snapshot",
1238
+ "cliName": "index snapshot",
1239
+ "method": "GET",
1240
+ "path": "/v1/index/snapshot",
1241
+ "description": "Returns the latest real-time snapshot for the 172 indices that Sina\nexposes a quote for (SSE / SZSE / BSE — includes 北证50 `BSE:899050`\nand 专精特新 `899601.BJ`). Source is the Redis hash\n`stockpulse:index_snapshots:latest` which the Rust collector refreshes\nevery ~15 seconds during market hours; outside trading hours the last\nintraday snapshot is returned.\n\nUse `codes` to narrow to a subset (canonical format `SSE:000001` (exchange-prefix; legacy `000001.SH` is also accepted but discouraged)).\nOmit to receive all 172.\n\nNote: CSI-series indices (e.g. `CSI:000922`) are not available here —\nSina has no quote feed for them. Daily/minute history for those still\nlives behind `/api/internal/index/{daily-bars,minute-bars-range}`.\n\nRequires `quote:l1`, `quote:l2`, or `quote:delayed` scope.\n",
1242
+ "summary": "Real-time snapshot of all Sina-OK A-share indices (172 indices)",
1243
+ "positional": [],
1244
+ "outputDefault": "json",
1245
+ "pagination": "none",
1246
+ "stream": false,
1247
+ "billable": true,
1248
+ "idempotencyRequired": false,
1249
+ "scopesAny": [
1250
+ "quote:l1",
1251
+ "quote:l2",
1252
+ "quote:delayed"
1253
+ ],
1254
+ "sideEffect": "read",
1255
+ "dryRunSupported": false,
1256
+ "inputSchema": {
1257
+ "type": "object",
1258
+ "properties": {
1259
+ "codes": {
1260
+ "type": "string",
1261
+ "description": "Comma-separated canonical index codes (e.g. `SSE:000001,SZSE:399001,BSE:899050`).\nOmit to return all 172.\n",
1262
+ "example": "SSE:000001,SZSE:399001,BSE:899050"
1263
+ }
1264
+ },
1265
+ "additionalProperties": false
1266
+ }
1267
+ },
1268
+ "industries.alerts": {
1269
+ "cliKey": "industries.alerts",
1270
+ "cliName": "industries alerts",
1271
+ "method": "GET",
1272
+ "path": "/v1/industries/alerts",
1273
+ "description": "Currently active industry alerts (big_move / limit_up_cluster). Same rule set as concepts.",
1274
+ "summary": "Currently active industry alerts",
1275
+ "positional": [],
1276
+ "outputDefault": "json",
1277
+ "pagination": "none",
1278
+ "stream": false,
1279
+ "billable": false,
1280
+ "idempotencyRequired": false,
1281
+ "scopesAny": [
1282
+ "quote:l1",
1283
+ "quote:l2",
1284
+ "quote:delayed"
1285
+ ],
1286
+ "sideEffect": "read",
1287
+ "dryRunSupported": false,
1288
+ "inputSchema": {
1289
+ "type": "object",
1290
+ "properties": {},
1291
+ "additionalProperties": false
1292
+ }
1293
+ },
1294
+ "industries.daily-bars": {
1295
+ "cliKey": "industries.daily-bars",
1296
+ "cliName": "industries daily-bars",
1297
+ "method": "GET",
1298
+ "path": "/v1/industries/{key}/daily-bars",
1299
+ "description": "Industry index daily OHLC (chain-linked equal-weight, base = 1000). Path key format `<sw_industry_code>:<sw_level>` (e.g. `401001:1`).",
1300
+ "summary": "Industry index daily bars",
1301
+ "positional": [
1302
+ "key"
1303
+ ],
1304
+ "outputDefault": "json",
1305
+ "pagination": "none",
1306
+ "stream": false,
1307
+ "billable": true,
1308
+ "idempotencyRequired": false,
1309
+ "scopesAny": [
1310
+ "bars:read"
1311
+ ],
1312
+ "sideEffect": "read",
1313
+ "dryRunSupported": false,
1314
+ "inputSchema": {
1315
+ "type": "object",
1316
+ "properties": {
1317
+ "key": {
1318
+ "type": "string",
1319
+ "description": "Industry key in `<sw_industry_code>:<sw_level>` format (e.g. `401001:1`).",
1320
+ "example": "401001:1"
1321
+ },
1322
+ "from": {
1323
+ "type": "string",
1324
+ "format": "date",
1325
+ "description": "Window start. For daily/minute bars: ISO date `YYYY-MM-DD`. For alerts history: Unix milliseconds (default = now - 24h)."
1326
+ },
1327
+ "to": {
1328
+ "type": "string",
1329
+ "format": "date",
1330
+ "description": "Window end. For daily/minute bars: ISO date `YYYY-MM-DD`. For alerts history: Unix milliseconds (default = now)."
1331
+ }
1332
+ },
1333
+ "additionalProperties": false,
1334
+ "required": [
1335
+ "key",
1336
+ "from",
1337
+ "to"
1338
+ ]
1339
+ }
1340
+ },
1341
+ "industries.list": {
1342
+ "cliKey": "industries.list",
1343
+ "cliName": "industries list",
1344
+ "method": "GET",
1345
+ "path": "/v1/industries",
1346
+ "description": "Industry index list joining CH `v_industry_meta` with Redis snapshot.\n申万一级 (level=1) ≈ 127 industries, 申万二级 (level=2) ≈ 348.\nChain-linked equal-weight algorithm identical to concepts (PLAN §5.4).\n",
1347
+ "summary": "List industries (申万 L1/L2) with live snapshot",
1348
+ "positional": [],
1349
+ "outputDefault": "json",
1350
+ "pagination": "none",
1351
+ "stream": false,
1352
+ "billable": true,
1353
+ "idempotencyRequired": false,
1354
+ "scopesAny": [
1355
+ "quote:l1",
1356
+ "quote:l2",
1357
+ "quote:delayed"
1358
+ ],
1359
+ "sideEffect": "read",
1360
+ "dryRunSupported": false,
1361
+ "inputSchema": {
1362
+ "type": "object",
1363
+ "properties": {
1364
+ "level": {
1365
+ "type": "integer",
1366
+ "enum": [
1367
+ 1,
1368
+ 2
1369
+ ],
1370
+ "default": 1,
1371
+ "description": "申万 industry level (1 or 2)."
1372
+ },
1373
+ "limit": {
1374
+ "type": "integer",
1375
+ "minimum": 1,
1376
+ "maximum": 1000,
1377
+ "default": 500,
1378
+ "description": "Maximum number of items to return."
1379
+ }
1380
+ },
1381
+ "additionalProperties": false
1382
+ }
1383
+ },
1384
+ "industries.show": {
1385
+ "cliKey": "industries.show",
1386
+ "cliName": "industries show",
532
1387
  "method": "GET",
533
- "path": "/v1/financials/reports",
534
- "description": "返回该股票最近 N 期财务报告的核心指标(EPS/BPS/ROE/毛利率/营收/净利润/总\n资产/归母权益/经营现金流/总股本 ~25 字段)。可按 `kind` 过滤季报/半年报/\n年报。每期 `announce_date` 字段告知何时市场可见,建议结合回测时使用。\n",
535
- "summary": "Recent financial reports for one A-share security",
536
- "positional": [],
1388
+ "path": "/v1/industries/{key}",
1389
+ "description": "Path key format: `<sw_industry_code>:<sw_level>` (e.g. `401001:1`).",
1390
+ "summary": "Industry detail (meta + today members)",
1391
+ "positional": [
1392
+ "key"
1393
+ ],
537
1394
  "outputDefault": "json",
538
1395
  "pagination": "none",
539
1396
  "stream": false,
540
1397
  "billable": true,
541
1398
  "idempotencyRequired": false,
542
1399
  "scopesAny": [
543
- "financials:read"
1400
+ "quote:l1",
1401
+ "quote:l2",
1402
+ "quote:delayed"
544
1403
  ],
545
1404
  "sideEffect": "read",
546
1405
  "dryRunSupported": false,
547
1406
  "inputSchema": {
548
1407
  "type": "object",
549
1408
  "properties": {
550
- "code": {
1409
+ "key": {
551
1410
  "type": "string",
552
- "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
553
- "description": "Canonical A-share code.",
554
- "example": "SSE:600519"
555
- },
556
- "limit": {
557
- "type": "integer",
558
- "minimum": 1,
559
- "maximum": 100,
560
- "default": 12,
561
- "description": "Max periods to return (1-100, default 12)."
562
- },
563
- "kind": {
564
- "type": "string",
565
- "enum": [
566
- "Q1",
567
- "H1",
568
- "Q3",
569
- "annual",
570
- "preliminary"
571
- ],
572
- "description": "Filter by report kind."
1411
+ "description": "Industry key in `<sw_industry_code>:<sw_level>` format (e.g. `401001:1`).",
1412
+ "example": "401001:1"
573
1413
  }
574
1414
  },
575
1415
  "additionalProperties": false,
576
1416
  "required": [
577
- "code"
1417
+ "key"
578
1418
  ]
579
1419
  }
580
1420
  },
581
- "financials.series": {
582
- "cliKey": "financials.series",
583
- "cliName": "financials series",
1421
+ "industries.snapshot": {
1422
+ "cliKey": "industries.snapshot",
1423
+ "cliName": "industries snapshot",
584
1424
  "method": "GET",
585
- "path": "/v1/financials/series",
586
- "description": "返回某只股票某个财务指标的历史时间序列(按报告期排列)。`metric` 是\nindicators 表中的字段名(如 `roe_simple` / `revenue` / `ni_parent` /\n`debt_asset_ratio` / `gross_margin` / `eps_basic` 等共 150 个)。\n\n典型用法:画茅台 10 ROE 走势、对比 5 只白酒股 net_margin。\n",
587
- "summary": "Time series of a single financial metric for one security",
1425
+ "path": "/v1/industries/snapshot",
1426
+ "description": "Bulk Redis snapshot for 申万 industries (level 1 127, level 2 348). Use `codes` to narrow. Mirrors `/v1/concepts/snapshot` shape.",
1427
+ "summary": "Bulk Redis snapshot of all industries",
588
1428
  "positional": [],
589
1429
  "outputDefault": "json",
590
1430
  "pagination": "none",
@@ -592,58 +1432,30 @@ export const OPERATIONS = {
592
1432
  "billable": true,
593
1433
  "idempotencyRequired": false,
594
1434
  "scopesAny": [
595
- "financials:read"
1435
+ "quote:l1",
1436
+ "quote:l2",
1437
+ "quote:delayed"
596
1438
  ],
597
1439
  "sideEffect": "read",
598
1440
  "dryRunSupported": false,
599
1441
  "inputSchema": {
600
1442
  "type": "object",
601
1443
  "properties": {
602
- "code": {
603
- "type": "string",
604
- "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
605
- "description": "Canonical A-share code.",
606
- "example": "SSE:600519"
607
- },
608
- "metric": {
609
- "type": "string",
610
- "minLength": 1,
611
- "maxLength": 64,
612
- "description": "Indicator field name (e.g. roe_simple, revenue, ni_parent).",
613
- "example": "roe_simple"
614
- },
615
- "from": {
616
- "type": "string",
617
- "format": "date",
618
- "description": "Inclusive earliest report_date."
619
- },
620
- "to": {
1444
+ "codes": {
621
1445
  "type": "string",
622
- "format": "date",
623
- "description": "Inclusive latest report_date."
624
- },
625
- "limit": {
626
- "type": "integer",
627
- "minimum": 1,
628
- "maximum": 200,
629
- "default": 40,
630
- "description": "Max points (1-200, default 40)."
1446
+ "description": "Comma-separated `sw_code:level` (e.g. `401001:1,401002:1`); omit for all"
631
1447
  }
632
1448
  },
633
- "additionalProperties": false,
634
- "required": [
635
- "code",
636
- "metric"
637
- ]
1449
+ "additionalProperties": false
638
1450
  }
639
1451
  },
640
- "index.daily-bars": {
641
- "cliKey": "index.daily-bars",
642
- "cliName": "index daily-bars",
1452
+ "limit-up.history": {
1453
+ "cliKey": "limit-up.history",
1454
+ "cliName": "limit-up history",
643
1455
  "method": "GET",
644
- "path": "/v1/index/bars/daily",
645
- "description": "指数日线 OHLC。覆盖 v2 表中的指数(上证综指 000001.SH / 深证成指\n399001.SZ / 沪深300 000300.SH / 北证50 899050.BJ / 中证系列 000922.CSI 等)。\n与 `/v1/bars/daily` 同语义,但 index 没有 `turnover_rate` / `paused` 等股票特有字段。\n",
646
- "summary": "Daily OHLC bars for one A-share index",
1456
+ "path": "/v1/limit-up/history",
1457
+ "description": " N 个交易日每日涨停数 + 最高连板 + 炸板数。涨停数 / 最高连板来源\n`market_limit_up_pool` (仅 status=limit_up);炸板数来源\n`market_breadth_intraday`(all_a_ex_st 当日最新分钟行)。\n\n响应按 trade_date asc 排序(旧日期在前)。需要 `quote:*` scope。\n",
1458
+ "summary": "A-share limit-up daily trend (last N days)",
647
1459
  "positional": [],
648
1460
  "outputDefault": "json",
649
1461
  "pagination": "none",
@@ -660,39 +1472,24 @@ export const OPERATIONS = {
660
1472
  "inputSchema": {
661
1473
  "type": "object",
662
1474
  "properties": {
663
- "code": {
664
- "type": "string",
665
- "description": "Canonical index code.",
666
- "example": "000001.SH"
667
- },
668
- "from": {
669
- "type": "string",
670
- "format": "date",
671
- "description": "Inclusive start date (YYYY-MM-DD).",
672
- "example": "2024-01-01"
673
- },
674
- "to": {
675
- "type": "string",
676
- "format": "date",
677
- "description": "Inclusive end date.",
678
- "example": "2024-12-31"
1475
+ "days": {
1476
+ "type": "integer",
1477
+ "minimum": 1,
1478
+ "maximum": 250,
1479
+ "default": 30,
1480
+ "description": "回看天数(1-250,默认 30)。"
679
1481
  }
680
1482
  },
681
- "additionalProperties": false,
682
- "required": [
683
- "code",
684
- "from",
685
- "to"
686
- ]
1483
+ "additionalProperties": false
687
1484
  }
688
1485
  },
689
- "index.minute-bars": {
690
- "cliKey": "index.minute-bars",
691
- "cliName": "index minute-bars",
1486
+ "limit-up.pool": {
1487
+ "cliKey": "limit-up.pool",
1488
+ "cliName": "limit-up pool",
692
1489
  "method": "GET",
693
- "path": "/v1/index/bars/minute",
694
- "description": "指数 1min OHLC。日期范围 7 天(与 `/v1/bars/minute-batch` 对齐)。\n返回 `bar_time` / `trade_date` / OHLC / volume / amount / pct_change。\n",
695
- "summary": "Minute OHLC bars for one A-share index",
1490
+ "path": "/v1/limit-up/pool",
1491
+ "description": "当日(或指定 `trade_date`)涨停股池逐股明细:首/末次封板时间、最终涨幅、\n封单金额/封单量、炸板次数、连板数、N 日板内统计、一字板标记、当前 status\n(limit_up / broken)、板块分类。\n\n盘前回退规则(与所有行情类页面一致):\n - `< 9:00`:返回 max(trade_date) 的最新一日数据(昨日)\n - `9:00-9:14`:集合竞价前空窗期,items=[] / trade_date=null\n - `>= 9:15`:collector 已写入今日数据\n\n排序:连板数 desc 板内板数 desc → 封单金额 desc。需要 `quote:*` scope。\n",
1492
+ "summary": "A-share limit-up pool (per-stock detail) for a given trade date",
696
1493
  "positional": [],
697
1494
  "outputDefault": "json",
698
1495
  "pagination": "none",
@@ -709,37 +1506,36 @@ export const OPERATIONS = {
709
1506
  "inputSchema": {
710
1507
  "type": "object",
711
1508
  "properties": {
712
- "code": {
713
- "type": "string",
714
- "description": "Canonical index code.",
715
- "example": "000001.SH"
716
- },
717
- "from": {
1509
+ "trade_date": {
718
1510
  "type": "string",
719
1511
  "format": "date",
720
- "description": "Inclusive start date (YYYY-MM-DD)."
1512
+ "description": "ISO date YYYY-MM-DD;不传走 latest(含盘前回退)。"
721
1513
  },
722
- "to": {
1514
+ "include": {
723
1515
  "type": "string",
724
- "format": "date",
725
- "description": "Inclusive end date. Range ≤ 7 calendar days."
1516
+ "enum": [
1517
+ "active",
1518
+ "all"
1519
+ ],
1520
+ "default": "active",
1521
+ "description": "active(默认)= 排除 ST/退市;all = 全部。"
1522
+ },
1523
+ "include_broken": {
1524
+ "type": "boolean",
1525
+ "default": false,
1526
+ "description": "true 时连炸板(status=broken)也一起返回;默认只返回当前封板 status=limit_up。"
726
1527
  }
727
1528
  },
728
- "additionalProperties": false,
729
- "required": [
730
- "code",
731
- "from",
732
- "to"
733
- ]
1529
+ "additionalProperties": false
734
1530
  }
735
1531
  },
736
- "index.snapshot": {
737
- "cliKey": "index.snapshot",
738
- "cliName": "index snapshot",
1532
+ "limit-up.summary": {
1533
+ "cliKey": "limit-up.summary",
1534
+ "cliName": "limit-up summary",
739
1535
  "method": "GET",
740
- "path": "/v1/index/snapshot",
741
- "description": "Returns the latest real-time snapshot for the 172 indices that Sina\nexposes a quote for (SSE / SZSE / BSE — includes 北证50 `899050.BJ`\nand 专精特新 `899601.BJ`). Source is the Redis hash\n`stockpulse:index_snapshots:latest` which the Rust collector refreshes\nevery ~15 seconds during market hours; outside trading hours the last\nintraday snapshot is returned.\n\nUse `codes` to narrow to a subset (canonical format like `000001.SH`).\nOmit to receive all 172.\n\nNote: CSI-series indices (e.g. `000922.CSI`) are not available here —\nSina has no quote feed for them. Daily/minute history for those still\nlives behind `/api/internal/index/{daily-bars,minute-bars-range}`.\n\nRequires `quote:l1`, `quote:l2`, or `quote:delayed` scope.\n",
742
- "summary": "Real-time snapshot of all Sina-OK A-share indices (172 indices)",
1536
+ "path": "/v1/limit-up/summary",
1537
+ "description": "涨停股池聚合统计:涨停数、炸板数、跌停数、最高连板高度、连板梯队\n`ladder: [{ height, count }, ...]`。\n\n炸板数 / 跌停数 与情绪页同源(`market_breadth_intraday` 当日最新分钟行);\n连板梯队仅统计当前封板 status=limit_up 的个股。\n\n盘前回退规则与 `limit-up/pool` 一致。需要 `quote:*` scope。\n",
1538
+ "summary": "A-share limit-up summary (counts + height ladder) for a given trade date",
743
1539
  "positional": [],
744
1540
  "outputDefault": "json",
745
1541
  "pagination": "none",
@@ -756,10 +1552,19 @@ export const OPERATIONS = {
756
1552
  "inputSchema": {
757
1553
  "type": "object",
758
1554
  "properties": {
759
- "codes": {
1555
+ "trade_date": {
1556
+ "type": "string",
1557
+ "format": "date",
1558
+ "description": "ISO date YYYY-MM-DD;不传走 latest。"
1559
+ },
1560
+ "include": {
760
1561
  "type": "string",
761
- "description": "Comma-separated canonical index codes (e.g. `000001.SH,399001.SZ,899050.BJ`).\nOmit to return all 172.\n",
762
- "example": "000001.SH,399001.SZ,899050.BJ"
1562
+ "enum": [
1563
+ "active",
1564
+ "all"
1565
+ ],
1566
+ "default": "active",
1567
+ "description": "active(默认 all_a_ex_st 口径)/ all(all_a 口径)。"
763
1568
  }
764
1569
  },
765
1570
  "additionalProperties": false
@@ -869,9 +1674,9 @@ export const OPERATIONS = {
869
1674
  "properties": {
870
1675
  "security": {
871
1676
  "type": "string",
872
- "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
873
- "description": "Canonical security code.",
874
- "example": "SSE:600519"
1677
+ "description": "Any-market canonical code: A-share | HK (5-digit zero-padded) | US (uppercase ticker). For search/views/news endpoints.",
1678
+ "pattern": "^((SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}|HK:[0-9]{5}|US:[A-Z][A-Z0-9.\\-]{0,5})$",
1679
+ "example": "HK:00700"
875
1680
  },
876
1681
  "since_hours": {
877
1682
  "type": "integer",
@@ -943,28 +1748,6 @@ export const OPERATIONS = {
943
1748
  ]
944
1749
  }
945
1750
  },
946
- "news.sources": {
947
- "cliKey": "news.sources",
948
- "cliName": "news sources",
949
- "method": "GET",
950
- "path": "/v1/news/sources",
951
- "description": "返回新闻 source 标识列表(如 `cls`、`jin10`、`twitter`、`wallstreetcn`),可用于 list/search 的 source 过滤。",
952
- "summary": "List canonical news source identifiers",
953
- "positional": [],
954
- "outputDefault": "json",
955
- "pagination": "none",
956
- "stream": false,
957
- "billable": false,
958
- "idempotencyRequired": false,
959
- "scopesAny": [],
960
- "sideEffect": "read",
961
- "dryRunSupported": false,
962
- "inputSchema": {
963
- "type": "object",
964
- "properties": {},
965
- "additionalProperties": false
966
- }
967
- },
968
1751
  "payment.plans": {
969
1752
  "cliKey": "payment.plans",
970
1753
  "cliName": "payment plans",
@@ -1014,7 +1797,9 @@ export const OPERATIONS = {
1014
1797
  "type": "array",
1015
1798
  "items": {
1016
1799
  "type": "string",
1017
- "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$"
1800
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
1801
+ "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
1802
+ "example": "SSE:600519"
1018
1803
  },
1019
1804
  "minItems": 1,
1020
1805
  "maxItems": 200,
@@ -1075,60 +1860,6 @@ export const OPERATIONS = {
1075
1860
  "additionalProperties": false
1076
1861
  }
1077
1862
  },
1078
- "research.entity-performance": {
1079
- "cliKey": "research.entity-performance",
1080
- "cliName": "research entity-performance",
1081
- "method": "GET",
1082
- "path": "/v1/research-entities/{entity_id}/performance",
1083
- "description": "单个研究实体的细化绩效指标,对照 `/v1/research-entities/performance`。",
1084
- "summary": "Performance of one research entity",
1085
- "positional": [
1086
- "entity_id"
1087
- ],
1088
- "outputDefault": "json",
1089
- "pagination": "none",
1090
- "stream": false,
1091
- "billable": false,
1092
- "idempotencyRequired": false,
1093
- "scopesAny": [],
1094
- "sideEffect": "read",
1095
- "dryRunSupported": false,
1096
- "inputSchema": {
1097
- "type": "object",
1098
- "properties": {
1099
- "entity_id": {
1100
- "type": "string",
1101
- "description": "Research-entity id (returned by research-entities.list / matcher)."
1102
- }
1103
- },
1104
- "additionalProperties": false,
1105
- "required": [
1106
- "entity_id"
1107
- ]
1108
- }
1109
- },
1110
- "research.entity-performance-list": {
1111
- "cliKey": "research.entity-performance-list",
1112
- "cliName": "research entity-performance-list",
1113
- "method": "GET",
1114
- "path": "/v1/research-entities/performance",
1115
- "description": "全体研究实体(analyst / team / institution)的命中率、平均目标价达成率、覆盖股票数等汇总。需要 `research:read` scope。",
1116
- "summary": "Aggregate performance of research entities",
1117
- "positional": [],
1118
- "outputDefault": "json",
1119
- "pagination": "none",
1120
- "stream": false,
1121
- "billable": false,
1122
- "idempotencyRequired": false,
1123
- "scopesAny": [],
1124
- "sideEffect": "read",
1125
- "dryRunSupported": false,
1126
- "inputSchema": {
1127
- "type": "object",
1128
- "properties": {},
1129
- "additionalProperties": false
1130
- }
1131
- },
1132
1863
  "search.semantic": {
1133
1864
  "cliKey": "search.semantic",
1134
1865
  "cliName": "search semantic",
@@ -1218,8 +1949,8 @@ export const OPERATIONS = {
1218
1949
  "properties": {
1219
1950
  "code": {
1220
1951
  "type": "string",
1952
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
1221
1953
  "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
1222
- "description": "Canonical A-share code.",
1223
1954
  "example": "SSE:600519"
1224
1955
  }
1225
1956
  },
@@ -1274,7 +2005,7 @@ export const OPERATIONS = {
1274
2005
  "cliName": "sentiment breadth",
1275
2006
  "method": "GET",
1276
2007
  "path": "/v1/sentiment/breadth",
1277
- "description": "Intraday breadth time series. Requires `sentiment:read` scope.",
2008
+ "description": "Intraday breadth time series for one trading day.\n`trade_date` 缺省 → 今日(盘前 9:00 前返回空 items);显式传 YYYY-MM-DD 可\n拉历史任意交易日(来源 ClickHouse `market_breadth_intraday`,剔除 13:00\n稀疏分钟,单日最多 241 行)。Requires `sentiment:read` scope.\n",
1278
2009
  "summary": "Intraday breadth time series",
1279
2010
  "positional": [],
1280
2011
  "outputDefault": "json",
@@ -1302,6 +2033,11 @@ export const OPERATIONS = {
1302
2033
  ],
1303
2034
  "default": "all_a_ex_st",
1304
2035
  "description": "Universe filter."
2036
+ },
2037
+ "trade_date": {
2038
+ "type": "string",
2039
+ "format": "date",
2040
+ "description": "ISO date YYYY-MM-DD;不传走今日(盘前 9:00 前返空)。"
1305
2041
  }
1306
2042
  },
1307
2043
  "additionalProperties": false
@@ -1312,7 +2048,7 @@ export const OPERATIONS = {
1312
2048
  "cliName": "sentiment overview",
1313
2049
  "method": "GET",
1314
2050
  "path": "/v1/sentiment/overview",
1315
- "description": "Aggregate sentiment: limit-up/down counts, breadth, divergence index, top movers. Requires `sentiment:read` scope.",
2051
+ "description": "Aggregate sentiment snapshot for one trading day's latest minute:\nlimit-up/down counts, breadth, divergence index, MA / 52w breadth.\n`trade_date` 缺省 → 今日(Redis 实时,盘前 9:00 前返空结构);显式传\nYYYY-MM-DD 拉历史任意日(最后一分钟聚合行,来源 ClickHouse\n`market_breadth_intraday`)。Requires `sentiment:read` scope.\n",
1316
2052
  "summary": "Aggregate market sentiment indicators",
1317
2053
  "positional": [],
1318
2054
  "outputDefault": "json",
@@ -1341,6 +2077,11 @@ export const OPERATIONS = {
1341
2077
  "default": "all_a_ex_st",
1342
2078
  "description": "Universe filter.",
1343
2079
  "example": "main_board"
2080
+ },
2081
+ "trade_date": {
2082
+ "type": "string",
2083
+ "format": "date",
2084
+ "description": "ISO date YYYY-MM-DD;不传走今日(实时)。"
1344
2085
  }
1345
2086
  },
1346
2087
  "additionalProperties": false
@@ -1375,7 +2116,7 @@ export const OPERATIONS = {
1375
2116
  "cliName": "sentiment turnover",
1376
2117
  "method": "GET",
1377
2118
  "path": "/v1/sentiment/turnover",
1378
- "description": "Intraday turnover time series. Requires `sentiment:read` scope.",
2119
+ "description": "Intraday turnover time series across one or more trading days.\n`trade_date` 缺省 → 今日(盘前 9:00 前返空 items);显式 YYYY-MM-DD 拉\n历史任意交易日的当日 + 之前 `days-1` 天。Response 含 `current_turnover`\n/ `predicted_total` / `delta_vs_yesterday` headline 字段。Requires\n`sentiment:read` scope.\n",
1379
2120
  "summary": "Intraday turnover time series",
1380
2121
  "positional": [],
1381
2122
  "outputDefault": "json",
@@ -1403,62 +2144,20 @@ export const OPERATIONS = {
1403
2144
  ],
1404
2145
  "default": "all_a_ex_st",
1405
2146
  "description": "Universe filter."
1406
- }
1407
- },
1408
- "additionalProperties": false
1409
- }
1410
- },
1411
- "signals.outcome": {
1412
- "cliKey": "signals.outcome",
1413
- "cliName": "signals outcome",
1414
- "method": "GET",
1415
- "path": "/v1/signals/{signal_id}/outcome",
1416
- "description": "单条 signal 的细化结果追踪。",
1417
- "summary": "Outcome trace for a single signal",
1418
- "positional": [
1419
- "signal_id"
1420
- ],
1421
- "outputDefault": "json",
1422
- "pagination": "none",
1423
- "stream": false,
1424
- "billable": false,
1425
- "idempotencyRequired": false,
1426
- "scopesAny": [],
1427
- "sideEffect": "read",
1428
- "dryRunSupported": false,
1429
- "inputSchema": {
1430
- "type": "object",
1431
- "properties": {
1432
- "signal_id": {
2147
+ },
2148
+ "trade_date": {
1433
2149
  "type": "string",
1434
- "description": "Signal id (returned by signals/outcomes items[].signal_id)."
2150
+ "format": "date",
2151
+ "description": "ISO date YYYY-MM-DD;不传走今日。"
2152
+ },
2153
+ "days": {
2154
+ "type": "integer",
2155
+ "minimum": 1,
2156
+ "maximum": 5,
2157
+ "default": 1,
2158
+ "description": "取该 trade_date 当日 + 之前 days-1 天的时序,用于同分钟同比 (1-5)。"
1435
2159
  }
1436
2160
  },
1437
- "additionalProperties": false,
1438
- "required": [
1439
- "signal_id"
1440
- ]
1441
- }
1442
- },
1443
- "signals.outcomes": {
1444
- "cliKey": "signals.outcomes",
1445
- "cliName": "signals outcomes",
1446
- "method": "GET",
1447
- "path": "/v1/signals/outcomes",
1448
- "description": "返回分析师 views 派生信号的实际结果(目标价命中 / 止损 / 到期),含命中时长、最大回撤等。",
1449
- "summary": "Outcomes of analyst-view-derived signals",
1450
- "positional": [],
1451
- "outputDefault": "json",
1452
- "pagination": "offset",
1453
- "stream": false,
1454
- "billable": false,
1455
- "idempotencyRequired": false,
1456
- "scopesAny": [],
1457
- "sideEffect": "read",
1458
- "dryRunSupported": false,
1459
- "inputSchema": {
1460
- "type": "object",
1461
- "properties": {},
1462
2161
  "additionalProperties": false
1463
2162
  }
1464
2163
  },
@@ -1655,8 +2354,9 @@ export const OPERATIONS = {
1655
2354
  },
1656
2355
  "security": {
1657
2356
  "type": "string",
1658
- "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
1659
- "description": "Filter by security code."
2357
+ "description": "Any-market canonical code: A-share | HK (5-digit zero-padded) | US (uppercase ticker). For search/views/news endpoints.",
2358
+ "pattern": "^((SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}|HK:[0-9]{5}|US:[A-Z][A-Z0-9.\\-]{0,5})$",
2359
+ "example": "HK:00700"
1660
2360
  },
1661
2361
  "since_days": {
1662
2362
  "type": "integer",