query_yfinance
Retrieve historical price data for US and global tickers, with a free default source and an option to switch to Yahoo Finance.
Instructions
Query historical prices for US/global tickers. Defaults to akshare (free, no key); set use_yfinance=true to fall back to Yahoo Finance.
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>",
"file_path": "<file_path>"
},
"name": "query_yfinance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | 1y | |
| ticker | Yes | Ticker, e.g. AAPL, SPY, GLD | |
| end_date | No | Optional end date YYYY-MM-DD | |
| file_path | Yes | Output CSV file path | |
| start_date | No | Optional start date YYYY-MM-DD | |
| use_yfinance | No | Use yfinance instead of akshare |