echopai 2.2.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,6 +143,148 @@ export const OPERATIONS = {
143
143
  ]
144
144
  }
145
145
  },
146
+ "announcements.detail": {
147
+ "cliKey": "announcements.detail",
148
+ "cliName": "announcements detail",
149
+ "method": "GET",
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
+ ],
156
+ "outputDefault": "json",
157
+ "pagination": "none",
158
+ "stream": false,
159
+ "billable": true,
160
+ "idempotencyRequired": false,
161
+ "scopesAny": [
162
+ "announcements:read"
163
+ ],
164
+ "sideEffect": "read",
165
+ "dryRunSupported": false,
166
+ "inputSchema": {
167
+ "type": "object",
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
+ ]
179
+ }
180
+ },
181
+ "announcements.feed": {
182
+ "cliKey": "announcements.feed",
183
+ "cliName": "announcements feed",
184
+ "method": "GET",
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",
188
+ "positional": [],
189
+ "outputDefault": "json",
190
+ "pagination": "offset",
191
+ "stream": false,
192
+ "billable": true,
193
+ "idempotencyRequired": false,
194
+ "scopesAny": [
195
+ "announcements:read"
196
+ ],
197
+ "sideEffect": "read",
198
+ "dryRunSupported": false,
199
+ "inputSchema": {
200
+ "type": "object",
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
+ },
226
+ "additionalProperties": false
227
+ }
228
+ },
229
+ "announcements.stock": {
230
+ "cliKey": "announcements.stock",
231
+ "cliName": "announcements stock",
232
+ "method": "GET",
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",
236
+ "positional": [],
237
+ "outputDefault": "json",
238
+ "pagination": "offset",
239
+ "stream": false,
240
+ "billable": true,
241
+ "idempotencyRequired": false,
242
+ "scopesAny": [
243
+ "announcements:read"
244
+ ],
245
+ "sideEffect": "read",
246
+ "dryRunSupported": false,
247
+ "inputSchema": {
248
+ "type": "object",
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
+ ]
286
+ }
287
+ },
146
288
  "auth.whoami": {
147
289
  "cliKey": "auth.whoami",
148
290
  "cliName": "auth whoami",
@@ -189,8 +331,8 @@ export const OPERATIONS = {
189
331
  "properties": {
190
332
  "code": {
191
333
  "type": "string",
334
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
192
335
  "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
193
- "description": "Single canonical code.",
194
336
  "example": "SSE:600519"
195
337
  },
196
338
  "from": {
@@ -240,7 +382,9 @@ export const OPERATIONS = {
240
382
  "type": "array",
241
383
  "items": {
242
384
  "type": "string",
243
- "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"
244
388
  },
245
389
  "minItems": 1,
246
390
  "maxItems": 100,
@@ -293,8 +437,8 @@ export const OPERATIONS = {
293
437
  "properties": {
294
438
  "code": {
295
439
  "type": "string",
440
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
296
441
  "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
297
- "description": "Single canonical code.",
298
442
  "example": "SSE:600519"
299
443
  },
300
444
  "date": {
@@ -337,7 +481,9 @@ export const OPERATIONS = {
337
481
  "type": "array",
338
482
  "items": {
339
483
  "type": "string",
340
- "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"
341
487
  },
342
488
  "minItems": 1,
343
489
  "maxItems": 20,
@@ -352,17 +498,396 @@ export const OPERATIONS = {
352
498
  "format": "date",
353
499
  "description": "Inclusive start date (YYYY-MM-DD)."
354
500
  },
355
- "to": {
356
- "type": "string",
357
- "format": "date",
358
- "description": "Inclusive end date. Range must be ≤ 7 calendar days."
501
+ "to": {
502
+ "type": "string",
503
+ "format": "date",
504
+ "description": "Inclusive end date. Range must be ≤ 7 calendar days."
505
+ }
506
+ },
507
+ "additionalProperties": false,
508
+ "required": [
509
+ "codes",
510
+ "from",
511
+ "to"
512
+ ]
513
+ }
514
+ },
515
+ "concepts.alerts": {
516
+ "cliKey": "concepts.alerts",
517
+ "cliName": "concepts alerts",
518
+ "method": "GET",
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"
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": [],
549
+ "outputDefault": "json",
550
+ "pagination": "none",
551
+ "stream": false,
552
+ "billable": false,
553
+ "idempotencyRequired": false,
554
+ "scopesAny": [
555
+ "quote:l1",
556
+ "quote:l2",
557
+ "quote:delayed"
558
+ ],
559
+ "sideEffect": "read",
560
+ "dryRunSupported": false,
561
+ "inputSchema": {
562
+ "type": "object",
563
+ "properties": {
564
+ "from": {
565
+ "type": "integer",
566
+ "description": "Unix ms; default = now - 24h"
567
+ },
568
+ "to": {
569
+ "type": "integer",
570
+ "description": "Window end. For daily/minute bars: ISO date `YYYY-MM-DD`. For alerts history: Unix milliseconds (default = now)."
571
+ },
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": {
581
+ "type": "integer",
582
+ "minimum": 1,
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)."
627
+ }
628
+ },
629
+ "additionalProperties": false,
630
+ "required": [
631
+ "concept_id",
632
+ "from",
633
+ "to"
634
+ ]
635
+ }
636
+ },
637
+ "concepts.list": {
638
+ "cliKey": "concepts.list",
639
+ "cliName": "concepts list",
640
+ "method": "GET",
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)",
644
+ "positional": [],
645
+ "outputDefault": "json",
646
+ "pagination": "none",
647
+ "stream": false,
648
+ "billable": true,
649
+ "idempotencyRequired": false,
650
+ "scopesAny": [
651
+ "quote:l1",
652
+ "quote:l2",
653
+ "quote:delayed"
654
+ ],
655
+ "sideEffect": "read",
656
+ "dryRunSupported": false,
657
+ "inputSchema": {
658
+ "type": "object",
659
+ "properties": {
660
+ "status": {
661
+ "type": "string",
662
+ "enum": [
663
+ "active",
664
+ "pending_review",
665
+ "deprecated"
666
+ ],
667
+ "default": "active",
668
+ "description": "Concept status filter (active / pending_review / deprecated)."
669
+ },
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": {
720
+ "type": "string",
721
+ "format": "date",
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)."
728
+ }
729
+ },
730
+ "additionalProperties": false,
731
+ "required": [
732
+ "concept_id",
733
+ "from",
734
+ "to"
735
+ ]
736
+ }
737
+ },
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."
359
886
  }
360
887
  },
