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
- 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. - Run. Call the CLI. Add
--start/--end/--timeframeonly when the user asked for a specific window or bar size; add--jsonwhen they want the full series.finyahoo history "AAPL" --start 2024-01-01 - Relay the result. Show the CLI's stdout to the user. You may trim a long series, but keep the summary line.
- 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 atpipx 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
profileskill.