Get price history
get_price_historyRetrieve adjusted price history for up to 10 symbols and get returns, moving averages, RSI, ATR, 52-week range, and volume ratio for trend and momentum analysis.
Instructions
Price history for up to 10 symbols, with ready-made indicators.
The summary saves you computing trend and momentum yourself: changes over 1d to 1y and YTD, SMA 20/50/200, RSI 14, ATR 14, 52-week range and volume vs. average. Prices are adjusted for splits and dividends.
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": {
"symbols": "<symbols>"
},
"name": "get_price_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Day after the last bar (YYYY-MM-DD); needs start. | |
| bars | No | How many of the most recent bars to return. | |
| mode | No | 'summary' adds returns, moving averages, RSI, ATR, 52-week range and volume ratio to the last bars; 'bars' returns bars only. | summary |
| start | No | First day (YYYY-MM-DD); overrides period. | |
| period | No | How far back to look; ignored when start is given. | 6mo |
| symbols | Yes | Up to 10 Yahoo Finance symbols, e.g. ['AAPL', 'SAP.DE', 'BTC-USD', '^GSPC', 'EURUSD=X']. | |
| interval | No | Bar length. Intraday bars cover the last 60 days (1m: 7 days). | 1d |
| response_format | No | 'concise' (default; up to 20,000 characters) or 'detailed' (up to 80,000). | concise |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| mode | Yes | ||
| as_of | Yes | When this data was fetched from Yahoo Finance, in UTC. | |
| start | No | ||
| errors | Yes | ||
| period | No | Range asked for, when no start date. | |
| prices | Yes | ||
| source | No | Data source and the yfinance version. | |
| interval | Yes | ||
| warnings | No | Caveats such as delayed quotes, symbols that failed, or trimmed results. | |
| truncated | No | True when rows were left out to keep the response small. | |
| next_offset | No | Pass as `offset` to fetch the next rows, when the result is truncated. |