chart
Single-security K-line for stocks and A-share indices (daily by default; minute=true + one date for intraday). Multi-code: bars_batch (stocks only). Indices are detected from the code: SSE:000xxx, SZSE:399xxx, BSE:899xxx. ⚠️ The exchange prefix decides it — SSE:000001 is the Shanghai Composite, SZSE:000001 is 平安银行; pass kind to override. To measure a stock against its market, call twice over the same window (stock + index) — index_snapshot has no history. Index minute bars are capped at 7 calendar days. Indices add pct_change and have no turnover-rate or market-cap field.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | YYYY-MM-DD inclusive end (daily mode; overrides days) | |
| _jq | No | JMESPath,对 data 求值(写 items[*].id) | |
| code | Yes | Single canonical code — stock (e.g. SSE:600519) or A-share index (e.g. SSE:000001, SZSE:399006, BSE:899050) | |
| date | No | Single trade date YYYY-MM-DD (minute mode) | |
| days | No | Daily lookback (ignored when from/to or minute mode are set) | |
| from | No | YYYY-MM-DD inclusive start (daily mode; overrides days) | |
| kind | No | Override the stock/index guess made from the code. Omit unless the code is one the rule gets wrong — SSE:000xxx / SZSE:399xxx / BSE:899xxx are read as indices, everything else as stocks. | |
| _spill | No | true=全量落盘,只回摘要与取数地址 | |
| minute | No | Switch to minute-level bars (requires date) | |
| _fields | No | 逗号分隔的直接字段;有 items 时投影每行,否则投影 data;外层字段或嵌套结构用 _jq | |
| _intent | No | 用户原问题一句话,仅分析用,可留空 | |
| _max_bytes | No | 响应字节上限,默认约 50 KB | |
| _max_bytes_mode | No | 正文超限处理,默认 truncate 保留前缀 |