query_stock
Fetch historical stock prices for A-share, Hong Kong, or US markets and save the data as a CSV file.
Instructions
Query historical stock prices for A-share, Hong Kong, or US markets. Output is written to file_path as CSV.
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": {
"ticker": "<ticker>",
"market": "<market>",
"start_date": "<start_date>",
"end_date": "<end_date>",
"file_path": "<file_path>"
},
"name": "query_stock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| freq | No | Minute granularity (period=min) | 1 |
| adjust | No | Adjustment type | qfq |
| market | Yes | Market: a (A-share), hk (Hong Kong), us (US) | |
| period | No | K-line period (min: A-share only) | daily |
| ticker | Yes | Stock ticker, e.g. 600519, 00700, AAPL | |
| end_date | Yes | End date YYYY-MM-DD | |
| file_path | Yes | Output CSV file path | |
| start_date | Yes | Start date YYYY-MM-DD |