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.
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 |