get_historical_prices
Retrieve a stock's historical OHLCV prices for a chosen period and interval, with summary statistics and total return for performance, trend, or charting analysis.
Instructions
Historical OHLCV price series for one stock over a chosen period/interval, plus summary stats (highest/lowest/average close, average volume) and total return over the window.
Use for performance, trends, or charting ("how has X done over the last year"). For a single current price use get_stock_quote; for dividend/split events use get_dividends_splits. Note: intraday intervals (1m-90m) are only available for short recent periods, and long periods return many rows, so prefer JSON or a shorter period if the output is truncated.
Returns Markdown (summary stats plus the last 10 rows) by default, or the full series as JSON when response_format='json'. An empty or unsupported period/interval combination returns a short message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | Time period for historical data (e.g., '1mo' for 1 month, '1y' for 1 year) | 1mo |
| ticker | Yes | Stock ticker symbol (e.g., 'AAPL', 'GOOGL', 'MSFT') | |
| interval | No | Data interval (e.g., '1d' for daily, '1h' for hourly) | 1d |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for machine-readable | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| note | No | ||
| period | No | ||
| ticker | No | ||
| message | No | Set instead of data when there is nothing to return for this request (for example, no dividends on record). | |
| interval | No | ||
| truncated | No | True when only the newest records fit the response limit. | |
| totalRecords | No | ||
| returnedRecords | No |