# History

> Fetch a symbol's OHLCV price history (and its split/dividend events) from Yahoo Finance. Holds no logic of its own -- it calls the finyahoo package's CLI (`finyahoo history`) and shows the result to the user. Works for US stocks (AAPL), Korean tickers (005930.KS), and indices (^GSPC). Trigger phrases: price history, OHLCV, stock chart data, get prices for, 시세 가져와, 주가 이력, 차트 데이터.

- Skill: `seokhoonj/history` (Agent Skill)
- Install (CLI): `npx skillmds@latest add seokhoonj/history`
- Raw SKILL.md: https://api.skillmd.com/api/skills/seokhoonj/history/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: seokhoonj (https://skillmd.com/u/seokhoonj)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/seokhoonj/history

---


# finyahoo — price history

Take a ticker and print its OHLCV bars (with the split and dividend events over the
same span). The fetching and parsing live in the finyahoo package (on PyPI); this skill
is a thin wrapper that calls its CLI and relays the result. A delisted ticker, a rate
block, and the like come back from the CLI as a one-line error -- relay that message
as-is rather than throwing a stack trace at the user.

## Prerequisite

This plugin calls the `finyahoo` CLI, so the package must be installed first:

```
pipx install finyahoo        # or: pip install finyahoo
```

That puts the `finyahoo` command on PATH. No API key or login is needed -- Yahoo's
endpoints are public and the client handles the session token itself.

## Running

```
finyahoo history "<SYMBOL>" [options]
```

Options (`finyahoo history --help` is the source of truth):
- `--start YYYY-MM-DD` — inclusive start date (default: Yahoo's earliest bar).
- `--end YYYY-MM-DD` — inclusive end date (default: the latest bar).
- `--timeframe day|week|month` — bar size (default: day).
- `--json` — full series as JSON instead of the text summary.

The text output is a one-line summary (symbol, bar count, split/dividend counts) plus
the most recent few bars. Use `--json` when the user wants the whole series or machine-
readable data.

## Procedure

1. **Get the symbol.** Find a Yahoo ticker in the user's message (US: `AAPL`; Korean:
   `005930.KS` / `.KQ`; index: `^GSPC`). If there is none, ask. Handle several one at a time.
2. **Run.** Call the CLI. Add `--start`/`--end`/`--timeframe` only when the user asked
   for a specific window or bar size; add `--json` when they want the full series.
   ```bash
   finyahoo history "AAPL" --start 2024-01-01
   ```
3. **Relay the result.** Show the CLI's stdout to the user. You may trim a long series,
   but keep the summary line.
4. **Error handling.** When the CLI exits non-zero, relay the one-line `finyahoo: <message>`
   from stderr as-is. Common ones:
   - `command not found: finyahoo` -> the package is not installed; point the user at
     `pipx install finyahoo`.
   - `Not Found` -> a delisted or unknown ticker (Yahoo has no data for it).
   - a 429 / refusing-this-client message -> Yahoo is rate-limiting; wait and retry, or
     space requests out.

## What this skill does not do

- It does not re-implement fetching or parsing (the package does); it always calls the CLI.
- It is history only -- for the current fundamentals snapshot, use the `profile` skill.

