Price History
Fetch historical OHLCV data from Yahoo Finance.
Instructions
Note: If uv is not installed or pyproject.toml is not found, replace uv run python with python in all commands below.
uv run python scripts/history.py SYMBOL [--period PERIOD] [--interval INTERVAL]
Arguments
SYMBOL - Ticker symbol
--period - Time period: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max (default: 1mo)
--interval - Data interval: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo (default: 1d)
Output
Returns JSON with:
symbol - Ticker
period - Requested period
interval - Data interval
data - Array of {date, open, high, low, close, volume}
Summarize key price movements, highs/lows, and trends.
Dependencies
Timezone
All timestamps and time-based calculations must use the America/New_York timezone. All JSON output must include generated_at (NY time string) and data_delay fields.
1---2name: price-history3description: Get historical price data (OHLCV) for a stock. Use when user asks about price history, historical data, past performance, price over time, or needs data for chart analysis.4dependencies: ["trading-skills"]5metadata:6 source: https://skillmd.com/skills/staskh/price-history7---89# Price History1011Fetch historical OHLCV data from Yahoo Finance.1213## Instructions1415> **Note:** If `uv` is not installed or `pyproject.toml` is not found, replace `uv run python` with `python` in all commands below.1617```bash18uv run python scripts/history.py SYMBOL [--period PERIOD] [--interval INTERVAL]19```2021## Arguments2223- `SYMBOL` - Ticker symbol24- `--period` - Time period: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max (default: 1mo)25- `--interval` - Data interval: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo (default: 1d)2627## Output2829Returns JSON with:30- `symbol` - Ticker31- `period` - Requested period32- `interval` - Data interval33- `data` - Array of {date, open, high, low, close, volume}3435Summarize key price movements, highs/lows, and trends.3637## Dependencies3839- `yfinance`404142## Timezone4344All timestamps and time-based calculations must use the `America/New_York` timezone. All JSON output must include `generated_at` (NY time string) and `data_delay` fields.