Get Historical Price Bars
get_price_historyFetch historical OHLCV candlestick bars for stocks, ETFs, and indexes by symbol, date range, period, and interval; optionally include extended-hours and previous-close data.
Instructions
Fetch historical OHLCV candlestick price bars for a stock, ETF, or index.
Args: symbol: Ticker symbol (e.g. 'AAPL', 'SPY'). period_type: 'day', 'month', 'year', or 'ytd'. period: Number of periods (day: 1,2,3,4,5,10; month: 1,2,3,6; year: 1,2,3,5,10,15,20; ytd: 1). Omit (set None) if specifying start_date/end_date. frequency_type: 'minute' (for day), 'daily', 'weekly', or 'monthly'. frequency: Candle interval (minute: 1,5,10,15,30; daily/weekly/monthly: 1). start_date: Optional start date ('YYYY-MM-DD', ISO-8601 UTC, or epoch ms). end_date: Optional end date ('YYYY-MM-DD', ISO-8601 UTC, or epoch ms). need_extended_hours: Include pre-market and after-hours candles. need_previous_close: Include previous close metadata. limit: Maximum number of most-recent candles returned (default 120).
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": {
"symbol": "<symbol>"
},
"name": "get_price_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| period | No | ||
| symbol | Yes | ||
| end_date | No | ||
| frequency | No | ||
| start_date | No | ||
| period_type | No | day | |
| frequency_type | No | minute | |
| need_extended_hours | No | ||
| need_previous_close | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||