yfinance_get_stock_history
Retrieve historical stock price data for any ticker with configurable period and interval. Return full price series, limited recent data points, or summary statistics to analyze trends, volume, and price ranges.
Instructions
Get historical price data for a stock with customizable time period and interval.
Args: ticker: Stock ticker symbol (e.g., 'AAPL', 'MSFT', 'GOOGL') period: Time period - valid values: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max (default: '1mo') interval: Data interval - valid values: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo (default: '1d') limit: Maximum number of most recent data points to return (default: None, returns all) summary: If True, return summary statistics instead of all data points (default: False) response_format: Output format - 'json' or 'markdown' (default: 'markdown')
Returns: Formatted string with historical price data or summary statistics. When summary=True, returns: high, low, avg close, total volume, start/end dates. When limit is set, returns only the N most recent data points.
Example: yfinance_get_stock_history("AAPL", "1y", "1d", "json") yfinance_get_stock_history("AAPL", "1y", "1d", limit=30) # Last 30 days yfinance_get_stock_history("AAPL", "1y", "1d", summary=True) # Just summary
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>"
},
"name": "yfinance_get_stock_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| period | No | 1mo | |
| ticker | Yes | ||
| summary | No | ||
| interval | No | 1d | |
| response_format | No | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |