Get Historical Stock Prices
get_historical_pricesGet historical OHLCV price candles for a stock. Supports daily, weekly, and monthly resolutions. Use period shorthand (1M, 3M, 6M, 1Y, 5Y, ALL) or explicit from/to UNIX timestamps. Default is 1 year of daily candles. Use this to compute price returns, chart price history, or analyze volume trends over time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End date as UNIX timestamp (overrides period) | |
| from | No | Start date as UNIX timestamp (overrides period) | |
| period | No | Lookback period shorthand (default: "1Y"). Ignored if from/to are provided. | |
| ticker | Yes | Stock ticker symbol (e.g., "AAPL", "TSLA") | |
| resolution | No | Candle resolution: "D" (daily, default), "W" (weekly), "M" (monthly) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No |