echopai 2.2.0 → 2.4.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.
- package/README.md +63 -348
- package/dist/bin.js +8302 -149
- package/package.json +11 -13
- package/dist/_generated/commands.js +0 -282
- package/dist/_generated/help.js +0 -195
- package/dist/_generated/operations.js +0 -1529
- package/dist/runtime/auth.js +0 -95
- package/dist/runtime/envelope.js +0 -52
- package/dist/runtime/errors.js +0 -186
- package/dist/runtime/filters.js +0 -153
- package/dist/runtime/format.js +0 -143
- package/dist/runtime/http.js +0 -65
- package/dist/runtime/idempotency.js +0 -18
- package/dist/runtime/invoker.js +0 -387
- package/dist/runtime/io.js +0 -16
- package/dist/runtime/paginator.js +0 -146
- package/dist/runtime/trace.js +0 -99
- package/dist/runtime/tty.js +0 -51
- package/dist/runtime/verb_cmd.js +0 -70
- package/dist/runtime/verb_runner.js +0 -152
- package/dist/runtime/whoami_cache.js +0 -109
- package/dist/tools/api.js +0 -81
- package/dist/tools/completion.js +0 -116
- package/dist/tools/config.js +0 -123
- package/dist/tools/doctor.js +0 -183
- package/dist/tools/login.js +0 -99
- package/dist/tools/mcp.js +0 -141
- package/dist/tools/raw.js +0 -96
- package/dist/tools/schema.js +0 -58
- package/dist/tools/trace.js +0 -54
- package/dist/tools/welcome.js +0 -190
- package/dist/tools/whoami.js +0 -132
- package/dist/verbs/_spec.js +0 -15
- package/dist/verbs/bars_batch.js +0 -66
- package/dist/verbs/chart.js +0 -110
- package/dist/verbs/digest.js +0 -344
- package/dist/verbs/financials.js +0 -212
- package/dist/verbs/hot.js +0 -29
- package/dist/verbs/index.js +0 -57
- package/dist/verbs/lookup.js +0 -72
- package/dist/verbs/news.js +0 -67
- package/dist/verbs/quote.js +0 -53
- package/dist/verbs/scan.js +0 -42
- package/dist/verbs/search.js +0 -105
- package/dist/verbs/sentiment.js +0 -46
- package/dist/verbs/views.js +0 -83
- package/dist/version.js +0 -5
|
@@ -1,1529 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AUTO-GENERATED — DO NOT EDIT BY HAND.
|
|
3
|
-
*
|
|
4
|
-
* Source: docs/api-contract/openapi.yaml (operations with x-cli-key + x-visibility: public)
|
|
5
|
-
* Generator: scripts/codegen/generate_cli_v2.py
|
|
6
|
-
*
|
|
7
|
-
* Regenerate:
|
|
8
|
-
* make codegen
|
|
9
|
-
*/
|
|
10
|
-
export const OPERATIONS = {
|
|
11
|
-
"agent.session-end": {
|
|
12
|
-
"cliKey": "agent.session-end",
|
|
13
|
-
"cliName": "agent session-end",
|
|
14
|
-
"method": "POST",
|
|
15
|
-
"path": "/v1/agent/session/{id}/end",
|
|
16
|
-
"description": "关闭 `/v1/agent/session/start` 开启的会话,最终用量提交入库。",
|
|
17
|
-
"summary": "End a billable agent session",
|
|
18
|
-
"positional": [
|
|
19
|
-
"id"
|
|
20
|
-
],
|
|
21
|
-
"outputDefault": "json",
|
|
22
|
-
"pagination": "none",
|
|
23
|
-
"stream": false,
|
|
24
|
-
"billable": false,
|
|
25
|
-
"idempotencyRequired": true,
|
|
26
|
-
"scopesAny": [
|
|
27
|
-
"agent:session.create",
|
|
28
|
-
"agent:session.read"
|
|
29
|
-
],
|
|
30
|
-
"sideEffect": "write",
|
|
31
|
-
"dryRunSupported": false,
|
|
32
|
-
"inputSchema": {
|
|
33
|
-
"type": "object",
|
|
34
|
-
"properties": {
|
|
35
|
-
"id": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"description": "Session id returned by /v1/agent/session/start."
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"additionalProperties": false,
|
|
41
|
-
"required": [
|
|
42
|
-
"id"
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"agent.session-start": {
|
|
47
|
-
"cliKey": "agent.session-start",
|
|
48
|
-
"cliName": "agent session-start",
|
|
49
|
-
"method": "POST",
|
|
50
|
-
"path": "/v1/agent/session/start",
|
|
51
|
-
"description": "开启 agent kind 凭据的计费会话。返回 session_id,用于将多次调用归并到一次 billable 单位。需要 `Idempotency-Key` 头。",
|
|
52
|
-
"summary": "Start a billable agent session",
|
|
53
|
-
"positional": [],
|
|
54
|
-
"outputDefault": "json",
|
|
55
|
-
"pagination": "none",
|
|
56
|
-
"stream": false,
|
|
57
|
-
"billable": false,
|
|
58
|
-
"idempotencyRequired": true,
|
|
59
|
-
"scopesAny": [
|
|
60
|
-
"agent:session.create"
|
|
61
|
-
],
|
|
62
|
-
"sideEffect": "write",
|
|
63
|
-
"dryRunSupported": true,
|
|
64
|
-
"inputSchema": {
|
|
65
|
-
"type": "object",
|
|
66
|
-
"properties": {
|
|
67
|
-
"agent_id": {
|
|
68
|
-
"type": "string",
|
|
69
|
-
"maxLength": 200,
|
|
70
|
-
"description": "Partner-defined agent identifier (max 200 chars).",
|
|
71
|
-
"example": "agent-prod-1"
|
|
72
|
-
},
|
|
73
|
-
"conversation_id": {
|
|
74
|
-
"type": "string",
|
|
75
|
-
"maxLength": 200,
|
|
76
|
-
"description": "Optional conversation thread id (max 200 chars)."
|
|
77
|
-
},
|
|
78
|
-
"scopes": {
|
|
79
|
-
"type": "array",
|
|
80
|
-
"items": {
|
|
81
|
-
"type": "string"
|
|
82
|
-
},
|
|
83
|
-
"description": "Subset of partner scopes to derive into the agent token. Omit for \"all derivable from partner scopes\"."
|
|
84
|
-
},
|
|
85
|
-
"budget_usd": {
|
|
86
|
-
"type": "number",
|
|
87
|
-
"exclusiveMinimum": 0,
|
|
88
|
-
"maximum": 1000,
|
|
89
|
-
"default": 1.0,
|
|
90
|
-
"description": "Hard USD budget cap; session terminates when exhausted (0 < x ≤ 1000).",
|
|
91
|
-
"example": 1.0
|
|
92
|
-
},
|
|
93
|
-
"ttl_seconds": {
|
|
94
|
-
"type": "integer",
|
|
95
|
-
"minimum": 60,
|
|
96
|
-
"maximum": 28800,
|
|
97
|
-
"default": 3600,
|
|
98
|
-
"description": "Session lifetime cap (60 ≤ x ≤ 28800, default 1h)."
|
|
99
|
-
},
|
|
100
|
-
"metadata": {
|
|
101
|
-
"type": "object",
|
|
102
|
-
"description": "Free-form JSON object for partner bookkeeping (e.g. user_intent, model name)."
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"additionalProperties": false,
|
|
106
|
-
"required": [
|
|
107
|
-
"agent_id"
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
"agent.session-usage": {
|
|
112
|
-
"cliKey": "agent.session-usage",
|
|
113
|
-
"cliName": "agent session-usage",
|
|
114
|
-
"method": "GET",
|
|
115
|
-
"path": "/v1/agent/session/{id}/usage",
|
|
116
|
-
"description": "返回 session 内累计 billable 调用次数、各 scope 配额消耗。",
|
|
117
|
-
"summary": "Get cumulative usage of an agent session",
|
|
118
|
-
"positional": [
|
|
119
|
-
"id"
|
|
120
|
-
],
|
|
121
|
-
"outputDefault": "json",
|
|
122
|
-
"pagination": "none",
|
|
123
|
-
"stream": false,
|
|
124
|
-
"billable": false,
|
|
125
|
-
"idempotencyRequired": false,
|
|
126
|
-
"scopesAny": [
|
|
127
|
-
"agent:session.create",
|
|
128
|
-
"agent:session.read"
|
|
129
|
-
],
|
|
130
|
-
"sideEffect": "read",
|
|
131
|
-
"dryRunSupported": false,
|
|
132
|
-
"inputSchema": {
|
|
133
|
-
"type": "object",
|
|
134
|
-
"properties": {
|
|
135
|
-
"id": {
|
|
136
|
-
"type": "string",
|
|
137
|
-
"description": "Session id returned by /v1/agent/session/start."
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"additionalProperties": false,
|
|
141
|
-
"required": [
|
|
142
|
-
"id"
|
|
143
|
-
]
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
"auth.whoami": {
|
|
147
|
-
"cliKey": "auth.whoami",
|
|
148
|
-
"cliName": "auth whoami",
|
|
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": [],
|
|
154
|
-
"outputDefault": "json",
|
|
155
|
-
"pagination": "none",
|
|
156
|
-
"stream": false,
|
|
157
|
-
"billable": false,
|
|
158
|
-
"idempotencyRequired": false,
|
|
159
|
-
"scopesAny": [],
|
|
160
|
-
"sideEffect": "read",
|
|
161
|
-
"dryRunSupported": false,
|
|
162
|
-
"inputSchema": {
|
|
163
|
-
"type": "object",
|
|
164
|
-
"properties": {},
|
|
165
|
-
"additionalProperties": false
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
"bars.daily": {
|
|
169
|
-
"cliKey": "bars.daily",
|
|
170
|
-
"cliName": "bars daily",
|
|
171
|
-
"method": "GET",
|
|
172
|
-
"path": "/v1/bars/daily",
|
|
173
|
-
"description": "Daily OHLC bars for one A-share security over a date range. Returns open / high / low / close / volume / turnover per trading day. Requires `bars:30d` (last 30 trading days) or `bars:full` (full history) scope.",
|
|
174
|
-
"summary": "Daily OHLC bars for one A-share security",
|
|
175
|
-
"positional": [],
|
|
176
|
-
"outputDefault": "json",
|
|
177
|
-
"pagination": "none",
|
|
178
|
-
"stream": false,
|
|
179
|
-
"billable": true,
|
|
180
|
-
"idempotencyRequired": false,
|
|
181
|
-
"scopesAny": [
|
|
182
|
-
"bars:30d",
|
|
183
|
-
"bars:full"
|
|
184
|
-
],
|
|
185
|
-
"sideEffect": "read",
|
|
186
|
-
"dryRunSupported": false,
|
|
187
|
-
"inputSchema": {
|
|
188
|
-
"type": "object",
|
|
189
|
-
"properties": {
|
|
190
|
-
"code": {
|
|
191
|
-
"type": "string",
|
|
192
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
|
|
193
|
-
"description": "Single canonical code.",
|
|
194
|
-
"example": "SSE:600519"
|
|
195
|
-
},
|
|
196
|
-
"from": {
|
|
197
|
-
"type": "string",
|
|
198
|
-
"format": "date",
|
|
199
|
-
"description": "Inclusive start date (YYYY-MM-DD).",
|
|
200
|
-
"example": "2026-01-01"
|
|
201
|
-
},
|
|
202
|
-
"to": {
|
|
203
|
-
"type": "string",
|
|
204
|
-
"format": "date",
|
|
205
|
-
"description": "Inclusive end date (YYYY-MM-DD).",
|
|
206
|
-
"example": "2026-05-01"
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
"additionalProperties": false,
|
|
210
|
-
"required": [
|
|
211
|
-
"code",
|
|
212
|
-
"from",
|
|
213
|
-
"to"
|
|
214
|
-
]
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
"bars.daily-batch": {
|
|
218
|
-
"cliKey": "bars.daily-batch",
|
|
219
|
-
"cliName": "bars daily-batch",
|
|
220
|
-
"method": "GET",
|
|
221
|
-
"path": "/v1/bars/daily-batch",
|
|
222
|
-
"description": "Batch daily OHLC bars for multiple A-share securities. Up to 100 codes\nper call, up to 1-year date range. Single round-trip; ClickHouse `IN(...)`\nunder the hood.\n\nReturns partial success envelope: codes denied by `allowed_securities`\nappear in `errors[]`, others in `items[]` (with empty `bars[]` if no\ndata found). Order in `items[]` matches input order.\n\nRequires `bars:30d` or `bars:full` scope.\n",
|
|
223
|
-
"summary": "Batch daily OHLC bars for up to 100 A-share securities",
|
|
224
|
-
"positional": [],
|
|
225
|
-
"outputDefault": "json",
|
|
226
|
-
"pagination": "none",
|
|
227
|
-
"stream": false,
|
|
228
|
-
"billable": true,
|
|
229
|
-
"idempotencyRequired": false,
|
|
230
|
-
"scopesAny": [
|
|
231
|
-
"bars:30d",
|
|
232
|
-
"bars:full"
|
|
233
|
-
],
|
|
234
|
-
"sideEffect": "read",
|
|
235
|
-
"dryRunSupported": false,
|
|
236
|
-
"inputSchema": {
|
|
237
|
-
"type": "object",
|
|
238
|
-
"properties": {
|
|
239
|
-
"codes": {
|
|
240
|
-
"type": "array",
|
|
241
|
-
"items": {
|
|
242
|
-
"type": "string",
|
|
243
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$"
|
|
244
|
-
},
|
|
245
|
-
"minItems": 1,
|
|
246
|
-
"maxItems": 100,
|
|
247
|
-
"description": "1-100 canonical codes; CSV-encoded on the wire.",
|
|
248
|
-
"example": [
|
|
249
|
-
"SSE:600519",
|
|
250
|
-
"SZSE:000001"
|
|
251
|
-
]
|
|
252
|
-
},
|
|
253
|
-
"from": {
|
|
254
|
-
"type": "string",
|
|
255
|
-
"format": "date",
|
|
256
|
-
"description": "Inclusive start date (YYYY-MM-DD)."
|
|
257
|
-
},
|
|
258
|
-
"to": {
|
|
259
|
-
"type": "string",
|
|
260
|
-
"format": "date",
|
|
261
|
-
"description": "Inclusive end date (YYYY-MM-DD). Range must be ≤ 365 days."
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
"additionalProperties": false,
|
|
265
|
-
"required": [
|
|
266
|
-
"codes",
|
|
267
|
-
"from",
|
|
268
|
-
"to"
|
|
269
|
-
]
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
"bars.minute": {
|
|
273
|
-
"cliKey": "bars.minute",
|
|
274
|
-
"cliName": "bars minute",
|
|
275
|
-
"method": "GET",
|
|
276
|
-
"path": "/v1/bars/minute",
|
|
277
|
-
"description": "Minute-level OHLC bars for one A-share security on a single trade date. Requires `bars:30d` or `bars:full` scope.",
|
|
278
|
-
"summary": "Minute-level OHLC bars for one A-share security",
|
|
279
|
-
"positional": [],
|
|
280
|
-
"outputDefault": "json",
|
|
281
|
-
"pagination": "none",
|
|
282
|
-
"stream": false,
|
|
283
|
-
"billable": true,
|
|
284
|
-
"idempotencyRequired": false,
|
|
285
|
-
"scopesAny": [
|
|
286
|
-
"bars:30d",
|
|
287
|
-
"bars:full"
|
|
288
|
-
],
|
|
289
|
-
"sideEffect": "read",
|
|
290
|
-
"dryRunSupported": false,
|
|
291
|
-
"inputSchema": {
|
|
292
|
-
"type": "object",
|
|
293
|
-
"properties": {
|
|
294
|
-
"code": {
|
|
295
|
-
"type": "string",
|
|
296
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
|
|
297
|
-
"description": "Single canonical code.",
|
|
298
|
-
"example": "SSE:600519"
|
|
299
|
-
},
|
|
300
|
-
"date": {
|
|
301
|
-
"type": "string",
|
|
302
|
-
"format": "date",
|
|
303
|
-
"description": "Single trade date (YYYY-MM-DD). Returns 240 minute bars for that session.",
|
|
304
|
-
"example": "2026-05-09"
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
"additionalProperties": false,
|
|
308
|
-
"required": [
|
|
309
|
-
"code",
|
|
310
|
-
"date"
|
|
311
|
-
]
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
"bars.minute-batch": {
|
|
315
|
-
"cliKey": "bars.minute-batch",
|
|
316
|
-
"cliName": "bars minute-batch",
|
|
317
|
-
"method": "GET",
|
|
318
|
-
"path": "/v1/bars/minute-batch",
|
|
319
|
-
"description": "Batch minute OHLC bars for multiple A-share securities. Up to 20 codes\nper call, up to 7 calendar days (≈5 trading days) date range. Single\nClickHouse round-trip; app groups rows by canonical_code.\n\nPartial success envelope same as daily-batch: codes denied by\n`allowed_securities` go to `errors[]`; others to `items[]` with flat\n`bars[]` (each bar carries its own `trade_date` for client grouping).\n\nRequires `bars:30d` or `bars:full` scope.\n",
|
|
320
|
-
"summary": "Batch minute OHLC bars for up to 20 A-share securities",
|
|
321
|
-
"positional": [],
|
|
322
|
-
"outputDefault": "json",
|
|
323
|
-
"pagination": "none",
|
|
324
|
-
"stream": false,
|
|
325
|
-
"billable": true,
|
|
326
|
-
"idempotencyRequired": false,
|
|
327
|
-
"scopesAny": [
|
|
328
|
-
"bars:30d",
|
|
329
|
-
"bars:full"
|
|
330
|
-
],
|
|
331
|
-
"sideEffect": "read",
|
|
332
|
-
"dryRunSupported": false,
|
|
333
|
-
"inputSchema": {
|
|
334
|
-
"type": "object",
|
|
335
|
-
"properties": {
|
|
336
|
-
"codes": {
|
|
337
|
-
"type": "array",
|
|
338
|
-
"items": {
|
|
339
|
-
"type": "string",
|
|
340
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$"
|
|
341
|
-
},
|
|
342
|
-
"minItems": 1,
|
|
343
|
-
"maxItems": 20,
|
|
344
|
-
"description": "1-20 canonical codes; CSV-encoded on the wire.",
|
|
345
|
-
"example": [
|
|
346
|
-
"SSE:600519",
|
|
347
|
-
"SZSE:000001"
|
|
348
|
-
]
|
|
349
|
-
},
|
|
350
|
-
"from": {
|
|
351
|
-
"type": "string",
|
|
352
|
-
"format": "date",
|
|
353
|
-
"description": "Inclusive start date (YYYY-MM-DD)."
|
|
354
|
-
},
|
|
355
|
-
"to": {
|
|
356
|
-
"type": "string",
|
|
357
|
-
"format": "date",
|
|
358
|
-
"description": "Inclusive end date. Range must be ≤ 7 calendar days."
|
|
359
|
-
}
|
|
360
|
-
},
|
|
361
|
-
"additionalProperties": false,
|
|
362
|
-
"required": [
|
|
363
|
-
"codes",
|
|
364
|
-
"from",
|
|
365
|
-
"to"
|
|
366
|
-
]
|
|
367
|
-
}
|
|
368
|
-
},
|
|
369
|
-
"digest.get": {
|
|
370
|
-
"cliKey": "digest.get",
|
|
371
|
-
"cliName": "digest get",
|
|
372
|
-
"method": "GET",
|
|
373
|
-
"path": "/v1/digest/{code}",
|
|
374
|
-
"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",
|
|
375
|
-
"summary": "One-shot research digest for a single security (composite)",
|
|
376
|
-
"positional": [
|
|
377
|
-
"code"
|
|
378
|
-
],
|
|
379
|
-
"outputDefault": "json",
|
|
380
|
-
"pagination": "none",
|
|
381
|
-
"stream": false,
|
|
382
|
-
"billable": true,
|
|
383
|
-
"idempotencyRequired": false,
|
|
384
|
-
"scopesAny": [],
|
|
385
|
-
"sideEffect": "read",
|
|
386
|
-
"dryRunSupported": false,
|
|
387
|
-
"inputSchema": {
|
|
388
|
-
"type": "object",
|
|
389
|
-
"properties": {
|
|
390
|
-
"code": {
|
|
391
|
-
"type": "string",
|
|
392
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
|
|
393
|
-
"description": "Canonical security code, e.g. SSE:600519."
|
|
394
|
-
},
|
|
395
|
-
"views_since_days": {
|
|
396
|
-
"type": "integer",
|
|
397
|
-
"minimum": 1,
|
|
398
|
-
"maximum": 90,
|
|
399
|
-
"default": 7,
|
|
400
|
-
"description": "Views lookback in days (1-90)."
|
|
401
|
-
},
|
|
402
|
-
"news_hours": {
|
|
403
|
-
"type": "integer",
|
|
404
|
-
"minimum": 1,
|
|
405
|
-
"maximum": 168,
|
|
406
|
-
"default": 24,
|
|
407
|
-
"description": "News lookback in hours (1-168)."
|
|
408
|
-
},
|
|
409
|
-
"limit_per_bucket": {
|
|
410
|
-
"type": "integer",
|
|
411
|
-
"minimum": 1,
|
|
412
|
-
"maximum": 50,
|
|
413
|
-
"default": 10,
|
|
414
|
-
"description": "Per-bucket item cap for views / news (1-50)."
|
|
415
|
-
}
|
|
416
|
-
},
|
|
417
|
-
"additionalProperties": false,
|
|
418
|
-
"required": [
|
|
419
|
-
"code"
|
|
420
|
-
]
|
|
421
|
-
}
|
|
422
|
-
},
|
|
423
|
-
"financials.pit": {
|
|
424
|
-
"cliKey": "financials.pit",
|
|
425
|
-
"cliName": "financials pit",
|
|
426
|
-
"method": "GET",
|
|
427
|
-
"path": "/v1/financials/pit",
|
|
428
|
-
"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",
|
|
429
|
-
"summary": "Point-in-time financial indicators for one A-share at a given date",
|
|
430
|
-
"positional": [],
|
|
431
|
-
"outputDefault": "json",
|
|
432
|
-
"pagination": "none",
|
|
433
|
-
"stream": false,
|
|
434
|
-
"billable": true,
|
|
435
|
-
"idempotencyRequired": false,
|
|
436
|
-
"scopesAny": [
|
|
437
|
-
"financials:read"
|
|
438
|
-
],
|
|
439
|
-
"sideEffect": "read",
|
|
440
|
-
"dryRunSupported": false,
|
|
441
|
-
"inputSchema": {
|
|
442
|
-
"type": "object",
|
|
443
|
-
"properties": {
|
|
444
|
-
"code": {
|
|
445
|
-
"type": "string",
|
|
446
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
|
|
447
|
-
"description": "Canonical A-share code.",
|
|
448
|
-
"example": "SSE:600519"
|
|
449
|
-
},
|
|
450
|
-
"date": {
|
|
451
|
-
"type": "string",
|
|
452
|
-
"format": "date",
|
|
453
|
-
"description": "Trade date in YYYY-MM-DD; defaults to today.",
|
|
454
|
-
"example": "2024-11-01"
|
|
455
|
-
}
|
|
456
|
-
},
|
|
457
|
-
"additionalProperties": false,
|
|
458
|
-
"required": [
|
|
459
|
-
"code"
|
|
460
|
-
]
|
|
461
|
-
}
|
|
462
|
-
},
|
|
463
|
-
"financials.quote-snapshot": {
|
|
464
|
-
"cliKey": "financials.quote-snapshot",
|
|
465
|
-
"cliName": "financials quote-snapshot",
|
|
466
|
-
"method": "GET",
|
|
467
|
-
"path": "/v1/financials/quote-snapshot",
|
|
468
|
-
"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",
|
|
469
|
-
"summary": "Real-time valuation / share / turnover snapshot for one A-share",
|
|
470
|
-
"positional": [],
|
|
471
|
-
"outputDefault": "json",
|
|
472
|
-
"pagination": "none",
|
|
473
|
-
"stream": false,
|
|
474
|
-
"billable": true,
|
|
475
|
-
"idempotencyRequired": false,
|
|
476
|
-
"scopesAny": [
|
|
477
|
-
"financials:read"
|
|
478
|
-
],
|
|
479
|
-
"sideEffect": "read",
|
|
480
|
-
"dryRunSupported": false,
|
|
481
|
-
"inputSchema": {
|
|
482
|
-
"type": "object",
|
|
483
|
-
"properties": {
|
|
484
|
-
"code": {
|
|
485
|
-
"type": "string",
|
|
486
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
|
|
487
|
-
"description": "Canonical A-share code.",
|
|
488
|
-
"example": "SSE:600519"
|
|
489
|
-
},
|
|
490
|
-
"date": {
|
|
491
|
-
"type": "string",
|
|
492
|
-
"format": "date",
|
|
493
|
-
"description": "Trade date YYYY-MM-DD; omit for real-time (Redis snapshot price).\n",
|
|
494
|
-
"example": "2026-05-13"
|
|
495
|
-
}
|
|
496
|
-
},
|
|
497
|
-
"additionalProperties": false,
|
|
498
|
-
"required": [
|
|
499
|
-
"code"
|
|
500
|
-
]
|
|
501
|
-
}
|
|
502
|
-
},
|
|
503
|
-
"financials.reports": {
|
|
504
|
-
"cliKey": "financials.reports",
|
|
505
|
-
"cliName": "financials reports",
|
|
506
|
-
"method": "GET",
|
|
507
|
-
"path": "/v1/financials/reports",
|
|
508
|
-
"description": "返回该股票最近 N 期财务报告的核心指标(EPS/BPS/ROE/毛利率/营收/净利润/总\n资产/归母权益/经营现金流/总股本 等 ~25 字段)。可按 `kind` 过滤季报/半年报/\n年报。每期 `announce_date` 字段告知何时市场可见,建议结合回测时使用。\n",
|
|
509
|
-
"summary": "Recent financial reports for one A-share security",
|
|
510
|
-
"positional": [],
|
|
511
|
-
"outputDefault": "json",
|
|
512
|
-
"pagination": "none",
|
|
513
|
-
"stream": false,
|
|
514
|
-
"billable": true,
|
|
515
|
-
"idempotencyRequired": false,
|
|
516
|
-
"scopesAny": [
|
|
517
|
-
"financials:read"
|
|
518
|
-
],
|
|
519
|
-
"sideEffect": "read",
|
|
520
|
-
"dryRunSupported": false,
|
|
521
|
-
"inputSchema": {
|
|
522
|
-
"type": "object",
|
|
523
|
-
"properties": {
|
|
524
|
-
"code": {
|
|
525
|
-
"type": "string",
|
|
526
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
|
|
527
|
-
"description": "Canonical A-share code.",
|
|
528
|
-
"example": "SSE:600519"
|
|
529
|
-
},
|
|
530
|
-
"limit": {
|
|
531
|
-
"type": "integer",
|
|
532
|
-
"minimum": 1,
|
|
533
|
-
"maximum": 100,
|
|
534
|
-
"default": 12,
|
|
535
|
-
"description": "Max periods to return (1-100, default 12)."
|
|
536
|
-
},
|
|
537
|
-
"kind": {
|
|
538
|
-
"type": "string",
|
|
539
|
-
"enum": [
|
|
540
|
-
"Q1",
|
|
541
|
-
"H1",
|
|
542
|
-
"Q3",
|
|
543
|
-
"annual",
|
|
544
|
-
"preliminary"
|
|
545
|
-
],
|
|
546
|
-
"description": "Filter by report kind."
|
|
547
|
-
}
|
|
548
|
-
},
|
|
549
|
-
"additionalProperties": false,
|
|
550
|
-
"required": [
|
|
551
|
-
"code"
|
|
552
|
-
]
|
|
553
|
-
}
|
|
554
|
-
},
|
|
555
|
-
"financials.series": {
|
|
556
|
-
"cliKey": "financials.series",
|
|
557
|
-
"cliName": "financials series",
|
|
558
|
-
"method": "GET",
|
|
559
|
-
"path": "/v1/financials/series",
|
|
560
|
-
"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",
|
|
561
|
-
"summary": "Time series of a single financial metric for one security",
|
|
562
|
-
"positional": [],
|
|
563
|
-
"outputDefault": "json",
|
|
564
|
-
"pagination": "none",
|
|
565
|
-
"stream": false,
|
|
566
|
-
"billable": true,
|
|
567
|
-
"idempotencyRequired": false,
|
|
568
|
-
"scopesAny": [
|
|
569
|
-
"financials:read"
|
|
570
|
-
],
|
|
571
|
-
"sideEffect": "read",
|
|
572
|
-
"dryRunSupported": false,
|
|
573
|
-
"inputSchema": {
|
|
574
|
-
"type": "object",
|
|
575
|
-
"properties": {
|
|
576
|
-
"code": {
|
|
577
|
-
"type": "string",
|
|
578
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
|
|
579
|
-
"description": "Canonical A-share code.",
|
|
580
|
-
"example": "SSE:600519"
|
|
581
|
-
},
|
|
582
|
-
"metric": {
|
|
583
|
-
"type": "string",
|
|
584
|
-
"minLength": 1,
|
|
585
|
-
"maxLength": 64,
|
|
586
|
-
"description": "Indicator field name (e.g. roe_simple, revenue, ni_parent).",
|
|
587
|
-
"example": "roe_simple"
|
|
588
|
-
},
|
|
589
|
-
"from": {
|
|
590
|
-
"type": "string",
|
|
591
|
-
"format": "date",
|
|
592
|
-
"description": "Inclusive earliest report_date."
|
|
593
|
-
},
|
|
594
|
-
"to": {
|
|
595
|
-
"type": "string",
|
|
596
|
-
"format": "date",
|
|
597
|
-
"description": "Inclusive latest report_date."
|
|
598
|
-
},
|
|
599
|
-
"limit": {
|
|
600
|
-
"type": "integer",
|
|
601
|
-
"minimum": 1,
|
|
602
|
-
"maximum": 200,
|
|
603
|
-
"default": 40,
|
|
604
|
-
"description": "Max points (1-200, default 40)."
|
|
605
|
-
}
|
|
606
|
-
},
|
|
607
|
-
"additionalProperties": false,
|
|
608
|
-
"required": [
|
|
609
|
-
"code",
|
|
610
|
-
"metric"
|
|
611
|
-
]
|
|
612
|
-
}
|
|
613
|
-
},
|
|
614
|
-
"index.daily-bars": {
|
|
615
|
-
"cliKey": "index.daily-bars",
|
|
616
|
-
"cliName": "index daily-bars",
|
|
617
|
-
"method": "GET",
|
|
618
|
-
"path": "/v1/index/bars/daily",
|
|
619
|
-
"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",
|
|
620
|
-
"summary": "Daily OHLC bars for one A-share index",
|
|
621
|
-
"positional": [],
|
|
622
|
-
"outputDefault": "json",
|
|
623
|
-
"pagination": "none",
|
|
624
|
-
"stream": false,
|
|
625
|
-
"billable": true,
|
|
626
|
-
"idempotencyRequired": false,
|
|
627
|
-
"scopesAny": [
|
|
628
|
-
"quote:l1",
|
|
629
|
-
"quote:l2",
|
|
630
|
-
"quote:delayed"
|
|
631
|
-
],
|
|
632
|
-
"sideEffect": "read",
|
|
633
|
-
"dryRunSupported": false,
|
|
634
|
-
"inputSchema": {
|
|
635
|
-
"type": "object",
|
|
636
|
-
"properties": {
|
|
637
|
-
"code": {
|
|
638
|
-
"type": "string",
|
|
639
|
-
"description": "Canonical index code.",
|
|
640
|
-
"example": "SSE:000001"
|
|
641
|
-
},
|
|
642
|
-
"from": {
|
|
643
|
-
"type": "string",
|
|
644
|
-
"format": "date",
|
|
645
|
-
"description": "Inclusive start date (YYYY-MM-DD).",
|
|
646
|
-
"example": "2024-01-01"
|
|
647
|
-
},
|
|
648
|
-
"to": {
|
|
649
|
-
"type": "string",
|
|
650
|
-
"format": "date",
|
|
651
|
-
"description": "Inclusive end date.",
|
|
652
|
-
"example": "2024-12-31"
|
|
653
|
-
}
|
|
654
|
-
},
|
|
655
|
-
"additionalProperties": false,
|
|
656
|
-
"required": [
|
|
657
|
-
"code",
|
|
658
|
-
"from",
|
|
659
|
-
"to"
|
|
660
|
-
]
|
|
661
|
-
}
|
|
662
|
-
},
|
|
663
|
-
"index.minute-bars": {
|
|
664
|
-
"cliKey": "index.minute-bars",
|
|
665
|
-
"cliName": "index minute-bars",
|
|
666
|
-
"method": "GET",
|
|
667
|
-
"path": "/v1/index/bars/minute",
|
|
668
|
-
"description": "指数 1min OHLC。日期范围 ≤ 7 天(与 `/v1/bars/minute-batch` 对齐)。\n返回 `bar_time` / `trade_date` / OHLC / volume / amount / pct_change。\n",
|
|
669
|
-
"summary": "Minute OHLC bars for one A-share index",
|
|
670
|
-
"positional": [],
|
|
671
|
-
"outputDefault": "json",
|
|
672
|
-
"pagination": "none",
|
|
673
|
-
"stream": false,
|
|
674
|
-
"billable": true,
|
|
675
|
-
"idempotencyRequired": false,
|
|
676
|
-
"scopesAny": [
|
|
677
|
-
"quote:l1",
|
|
678
|
-
"quote:l2",
|
|
679
|
-
"quote:delayed"
|
|
680
|
-
],
|
|
681
|
-
"sideEffect": "read",
|
|
682
|
-
"dryRunSupported": false,
|
|
683
|
-
"inputSchema": {
|
|
684
|
-
"type": "object",
|
|
685
|
-
"properties": {
|
|
686
|
-
"code": {
|
|
687
|
-
"type": "string",
|
|
688
|
-
"description": "Canonical index code.",
|
|
689
|
-
"example": "SSE:000001"
|
|
690
|
-
},
|
|
691
|
-
"from": {
|
|
692
|
-
"type": "string",
|
|
693
|
-
"format": "date",
|
|
694
|
-
"description": "Inclusive start date (YYYY-MM-DD)."
|
|
695
|
-
},
|
|
696
|
-
"to": {
|
|
697
|
-
"type": "string",
|
|
698
|
-
"format": "date",
|
|
699
|
-
"description": "Inclusive end date. Range ≤ 7 calendar days."
|
|
700
|
-
}
|
|
701
|
-
},
|
|
702
|
-
"additionalProperties": false,
|
|
703
|
-
"required": [
|
|
704
|
-
"code",
|
|
705
|
-
"from",
|
|
706
|
-
"to"
|
|
707
|
-
]
|
|
708
|
-
}
|
|
709
|
-
},
|
|
710
|
-
"index.snapshot": {
|
|
711
|
-
"cliKey": "index.snapshot",
|
|
712
|
-
"cliName": "index snapshot",
|
|
713
|
-
"method": "GET",
|
|
714
|
-
"path": "/v1/index/snapshot",
|
|
715
|
-
"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",
|
|
716
|
-
"summary": "Real-time snapshot of all Sina-OK A-share indices (172 indices)",
|
|
717
|
-
"positional": [],
|
|
718
|
-
"outputDefault": "json",
|
|
719
|
-
"pagination": "none",
|
|
720
|
-
"stream": false,
|
|
721
|
-
"billable": true,
|
|
722
|
-
"idempotencyRequired": false,
|
|
723
|
-
"scopesAny": [
|
|
724
|
-
"quote:l1",
|
|
725
|
-
"quote:l2",
|
|
726
|
-
"quote:delayed"
|
|
727
|
-
],
|
|
728
|
-
"sideEffect": "read",
|
|
729
|
-
"dryRunSupported": false,
|
|
730
|
-
"inputSchema": {
|
|
731
|
-
"type": "object",
|
|
732
|
-
"properties": {
|
|
733
|
-
"codes": {
|
|
734
|
-
"type": "string",
|
|
735
|
-
"description": "Comma-separated canonical index codes (e.g. `SSE:000001,SZSE:399001,BSE:899050`).\nOmit to return all 172.\n",
|
|
736
|
-
"example": "SSE:000001,SZSE:399001,BSE:899050"
|
|
737
|
-
}
|
|
738
|
-
},
|
|
739
|
-
"additionalProperties": false
|
|
740
|
-
}
|
|
741
|
-
},
|
|
742
|
-
"market.status": {
|
|
743
|
-
"cliKey": "market.status",
|
|
744
|
-
"cliName": "market status",
|
|
745
|
-
"method": "GET",
|
|
746
|
-
"path": "/v1/market/status",
|
|
747
|
-
"description": "Current A-share market session: pre-open / open / lunch / closed; current and next trading day; holiday flag. Requires `market:read` or any `quote:*` scope.",
|
|
748
|
-
"summary": "Current A-share market session state",
|
|
749
|
-
"positional": [],
|
|
750
|
-
"outputDefault": "json",
|
|
751
|
-
"pagination": "none",
|
|
752
|
-
"stream": false,
|
|
753
|
-
"billable": false,
|
|
754
|
-
"idempotencyRequired": false,
|
|
755
|
-
"scopesAny": [
|
|
756
|
-
"market:read",
|
|
757
|
-
"quote:l1",
|
|
758
|
-
"quote:l2",
|
|
759
|
-
"quote:delayed"
|
|
760
|
-
],
|
|
761
|
-
"sideEffect": "read",
|
|
762
|
-
"dryRunSupported": false,
|
|
763
|
-
"inputSchema": {
|
|
764
|
-
"type": "object",
|
|
765
|
-
"properties": {},
|
|
766
|
-
"additionalProperties": false
|
|
767
|
-
}
|
|
768
|
-
},
|
|
769
|
-
"news.feed": {
|
|
770
|
-
"cliKey": "news.feed",
|
|
771
|
-
"cliName": "news feed",
|
|
772
|
-
"method": "GET",
|
|
773
|
-
"path": "/v1/news",
|
|
774
|
-
"description": "与 `/v1/news/list` 行为一致,旧客户端兼容用。",
|
|
775
|
-
"summary": "List recent news (alias of /v1/news/list)",
|
|
776
|
-
"positional": [],
|
|
777
|
-
"outputDefault": "json",
|
|
778
|
-
"pagination": "offset",
|
|
779
|
-
"stream": false,
|
|
780
|
-
"billable": false,
|
|
781
|
-
"idempotencyRequired": false,
|
|
782
|
-
"scopesAny": [],
|
|
783
|
-
"sideEffect": "read",
|
|
784
|
-
"dryRunSupported": false,
|
|
785
|
-
"inputSchema": {
|
|
786
|
-
"type": "object",
|
|
787
|
-
"properties": {},
|
|
788
|
-
"additionalProperties": false
|
|
789
|
-
}
|
|
790
|
-
},
|
|
791
|
-
"news.get": {
|
|
792
|
-
"cliKey": "news.get",
|
|
793
|
-
"cliName": "news get",
|
|
794
|
-
"method": "GET",
|
|
795
|
-
"path": "/v1/news/{news_id}",
|
|
796
|
-
"description": "返回新闻完整内容:title、content snippet、tagged securities。(采集端字段 source / source_id / source_url 对外不暴露,admin 路径 /v1/admin/news/{id} 可见。)",
|
|
797
|
-
"summary": "Fetch a single news item by id",
|
|
798
|
-
"positional": [
|
|
799
|
-
"news_id"
|
|
800
|
-
],
|
|
801
|
-
"outputDefault": "json",
|
|
802
|
-
"pagination": "none",
|
|
803
|
-
"stream": false,
|
|
804
|
-
"billable": false,
|
|
805
|
-
"idempotencyRequired": false,
|
|
806
|
-
"scopesAny": [],
|
|
807
|
-
"sideEffect": "read",
|
|
808
|
-
"dryRunSupported": false,
|
|
809
|
-
"inputSchema": {
|
|
810
|
-
"type": "object",
|
|
811
|
-
"properties": {
|
|
812
|
-
"news_id": {
|
|
813
|
-
"type": "string",
|
|
814
|
-
"description": "News item id (returned by news.list / search items[].id)."
|
|
815
|
-
}
|
|
816
|
-
},
|
|
817
|
-
"additionalProperties": false,
|
|
818
|
-
"required": [
|
|
819
|
-
"news_id"
|
|
820
|
-
]
|
|
821
|
-
}
|
|
822
|
-
},
|
|
823
|
-
"news.list": {
|
|
824
|
-
"cliKey": "news.list",
|
|
825
|
-
"cliName": "news list",
|
|
826
|
-
"method": "GET",
|
|
827
|
-
"path": "/v1/news/list",
|
|
828
|
-
"description": "List news mentioning a specific A-share security, ordered by published_at desc. Requires `news:read` scope.",
|
|
829
|
-
"summary": "List news mentioning a specific security",
|
|
830
|
-
"positional": [],
|
|
831
|
-
"outputDefault": "json",
|
|
832
|
-
"pagination": "none",
|
|
833
|
-
"stream": false,
|
|
834
|
-
"billable": true,
|
|
835
|
-
"idempotencyRequired": false,
|
|
836
|
-
"scopesAny": [
|
|
837
|
-
"news:read"
|
|
838
|
-
],
|
|
839
|
-
"sideEffect": "read",
|
|
840
|
-
"dryRunSupported": false,
|
|
841
|
-
"inputSchema": {
|
|
842
|
-
"type": "object",
|
|
843
|
-
"properties": {
|
|
844
|
-
"security": {
|
|
845
|
-
"type": "string",
|
|
846
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
|
|
847
|
-
"description": "Canonical security code.",
|
|
848
|
-
"example": "SSE:600519"
|
|
849
|
-
},
|
|
850
|
-
"since_hours": {
|
|
851
|
-
"type": "integer",
|
|
852
|
-
"minimum": 1,
|
|
853
|
-
"maximum": 720,
|
|
854
|
-
"default": 24,
|
|
855
|
-
"description": "Lookback window in hours (max 720 = 30 days)."
|
|
856
|
-
},
|
|
857
|
-
"limit": {
|
|
858
|
-
"type": "integer",
|
|
859
|
-
"minimum": 1,
|
|
860
|
-
"maximum": 100,
|
|
861
|
-
"default": 20,
|
|
862
|
-
"description": "Max items per page."
|
|
863
|
-
}
|
|
864
|
-
},
|
|
865
|
-
"additionalProperties": false,
|
|
866
|
-
"required": [
|
|
867
|
-
"security"
|
|
868
|
-
]
|
|
869
|
-
}
|
|
870
|
-
},
|
|
871
|
-
"news.search": {
|
|
872
|
-
"cliKey": "news.search",
|
|
873
|
-
"cliName": "news search",
|
|
874
|
-
"method": "GET",
|
|
875
|
-
"path": "/v1/news/search",
|
|
876
|
-
"description": "Full-text search recent news / market briefs. Returns title, published_at, snippet, tagged securities. (Internal collector identifiers — `source`/`source_id`/`source_url` — are NOT exposed publicly; admin tools see them via /v1/admin/*.) Requires `news:read` scope. Note: news fields are user-generated; meta.untrusted_text_fields lists fields that need sanitization before passing to an LLM.",
|
|
877
|
-
"summary": "Full-text search recent news",
|
|
878
|
-
"positional": [],
|
|
879
|
-
"outputDefault": "json",
|
|
880
|
-
"pagination": "none",
|
|
881
|
-
"stream": false,
|
|
882
|
-
"billable": true,
|
|
883
|
-
"idempotencyRequired": false,
|
|
884
|
-
"scopesAny": [
|
|
885
|
-
"news:read"
|
|
886
|
-
],
|
|
887
|
-
"sideEffect": "read",
|
|
888
|
-
"dryRunSupported": false,
|
|
889
|
-
"inputSchema": {
|
|
890
|
-
"type": "object",
|
|
891
|
-
"properties": {
|
|
892
|
-
"query": {
|
|
893
|
-
"type": "string",
|
|
894
|
-
"minLength": 1,
|
|
895
|
-
"maxLength": 200,
|
|
896
|
-
"description": "Free-text query (Chinese or English).",
|
|
897
|
-
"example": "光伏龙头"
|
|
898
|
-
},
|
|
899
|
-
"since_hours": {
|
|
900
|
-
"type": "integer",
|
|
901
|
-
"minimum": 1,
|
|
902
|
-
"maximum": 168,
|
|
903
|
-
"default": 24,
|
|
904
|
-
"description": "Lookback window in hours."
|
|
905
|
-
},
|
|
906
|
-
"limit": {
|
|
907
|
-
"type": "integer",
|
|
908
|
-
"minimum": 1,
|
|
909
|
-
"maximum": 100,
|
|
910
|
-
"default": 20,
|
|
911
|
-
"description": "Max items per page."
|
|
912
|
-
}
|
|
913
|
-
},
|
|
914
|
-
"additionalProperties": false,
|
|
915
|
-
"required": [
|
|
916
|
-
"query"
|
|
917
|
-
]
|
|
918
|
-
}
|
|
919
|
-
},
|
|
920
|
-
"payment.plans": {
|
|
921
|
-
"cliKey": "payment.plans",
|
|
922
|
-
"cliName": "payment plans",
|
|
923
|
-
"method": "GET",
|
|
924
|
-
"path": "/v1/payment/plans",
|
|
925
|
-
"description": "返回订阅计划清单(plan_id + 价格 + 时长 + 描述)。",
|
|
926
|
-
"summary": "List subscription plans",
|
|
927
|
-
"positional": [],
|
|
928
|
-
"outputDefault": "json",
|
|
929
|
-
"pagination": "none",
|
|
930
|
-
"stream": false,
|
|
931
|
-
"billable": false,
|
|
932
|
-
"idempotencyRequired": false,
|
|
933
|
-
"scopesAny": [],
|
|
934
|
-
"sideEffect": "read",
|
|
935
|
-
"dryRunSupported": false,
|
|
936
|
-
"inputSchema": {
|
|
937
|
-
"type": "object",
|
|
938
|
-
"properties": {},
|
|
939
|
-
"additionalProperties": false
|
|
940
|
-
}
|
|
941
|
-
},
|
|
942
|
-
"quote": {
|
|
943
|
-
"cliKey": "quote",
|
|
944
|
-
"cliName": "quote",
|
|
945
|
-
"method": "GET",
|
|
946
|
-
"path": "/v1/quote/realtime",
|
|
947
|
-
"description": "Real-time quote for one or more A-share securities. Returns last price, volume, change %, bid/ask. Up to 200 codes per call. Requires `quote:l1`, `quote:l2`, or `quote:delayed` scope.",
|
|
948
|
-
"summary": "Real-time quote for one or more A-share securities",
|
|
949
|
-
"positional": [],
|
|
950
|
-
"outputDefault": "json",
|
|
951
|
-
"pagination": "none",
|
|
952
|
-
"stream": false,
|
|
953
|
-
"billable": true,
|
|
954
|
-
"idempotencyRequired": false,
|
|
955
|
-
"scopesAny": [
|
|
956
|
-
"quote:l1",
|
|
957
|
-
"quote:l2",
|
|
958
|
-
"quote:delayed"
|
|
959
|
-
],
|
|
960
|
-
"sideEffect": "read",
|
|
961
|
-
"dryRunSupported": false,
|
|
962
|
-
"inputSchema": {
|
|
963
|
-
"type": "object",
|
|
964
|
-
"properties": {
|
|
965
|
-
"codes": {
|
|
966
|
-
"type": "array",
|
|
967
|
-
"items": {
|
|
968
|
-
"type": "string",
|
|
969
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$"
|
|
970
|
-
},
|
|
971
|
-
"minItems": 1,
|
|
972
|
-
"maxItems": 200,
|
|
973
|
-
"description": "1-200 canonical codes; CSV-encoded on the wire.",
|
|
974
|
-
"example": [
|
|
975
|
-
"SSE:600519",
|
|
976
|
-
"SZSE:000001"
|
|
977
|
-
]
|
|
978
|
-
},
|
|
979
|
-
"include_l2": {
|
|
980
|
-
"type": "boolean",
|
|
981
|
-
"default": false,
|
|
982
|
-
"description": "Include L2 5-level order book (requires quote:l2 scope)."
|
|
983
|
-
}
|
|
984
|
-
},
|
|
985
|
-
"additionalProperties": false,
|
|
986
|
-
"required": [
|
|
987
|
-
"codes"
|
|
988
|
-
]
|
|
989
|
-
}
|
|
990
|
-
},
|
|
991
|
-
"quote.scan": {
|
|
992
|
-
"cliKey": "quote.scan",
|
|
993
|
-
"cliName": "quote scan",
|
|
994
|
-
"method": "GET",
|
|
995
|
-
"path": "/v1/quote/scan",
|
|
996
|
-
"description": "Dumps the entire Redis snapshot of A-share real-time quotes in a single\nround-trip. Use for \"全市场扫描\" / agent universe-of-interest discovery\nwhen you don't yet know which codes to query.\n\nFiltering:\n- `exchange=SSE|SZSE|BSE` narrows to one exchange (canonical_code prefix)\n- `app.allowed_securities` is ALWAYS applied; codes outside drop silently\n\nResponse size: ~3 MB unfiltered (~5800 items). CLI users should pair\nwith `--max-bytes` / `--fields` / `--query` from Phase 1.4.\n\n9:00–9:14 集合竞价时段返回空 items + `note` 字段说明。\n\nRequires `quote:l1`, `quote:l2`, or `quote:delayed` scope.\n",
|
|
997
|
-
"summary": "Full-market real-time quote scan (~5800 A-share securities)",
|
|
998
|
-
"positional": [],
|
|
999
|
-
"outputDefault": "json",
|
|
1000
|
-
"pagination": "none",
|
|
1001
|
-
"stream": false,
|
|
1002
|
-
"billable": true,
|
|
1003
|
-
"idempotencyRequired": false,
|
|
1004
|
-
"scopesAny": [
|
|
1005
|
-
"quote:l1",
|
|
1006
|
-
"quote:l2",
|
|
1007
|
-
"quote:delayed"
|
|
1008
|
-
],
|
|
1009
|
-
"sideEffect": "read",
|
|
1010
|
-
"dryRunSupported": false,
|
|
1011
|
-
"inputSchema": {
|
|
1012
|
-
"type": "object",
|
|
1013
|
-
"properties": {
|
|
1014
|
-
"exchange": {
|
|
1015
|
-
"type": "string",
|
|
1016
|
-
"enum": [
|
|
1017
|
-
"SSE",
|
|
1018
|
-
"SZSE",
|
|
1019
|
-
"BSE",
|
|
1020
|
-
"sse",
|
|
1021
|
-
"szse",
|
|
1022
|
-
"bse"
|
|
1023
|
-
],
|
|
1024
|
-
"description": "Filter by exchange: SSE / SZSE / BSE (case-insensitive). Omit for all."
|
|
1025
|
-
}
|
|
1026
|
-
},
|
|
1027
|
-
"additionalProperties": false
|
|
1028
|
-
}
|
|
1029
|
-
},
|
|
1030
|
-
"search.semantic": {
|
|
1031
|
-
"cliKey": "search.semantic",
|
|
1032
|
-
"cliName": "search semantic",
|
|
1033
|
-
"method": "GET",
|
|
1034
|
-
"path": "/v1/search",
|
|
1035
|
-
"description": "语义 + 模糊泛化搜索。结合 entity 精确匹配(公司代码/分析师)、向量召回(pgvector\n+ DashScope embedding)、trigram 模糊、ILIKE 精确四路召回,RRF 融合后用 reranker\n精排,叠时间衰减 + views 加权(views 主源优先)。\n\n- 搜\"锂电池\"会带出新能源产业链(正极/负极/碳酸锂/宁德时代…)\n- 搜\"芯片\"会带出存储芯片/洁净室/晶圆代工…\n- mode=exact 兼容老 ILIKE 行为,仅在精确关键词命中时返回。\n",
|
|
1036
|
-
"summary": "Hybrid semantic search across news + analyst views",
|
|
1037
|
-
"positional": [],
|
|
1038
|
-
"outputDefault": "json",
|
|
1039
|
-
"pagination": "none",
|
|
1040
|
-
"stream": false,
|
|
1041
|
-
"billable": true,
|
|
1042
|
-
"idempotencyRequired": false,
|
|
1043
|
-
"scopesAny": [
|
|
1044
|
-
"news:read",
|
|
1045
|
-
"views:read"
|
|
1046
|
-
],
|
|
1047
|
-
"sideEffect": "read",
|
|
1048
|
-
"dryRunSupported": false,
|
|
1049
|
-
"inputSchema": {
|
|
1050
|
-
"type": "object",
|
|
1051
|
-
"properties": {
|
|
1052
|
-
"q": {
|
|
1053
|
-
"type": "string",
|
|
1054
|
-
"minLength": 1,
|
|
1055
|
-
"maxLength": 200,
|
|
1056
|
-
"description": "Free-text query (Chinese or English).",
|
|
1057
|
-
"example": "锂电池"
|
|
1058
|
-
},
|
|
1059
|
-
"type": {
|
|
1060
|
-
"type": "string",
|
|
1061
|
-
"enum": [
|
|
1062
|
-
"news",
|
|
1063
|
-
"views",
|
|
1064
|
-
"all"
|
|
1065
|
-
],
|
|
1066
|
-
"default": "all",
|
|
1067
|
-
"description": "Search scope: news | views | all"
|
|
1068
|
-
},
|
|
1069
|
-
"mode": {
|
|
1070
|
-
"type": "string",
|
|
1071
|
-
"enum": [
|
|
1072
|
-
"hybrid",
|
|
1073
|
-
"exact"
|
|
1074
|
-
],
|
|
1075
|
-
"default": "hybrid",
|
|
1076
|
-
"description": "hybrid = 语义 + 精确融合 + rerank;exact = 仅 ILIKE 兼容老逻辑"
|
|
1077
|
-
},
|
|
1078
|
-
"hours": {
|
|
1079
|
-
"type": "integer",
|
|
1080
|
-
"minimum": 1,
|
|
1081
|
-
"maximum": 720,
|
|
1082
|
-
"description": "Lookback window in hours."
|
|
1083
|
-
},
|
|
1084
|
-
"limit": {
|
|
1085
|
-
"type": "integer",
|
|
1086
|
-
"minimum": 1,
|
|
1087
|
-
"maximum": 50,
|
|
1088
|
-
"default": 20,
|
|
1089
|
-
"description": "Max items returned."
|
|
1090
|
-
}
|
|
1091
|
-
},
|
|
1092
|
-
"additionalProperties": false,
|
|
1093
|
-
"required": [
|
|
1094
|
-
"q"
|
|
1095
|
-
]
|
|
1096
|
-
}
|
|
1097
|
-
},
|
|
1098
|
-
"securities.industry": {
|
|
1099
|
-
"cliKey": "securities.industry",
|
|
1100
|
-
"cliName": "securities industry",
|
|
1101
|
-
"method": "GET",
|
|
1102
|
-
"path": "/v1/securities/industry",
|
|
1103
|
-
"description": "返回该股票的 TDX 自定义行业代码(T1001 食品饮料等)与申万行业三级代码\nL1/L2/L3(X5001 食品饮料 / X500102 白酒 等)。\n\n用法:\n- 股票详情页\"申万行业:白酒 / 食品饮料\"标签\n- 筛选器交叉过滤:行业 + ROE/营收增长率\n- AI agent `find_peers(code)` 用申万二级行业找同业\n",
|
|
1104
|
-
"summary": "TDX + 申万 industry classification for one A-share security",
|
|
1105
|
-
"positional": [],
|
|
1106
|
-
"outputDefault": "json",
|
|
1107
|
-
"pagination": "none",
|
|
1108
|
-
"stream": false,
|
|
1109
|
-
"billable": false,
|
|
1110
|
-
"idempotencyRequired": false,
|
|
1111
|
-
"scopesAny": [],
|
|
1112
|
-
"sideEffect": "read",
|
|
1113
|
-
"dryRunSupported": false,
|
|
1114
|
-
"inputSchema": {
|
|
1115
|
-
"type": "object",
|
|
1116
|
-
"properties": {
|
|
1117
|
-
"code": {
|
|
1118
|
-
"type": "string",
|
|
1119
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
|
|
1120
|
-
"description": "Canonical A-share code.",
|
|
1121
|
-
"example": "SSE:600519"
|
|
1122
|
-
}
|
|
1123
|
-
},
|
|
1124
|
-
"additionalProperties": false,
|
|
1125
|
-
"required": [
|
|
1126
|
-
"code"
|
|
1127
|
-
]
|
|
1128
|
-
}
|
|
1129
|
-
},
|
|
1130
|
-
"semantic.find": {
|
|
1131
|
-
"cliKey": "semantic.find",
|
|
1132
|
-
"cliName": "semantic find",
|
|
1133
|
-
"method": "GET",
|
|
1134
|
-
"path": "/v1/securities/search",
|
|
1135
|
-
"description": "Find A-share securities matching a name (Chinese), code (e.g. 600519), or pinyin initials (e.g. gzmt). Use this when an agent has a description and needs canonical codes.",
|
|
1136
|
-
"summary": "Find A-share securities by name / code / pinyin",
|
|
1137
|
-
"positional": [],
|
|
1138
|
-
"outputDefault": "json",
|
|
1139
|
-
"pagination": "none",
|
|
1140
|
-
"stream": false,
|
|
1141
|
-
"billable": false,
|
|
1142
|
-
"idempotencyRequired": false,
|
|
1143
|
-
"scopesAny": [],
|
|
1144
|
-
"sideEffect": "read",
|
|
1145
|
-
"dryRunSupported": false,
|
|
1146
|
-
"inputSchema": {
|
|
1147
|
-
"type": "object",
|
|
1148
|
-
"properties": {
|
|
1149
|
-
"query": {
|
|
1150
|
-
"type": "string",
|
|
1151
|
-
"minLength": 1,
|
|
1152
|
-
"maxLength": 20,
|
|
1153
|
-
"description": "Search query: Chinese name, A-share code, or pinyin initials.",
|
|
1154
|
-
"example": "贵州茅台"
|
|
1155
|
-
},
|
|
1156
|
-
"limit": {
|
|
1157
|
-
"type": "integer",
|
|
1158
|
-
"minimum": 1,
|
|
1159
|
-
"maximum": 30,
|
|
1160
|
-
"default": 10,
|
|
1161
|
-
"description": "Max matches."
|
|
1162
|
-
}
|
|
1163
|
-
},
|
|
1164
|
-
"additionalProperties": false,
|
|
1165
|
-
"required": [
|
|
1166
|
-
"query"
|
|
1167
|
-
]
|
|
1168
|
-
}
|
|
1169
|
-
},
|
|
1170
|
-
"sentiment.breadth": {
|
|
1171
|
-
"cliKey": "sentiment.breadth",
|
|
1172
|
-
"cliName": "sentiment breadth",
|
|
1173
|
-
"method": "GET",
|
|
1174
|
-
"path": "/v1/sentiment/breadth",
|
|
1175
|
-
"description": "Intraday breadth time series. Requires `sentiment:read` scope.",
|
|
1176
|
-
"summary": "Intraday breadth time series",
|
|
1177
|
-
"positional": [],
|
|
1178
|
-
"outputDefault": "json",
|
|
1179
|
-
"pagination": "none",
|
|
1180
|
-
"stream": false,
|
|
1181
|
-
"billable": true,
|
|
1182
|
-
"idempotencyRequired": false,
|
|
1183
|
-
"scopesAny": [
|
|
1184
|
-
"sentiment:read"
|
|
1185
|
-
],
|
|
1186
|
-
"sideEffect": "read",
|
|
1187
|
-
"dryRunSupported": false,
|
|
1188
|
-
"inputSchema": {
|
|
1189
|
-
"type": "object",
|
|
1190
|
-
"properties": {
|
|
1191
|
-
"scope": {
|
|
1192
|
-
"type": "string",
|
|
1193
|
-
"enum": [
|
|
1194
|
-
"all_a",
|
|
1195
|
-
"all_a_ex_st",
|
|
1196
|
-
"main_board",
|
|
1197
|
-
"star_market",
|
|
1198
|
-
"chinext",
|
|
1199
|
-
"bse"
|
|
1200
|
-
],
|
|
1201
|
-
"default": "all_a_ex_st",
|
|
1202
|
-
"description": "Universe filter."
|
|
1203
|
-
}
|
|
1204
|
-
},
|
|
1205
|
-
"additionalProperties": false
|
|
1206
|
-
}
|
|
1207
|
-
},
|
|
1208
|
-
"sentiment.overview": {
|
|
1209
|
-
"cliKey": "sentiment.overview",
|
|
1210
|
-
"cliName": "sentiment overview",
|
|
1211
|
-
"method": "GET",
|
|
1212
|
-
"path": "/v1/sentiment/overview",
|
|
1213
|
-
"description": "Aggregate sentiment: limit-up/down counts, breadth, divergence index, top movers. Requires `sentiment:read` scope.",
|
|
1214
|
-
"summary": "Aggregate market sentiment indicators",
|
|
1215
|
-
"positional": [],
|
|
1216
|
-
"outputDefault": "json",
|
|
1217
|
-
"pagination": "none",
|
|
1218
|
-
"stream": false,
|
|
1219
|
-
"billable": true,
|
|
1220
|
-
"idempotencyRequired": false,
|
|
1221
|
-
"scopesAny": [
|
|
1222
|
-
"sentiment:read"
|
|
1223
|
-
],
|
|
1224
|
-
"sideEffect": "read",
|
|
1225
|
-
"dryRunSupported": false,
|
|
1226
|
-
"inputSchema": {
|
|
1227
|
-
"type": "object",
|
|
1228
|
-
"properties": {
|
|
1229
|
-
"scope": {
|
|
1230
|
-
"type": "string",
|
|
1231
|
-
"enum": [
|
|
1232
|
-
"all_a",
|
|
1233
|
-
"all_a_ex_st",
|
|
1234
|
-
"main_board",
|
|
1235
|
-
"star_market",
|
|
1236
|
-
"chinext",
|
|
1237
|
-
"bse"
|
|
1238
|
-
],
|
|
1239
|
-
"default": "all_a_ex_st",
|
|
1240
|
-
"description": "Universe filter.",
|
|
1241
|
-
"example": "main_board"
|
|
1242
|
-
}
|
|
1243
|
-
},
|
|
1244
|
-
"additionalProperties": false
|
|
1245
|
-
}
|
|
1246
|
-
},
|
|
1247
|
-
"sentiment.pct-distribution": {
|
|
1248
|
-
"cliKey": "sentiment.pct-distribution",
|
|
1249
|
-
"cliName": "sentiment pct-distribution",
|
|
1250
|
-
"method": "GET",
|
|
1251
|
-
"path": "/v1/sentiment/pct-distribution",
|
|
1252
|
-
"description": "返回 A 股全市场涨跌幅分桶(≤-10% / -9% / ... / +10% / 涨停)的家数分布,用于市场宽度可视化。",
|
|
1253
|
-
"summary": "Distribution of intraday percent change across the universe",
|
|
1254
|
-
"positional": [],
|
|
1255
|
-
"outputDefault": "json",
|
|
1256
|
-
"pagination": "none",
|
|
1257
|
-
"stream": false,
|
|
1258
|
-
"billable": true,
|
|
1259
|
-
"idempotencyRequired": false,
|
|
1260
|
-
"scopesAny": [
|
|
1261
|
-
"sentiment:read"
|
|
1262
|
-
],
|
|
1263
|
-
"sideEffect": "read",
|
|
1264
|
-
"dryRunSupported": false,
|
|
1265
|
-
"inputSchema": {
|
|
1266
|
-
"type": "object",
|
|
1267
|
-
"properties": {},
|
|
1268
|
-
"additionalProperties": false
|
|
1269
|
-
}
|
|
1270
|
-
},
|
|
1271
|
-
"sentiment.turnover": {
|
|
1272
|
-
"cliKey": "sentiment.turnover",
|
|
1273
|
-
"cliName": "sentiment turnover",
|
|
1274
|
-
"method": "GET",
|
|
1275
|
-
"path": "/v1/sentiment/turnover",
|
|
1276
|
-
"description": "Intraday turnover time series. Requires `sentiment:read` scope.",
|
|
1277
|
-
"summary": "Intraday turnover time series",
|
|
1278
|
-
"positional": [],
|
|
1279
|
-
"outputDefault": "json",
|
|
1280
|
-
"pagination": "none",
|
|
1281
|
-
"stream": false,
|
|
1282
|
-
"billable": true,
|
|
1283
|
-
"idempotencyRequired": false,
|
|
1284
|
-
"scopesAny": [
|
|
1285
|
-
"sentiment:read"
|
|
1286
|
-
],
|
|
1287
|
-
"sideEffect": "read",
|
|
1288
|
-
"dryRunSupported": false,
|
|
1289
|
-
"inputSchema": {
|
|
1290
|
-
"type": "object",
|
|
1291
|
-
"properties": {
|
|
1292
|
-
"scope": {
|
|
1293
|
-
"type": "string",
|
|
1294
|
-
"enum": [
|
|
1295
|
-
"all_a",
|
|
1296
|
-
"all_a_ex_st",
|
|
1297
|
-
"main_board",
|
|
1298
|
-
"star_market",
|
|
1299
|
-
"chinext",
|
|
1300
|
-
"bse"
|
|
1301
|
-
],
|
|
1302
|
-
"default": "all_a_ex_st",
|
|
1303
|
-
"description": "Universe filter."
|
|
1304
|
-
}
|
|
1305
|
-
},
|
|
1306
|
-
"additionalProperties": false
|
|
1307
|
-
}
|
|
1308
|
-
},
|
|
1309
|
-
"squawk.audio": {
|
|
1310
|
-
"cliKey": "squawk.audio",
|
|
1311
|
-
"cliName": "squawk audio",
|
|
1312
|
-
"method": "GET",
|
|
1313
|
-
"path": "/v1/squawk/{item_id}/audio",
|
|
1314
|
-
"description": "返回 squawk 项的 TTS 音频(MP3)。直接 stream,可作为 `<audio>` src 用。",
|
|
1315
|
-
"summary": "Stream squawk TTS audio",
|
|
1316
|
-
"positional": [
|
|
1317
|
-
"item_id"
|
|
1318
|
-
],
|
|
1319
|
-
"outputDefault": "json",
|
|
1320
|
-
"pagination": "none",
|
|
1321
|
-
"stream": false,
|
|
1322
|
-
"billable": false,
|
|
1323
|
-
"idempotencyRequired": false,
|
|
1324
|
-
"scopesAny": [],
|
|
1325
|
-
"sideEffect": "read",
|
|
1326
|
-
"dryRunSupported": false,
|
|
1327
|
-
"inputSchema": {
|
|
1328
|
-
"type": "object",
|
|
1329
|
-
"properties": {
|
|
1330
|
-
"item_id": {
|
|
1331
|
-
"type": "string",
|
|
1332
|
-
"description": "Squawk item id (returned by squawk.recent items[].id)."
|
|
1333
|
-
}
|
|
1334
|
-
},
|
|
1335
|
-
"additionalProperties": false,
|
|
1336
|
-
"required": [
|
|
1337
|
-
"item_id"
|
|
1338
|
-
]
|
|
1339
|
-
}
|
|
1340
|
-
},
|
|
1341
|
-
"squawk.waveform": {
|
|
1342
|
-
"cliKey": "squawk.waveform",
|
|
1343
|
-
"cliName": "squawk waveform",
|
|
1344
|
-
"method": "GET",
|
|
1345
|
-
"path": "/v1/squawk/{item_id}/waveform",
|
|
1346
|
-
"description": "返回 squawk 音频的预计算波形 peak 数据,用于客户端波形可视化。",
|
|
1347
|
-
"summary": "Waveform peaks for squawk audio",
|
|
1348
|
-
"positional": [
|
|
1349
|
-
"item_id"
|
|
1350
|
-
],
|
|
1351
|
-
"outputDefault": "json",
|
|
1352
|
-
"pagination": "none",
|
|
1353
|
-
"stream": false,
|
|
1354
|
-
"billable": false,
|
|
1355
|
-
"idempotencyRequired": false,
|
|
1356
|
-
"scopesAny": [],
|
|
1357
|
-
"sideEffect": "read",
|
|
1358
|
-
"dryRunSupported": false,
|
|
1359
|
-
"inputSchema": {
|
|
1360
|
-
"type": "object",
|
|
1361
|
-
"properties": {
|
|
1362
|
-
"item_id": {
|
|
1363
|
-
"type": "string",
|
|
1364
|
-
"description": "Squawk item id (returned by squawk.recent items[].id)."
|
|
1365
|
-
}
|
|
1366
|
-
},
|
|
1367
|
-
"additionalProperties": false,
|
|
1368
|
-
"required": [
|
|
1369
|
-
"item_id"
|
|
1370
|
-
]
|
|
1371
|
-
}
|
|
1372
|
-
},
|
|
1373
|
-
"stocks.hot": {
|
|
1374
|
-
"cliKey": "stocks.hot",
|
|
1375
|
-
"cliName": "stocks hot",
|
|
1376
|
-
"method": "GET",
|
|
1377
|
-
"path": "/v1/stocks/hot",
|
|
1378
|
-
"description": "今日最热股票榜(来源 East-Money),按搜索 / 关注 / 评论综合分排序。",
|
|
1379
|
-
"summary": "Today's hot-stock leaderboard",
|
|
1380
|
-
"positional": [],
|
|
1381
|
-
"outputDefault": "json",
|
|
1382
|
-
"pagination": "none",
|
|
1383
|
-
"stream": false,
|
|
1384
|
-
"billable": false,
|
|
1385
|
-
"idempotencyRequired": false,
|
|
1386
|
-
"scopesAny": [],
|
|
1387
|
-
"sideEffect": "read",
|
|
1388
|
-
"dryRunSupported": false,
|
|
1389
|
-
"inputSchema": {
|
|
1390
|
-
"type": "object",
|
|
1391
|
-
"properties": {},
|
|
1392
|
-
"additionalProperties": false
|
|
1393
|
-
}
|
|
1394
|
-
},
|
|
1395
|
-
"stocks.social-hot": {
|
|
1396
|
-
"cliKey": "stocks.social-hot",
|
|
1397
|
-
"cliName": "stocks social-hot",
|
|
1398
|
-
"method": "GET",
|
|
1399
|
-
"path": "/v1/stocks/social-hot",
|
|
1400
|
-
"description": "跨平台(微博 / 雪球 / Twitter)社交媒体提及聚合榜,按提及量 / 情感打分。",
|
|
1401
|
-
"summary": "Cross-platform social-hot stocks",
|
|
1402
|
-
"positional": [],
|
|
1403
|
-
"outputDefault": "json",
|
|
1404
|
-
"pagination": "none",
|
|
1405
|
-
"stream": false,
|
|
1406
|
-
"billable": false,
|
|
1407
|
-
"idempotencyRequired": false,
|
|
1408
|
-
"scopesAny": [],
|
|
1409
|
-
"sideEffect": "read",
|
|
1410
|
-
"dryRunSupported": false,
|
|
1411
|
-
"inputSchema": {
|
|
1412
|
-
"type": "object",
|
|
1413
|
-
"properties": {},
|
|
1414
|
-
"additionalProperties": false
|
|
1415
|
-
}
|
|
1416
|
-
},
|
|
1417
|
-
"views.feed": {
|
|
1418
|
-
"cliKey": "views.feed",
|
|
1419
|
-
"cliName": "views feed",
|
|
1420
|
-
"method": "GET",
|
|
1421
|
-
"path": "/v1/views",
|
|
1422
|
-
"description": "分析师观点 / 卖方研报 / 长文本观点流。可按机构 / 分析师 / 证券 / hours 过滤。需要 `views:read` scope。",
|
|
1423
|
-
"summary": "List analyst views",
|
|
1424
|
-
"positional": [],
|
|
1425
|
-
"outputDefault": "json",
|
|
1426
|
-
"pagination": "offset",
|
|
1427
|
-
"stream": false,
|
|
1428
|
-
"billable": false,
|
|
1429
|
-
"idempotencyRequired": false,
|
|
1430
|
-
"scopesAny": [],
|
|
1431
|
-
"sideEffect": "read",
|
|
1432
|
-
"dryRunSupported": false,
|
|
1433
|
-
"inputSchema": {
|
|
1434
|
-
"type": "object",
|
|
1435
|
-
"properties": {},
|
|
1436
|
-
"additionalProperties": false
|
|
1437
|
-
}
|
|
1438
|
-
},
|
|
1439
|
-
"views.get": {
|
|
1440
|
-
"cliKey": "views.get",
|
|
1441
|
-
"cliName": "views get",
|
|
1442
|
-
"method": "GET",
|
|
1443
|
-
"path": "/v1/views/{view_id}",
|
|
1444
|
-
"description": "返回单条 view 完整内容、附件图片、tagged securities、AI 摘要。",
|
|
1445
|
-
"summary": "Fetch a single analyst view",
|
|
1446
|
-
"positional": [
|
|
1447
|
-
"view_id"
|
|
1448
|
-
],
|
|
1449
|
-
"outputDefault": "json",
|
|
1450
|
-
"pagination": "none",
|
|
1451
|
-
"stream": false,
|
|
1452
|
-
"billable": false,
|
|
1453
|
-
"idempotencyRequired": false,
|
|
1454
|
-
"scopesAny": [],
|
|
1455
|
-
"sideEffect": "read",
|
|
1456
|
-
"dryRunSupported": false,
|
|
1457
|
-
"inputSchema": {
|
|
1458
|
-
"type": "object",
|
|
1459
|
-
"properties": {
|
|
1460
|
-
"view_id": {
|
|
1461
|
-
"type": "string",
|
|
1462
|
-
"description": "Analyst-view id (returned by views.recent / list items[].id)."
|
|
1463
|
-
}
|
|
1464
|
-
},
|
|
1465
|
-
"additionalProperties": false,
|
|
1466
|
-
"required": [
|
|
1467
|
-
"view_id"
|
|
1468
|
-
]
|
|
1469
|
-
}
|
|
1470
|
-
},
|
|
1471
|
-
"views.recent": {
|
|
1472
|
-
"cliKey": "views.recent",
|
|
1473
|
-
"cliName": "views recent",
|
|
1474
|
-
"method": "GET",
|
|
1475
|
-
"path": "/v1/views/recent",
|
|
1476
|
-
"description": "List recent broker / analyst views (research notes, price targets, ratings). Filter by analyst, institution, or a specific security. Requires `views:read` scope.",
|
|
1477
|
-
"summary": "Recent broker / analyst views",
|
|
1478
|
-
"positional": [],
|
|
1479
|
-
"outputDefault": "json",
|
|
1480
|
-
"pagination": "none",
|
|
1481
|
-
"stream": false,
|
|
1482
|
-
"billable": true,
|
|
1483
|
-
"idempotencyRequired": false,
|
|
1484
|
-
"scopesAny": [
|
|
1485
|
-
"views:read"
|
|
1486
|
-
],
|
|
1487
|
-
"sideEffect": "read",
|
|
1488
|
-
"dryRunSupported": false,
|
|
1489
|
-
"inputSchema": {
|
|
1490
|
-
"type": "object",
|
|
1491
|
-
"properties": {
|
|
1492
|
-
"analyst": {
|
|
1493
|
-
"type": "string",
|
|
1494
|
-
"description": "Analyst name (Chinese), exact or fuzzy."
|
|
1495
|
-
},
|
|
1496
|
-
"institution": {
|
|
1497
|
-
"type": "string",
|
|
1498
|
-
"description": "Broker / institution Chinese name."
|
|
1499
|
-
},
|
|
1500
|
-
"security": {
|
|
1501
|
-
"type": "string",
|
|
1502
|
-
"pattern": "^(SSE|SZSE|BSE|SH|SZ|BJ):[0-9]{6}$",
|
|
1503
|
-
"description": "Filter by security code."
|
|
1504
|
-
},
|
|
1505
|
-
"since_days": {
|
|
1506
|
-
"type": "integer",
|
|
1507
|
-
"minimum": 1,
|
|
1508
|
-
"maximum": 90,
|
|
1509
|
-
"default": 7,
|
|
1510
|
-
"description": "Lookback window in days. (Translated to hours upstream.)"
|
|
1511
|
-
},
|
|
1512
|
-
"limit": {
|
|
1513
|
-
"type": "integer",
|
|
1514
|
-
"minimum": 1,
|
|
1515
|
-
"maximum": 100,
|
|
1516
|
-
"default": 30,
|
|
1517
|
-
"description": "Max items per page."
|
|
1518
|
-
}
|
|
1519
|
-
},
|
|
1520
|
-
"additionalProperties": false
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
};
|
|
1524
|
-
export function getOperation(key) {
|
|
1525
|
-
return OPERATIONS[key];
|
|
1526
|
-
}
|
|
1527
|
-
export function listOperations() {
|
|
1528
|
-
return Object.values(OPERATIONS);
|
|
1529
|
-
}
|