361
888
  "additionalProperties": false,
362
889
  "required": [
363
- "codes",
364
- "from",
365
- "to"
890
+ "concept_id"
366
891
  ]
367
892
  }
368
893
  },
@@ -389,8 +914,9 @@ export const OPERATIONS = {
389
914
  "properties": {
390
915
  "code": {
391
916
  "type": "string",
917
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
392
918
  "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
393
- "description": "Canonical security code, e.g. SSE:600519."
919
+ "example": "SSE:600519"
394
920
  },
395
921
  "views_since_days": {
396
922
  "type": "integer",
@@ -443,8 +969,8 @@ export const OPERATIONS = {
443
969
  "properties": {
444
970
  "code": {
445
971
  "type": "string",
972
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
446
973
  "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
447
- "description": "Canonical A-share code.",
448
974
  "example": "SSE:600519"
449
975
  },
450
976
  "date": {
@@ -483,8 +1009,8 @@ export const OPERATIONS = {
483
1009
  "properties": {
484
1010
  "code": {
485
1011
  "type": "string",
1012
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
486
1013
  "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
487
- "description": "Canonical A-share code.",
488
1014
  "example": "SSE:600519"
489
1015
  },
490
1016
  "date": {
@@ -505,7 +1031,7 @@ export const OPERATIONS = {
505
1031
  "cliName": "financials reports",
506
1032
  "method": "GET",
507
1033
  "path": "/v1/financials/reports",
508
- "description": "返回该股票最近 N 期财务报告的核心指标(EPS/BPS/ROE/毛利率/营收/净利润/总\n资产/归母权益/经营现金流/总股本 等 ~25 字段)。可按 `kind` 过滤季报/半年报/\n年报。每期 `announce_date` 字段告知何时市场可见,建议结合回测时使用。\n",
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",
509
1035
  "summary": "Recent financial reports for one A-share security",
510
1036
  "positional": [],
511
1037
  "outputDefault": "json",
@@ -523,8 +1049,8 @@ export const OPERATIONS = {
523
1049
  "properties": {
524
1050
  "code": {
525
1051
  "type": "string",
1052
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
526
1053
  "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
527
- "description": "Canonical A-share code.",
528
1054
  "example": "SSE:600519"
529
1055
  },
530
1056
  "limit": {
@@ -575,8 +1101,8 @@ export const OPERATIONS = {
575
1101
  "properties": {
576
1102
  "code": {
577
1103
  "type": "string",
1104
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
578
1105
  "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
579
- "description": "Canonical A-share code.",
580
1106
  "example": "SSE:600519"
581
1107
  },
582
1108
  "metric": {
@@ -739,6 +1265,311 @@ export const OPERATIONS = {
739
1265
  "additionalProperties": false
740
1266
  }
741
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",
1387
+ "method": "GET",
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
+ ],
1394
+ "outputDefault": "json",
1395
+ "pagination": "none",
1396
+ "stream": false,
1397
+ "billable": true,
1398
+ "idempotencyRequired": false,
1399
+ "scopesAny": [
1400
+ "quote:l1",
1401
+ "quote:l2",
1402
+ "quote:delayed"
1403
+ ],
1404
+ "sideEffect": "read",
1405
+ "dryRunSupported": false,
1406
+ "inputSchema": {
1407
+ "type": "object",
1408
+ "properties": {
1409
+ "key": {
1410
+ "type": "string",
1411
+ "description": "Industry key in `<sw_industry_code>:<sw_level>` format (e.g. `401001:1`).",
1412
+ "example": "401001:1"
1413
+ }
1414
+ },
1415
+ "additionalProperties": false,
1416
+ "required": [
1417
+ "key"
1418
+ ]
1419
+ }
1420
+ },
1421
+ "industries.snapshot": {
1422
+ "cliKey": "industries.snapshot",
1423
+ "cliName": "industries snapshot",
1424
+ "method": "GET",
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",
1428
+ "positional": [],
1429
+ "outputDefault": "json",
1430
+ "pagination": "none",
1431
+ "stream": false,
1432
+ "billable": true,
1433
+ "idempotencyRequired": false,
1434
+ "scopesAny": [
1435
+ "quote:l1",
1436
+ "quote:l2",
1437
+ "quote:delayed"
1438
+ ],
1439
+ "sideEffect": "read",
1440
+ "dryRunSupported": false,
1441
+ "inputSchema": {
1442
+ "type": "object",
1443
+ "properties": {
1444
+ "codes": {
1445
+ "type": "string",
1446
+ "description": "Comma-separated `sw_code:level` (e.g. `401001:1,401002:1`); omit for all"
1447
+ }
1448
+ },
1449
+ "additionalProperties": false
1450
+ }
1451
+ },
1452
+ "limit-up.history": {
1453
+ "cliKey": "limit-up.history",
1454
+ "cliName": "limit-up history",
1455
+ "method": "GET",
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)",
1459
+ "positional": [],
1460
+ "outputDefault": "json",
1461
+ "pagination": "none",
1462
+ "stream": false,
1463
+ "billable": true,
1464
+ "idempotencyRequired": false,
1465
+ "scopesAny": [
1466
+ "quote:l1",
1467
+ "quote:l2",
1468
+ "quote:delayed"
1469
+ ],
1470
+ "sideEffect": "read",
1471
+ "dryRunSupported": false,
1472
+ "inputSchema": {
1473
+ "type": "object",
1474
+ "properties": {
1475
+ "days": {
1476
+ "type": "integer",
1477
+ "minimum": 1,
1478
+ "maximum": 250,
1479
+ "default": 30,
1480
+ "description": "回看天数(1-250,默认 30)。"
1481
+ }
1482
+ },
1483
+ "additionalProperties": false
1484
+ }
1485
+ },
1486
+ "limit-up.pool": {
1487
+ "cliKey": "limit-up.pool",
1488
+ "cliName": "limit-up pool",
1489
+ "method": "GET",
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",
1493
+ "positional": [],
1494
+ "outputDefault": "json",
1495
+ "pagination": "none",
1496
+ "stream": false,
1497
+ "billable": true,
1498
+ "idempotencyRequired": false,
1499
+ "scopesAny": [
1500
+ "quote:l1",
1501
+ "quote:l2",
1502
+ "quote:delayed"
1503
+ ],
1504
+ "sideEffect": "read",
1505
+ "dryRunSupported": false,
1506
+ "inputSchema": {
1507
+ "type": "object",
1508
+ "properties": {
1509
+ "trade_date": {
1510
+ "type": "string",
1511
+ "format": "date",
1512
+ "description": "ISO date YYYY-MM-DD;不传走 latest(含盘前回退)。"
1513
+ },
1514
+ "include": {
1515
+ "type": "string",
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。"
1527
+ }
1528
+ },
1529
+ "additionalProperties": false
1530
+ }
1531
+ },
1532
+ "limit-up.summary": {
1533
+ "cliKey": "limit-up.summary",
1534
+ "cliName": "limit-up summary",
1535
+ "method": "GET",
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",
1539
+ "positional": [],
1540
+ "outputDefault": "json",
1541
+ "pagination": "none",
1542
+ "stream": false,
1543
+ "billable": true,
1544
+ "idempotencyRequired": false,
1545
+ "scopesAny": [
1546
+ "quote:l1",
1547
+ "quote:l2",
1548
+ "quote:delayed"
1549
+ ],
1550
+ "sideEffect": "read",
1551
+ "dryRunSupported": false,
1552
+ "inputSchema": {
1553
+ "type": "object",
1554
+ "properties": {
1555
+ "trade_date": {
1556
+ "type": "string",
1557
+ "format": "date",
1558
+ "description": "ISO date YYYY-MM-DD;不传走 latest。"
1559
+ },
1560
+ "include": {
1561
+ "type": "string",
1562
+ "enum": [
1563
+ "active",
1564
+ "all"
1565
+ ],
1566
+ "default": "active",
1567
+ "description": "active(默认 all_a_ex_st 口径)/ all(all_a 口径)。"
1568
+ }
1569
+ },
1570
+ "additionalProperties": false
1571
+ }
1572
+ },
742
1573
  "market.status": {
743
1574
  "cliKey": "market.status",
744
1575
  "cliName": "market status",
@@ -843,9 +1674,9 @@ export const OPERATIONS = {
843
1674
  "properties": {
844
1675
  "security": {
845
1676
  "type": "string",
846
- "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
847
- "description": "Canonical security code.",
848
- "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"
849
1680
  },
850
1681
  "since_hours": {
851
1682
  "type": "integer",
@@ -966,7 +1797,9 @@ export const OPERATIONS = {
966
1797
  "type": "array",
967
1798
  "items": {
968
1799
  "type": "string",
969
- "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"
970
1803
  },
971
1804
  "minItems": 1,
972
1805
  "maxItems": 200,
@@ -1116,8 +1949,8 @@ export const OPERATIONS = {
1116
1949
  "properties": {
1117
1950
  "code": {
1118
1951
  "type": "string",
1952
+ "description": "A-share canonical code (SSE/SZSE/BSE only). For quote/chart/bars/financials endpoints.",
1119
1953
  "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
1120
- "description": "Canonical A-share code.",
1121
1954
  "example": "SSE:600519"
1122
1955
  }
1123
1956
  },
@@ -1172,7 +2005,7 @@ export const OPERATIONS = {
1172
2005
  "cliName": "sentiment breadth",
1173
2006
  "method": "GET",
1174
2007
  "path": "/v1/sentiment/breadth",
1175
- "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",
1176
2009
  "summary": "Intraday breadth time series",
1177
2010
  "positional": [],
1178
2011
  "outputDefault": "json",
@@ -1200,6 +2033,11 @@ export const OPERATIONS = {
1200
2033
  ],
1201
2034
  "default": "all_a_ex_st",
1202
2035
  "description": "Universe filter."
2036
+ },
2037
+ "trade_date": {
2038
+ "type": "string",
2039
+ "format": "date",
2040
+ "description": "ISO date YYYY-MM-DD;不传走今日(盘前 9:00 前返空)。"
1203
2041
  }
1204
2042
  },
1205
2043
  "additionalProperties": false
@@ -1210,7 +2048,7 @@ export const OPERATIONS = {
1210
2048
  "cliName": "sentiment overview",
1211
2049
  "method": "GET",
1212
2050
  "path": "/v1/sentiment/overview",
1213
- "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",
1214
2052
  "summary": "Aggregate market sentiment indicators",
1215
2053
  "positional": [],
1216
2054
  "outputDefault": "json",
@@ -1239,6 +2077,11 @@ export const OPERATIONS = {
1239
2077
  "default": "all_a_ex_st",
1240
2078
  "description": "Universe filter.",
1241
2079
  "example": "main_board"
2080
+ },
2081
+ "trade_date": {
2082
+ "type": "string",
2083
+ "format": "date",
2084
+ "description": "ISO date YYYY-MM-DD;不传走今日(实时)。"
1242
2085
  }
1243
2086
  },
1244
2087
  "additionalProperties": false
@@ -1273,7 +2116,7 @@ export const OPERATIONS = {
1273
2116
  "cliName": "sentiment turnover",
1274
2117
  "method": "GET",
1275
2118
  "path": "/v1/sentiment/turnover",
1276
- "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",
1277
2120
  "summary": "Intraday turnover time series",
1278
2121
  "positional": [],
1279
2122
  "outputDefault": "json",
@@ -1301,6 +2144,18 @@ export const OPERATIONS = {
1301
2144
  ],
1302
2145
  "default": "all_a_ex_st",
1303
2146
  "description": "Universe filter."
2147
+ },
2148
+ "trade_date": {
2149
+ "type": "string",
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)。"
1304
2159
  }
1305
2160
  },
1306
2161
  "additionalProperties": false
@@ -1499,8 +2354,9 @@ export const OPERATIONS = {
1499
2354
  },
1500
2355
  "security": {
1501
2356
  "type": "string",
1502
- "pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
1503
- "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"
1504
2360
  },
1505
2361
  "since_days": {
1506
2362
  "type": "integer",