pp-yahoo-finance
Original:🇺🇸 English
Translated
Use Yahoo Finance CLI for stock and ETF quotes, charts, fundamentals, options chains, symbol search, trending tickers, local watchlists, portfolio lots, and market digests. Use when the user asks about a ticker, portfolio performance, option filtering, market movers, or wants Yahoo Finance data in a terminal or agent-friendly format.
8installs
Added on
NPX Install
npx skill4agent add mvanhorn/printing-press-library pp-yahoo-financeTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Yahoo Finance — Printing Press CLI
Prerequisites: Install the CLI
This skill drives the binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
yahoo-finance-pp-cli- Install via the Printing Press installer:
bash
npx -y @mvanhorn/printing-press install yahoo-finance --cli-only - Verify:
yahoo-finance-pp-cli --version - Ensure (or
$GOPATH/bin) is on$HOME/go/bin.$PATH
If the install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.23+):
npxbash
go install github.com/mvanhorn/printing-press-library/library/commerce/yahoo-finance/cmd/yahoo-finance-pp-cli@latestIf reports "command not found" after install, the install step did not put the binary on . Do not proceed with skill commands until verification succeeds.
--version$PATHWhen to Use This CLI
Use this CLI when the user asks about:
- stock, ETF, or fund quotes
- chart history or price ranges
- fundamentals or quote summary modules
- options chains or simple moneyness filtering
- trending symbols or predefined market screeners
- ticker search and autocomplete
- local watchlists
- portfolio cost basis and unrealized P&L
Do not use it when the user specifically needs:
- real-time streaming tick data
- exchange-grade paid data feeds
- broker/account actions like order entry
Best Command Mapping
- "How is AAPL doing?" →
yahoo-finance-pp-cli quote --symbols AAPL --agent - "Give me a deeper view on Microsoft" →
yahoo-finance-pp-cli quote summary MSFT --agent - "Show me NVDA for the last year" →
yahoo-finance-pp-cli chart NVDA --range 1y --interval 1wk --agent - "What are the top gainers today?" →
yahoo-finance-pp-cli screener --scr-ids day_gainers --agent - "What is trending in the US?" →
yahoo-finance-pp-cli trending US --agent - "Track my portfolio" →
yahoo-finance-pp-cli portfolio perf --agent - "Compare AAPL, MSFT, and NVDA" →
yahoo-finance-pp-cli compare AAPL MSFT NVDA --agent - "Show me SPY options expiring soon" →
yahoo-finance-pp-cli options-chain SPY --max-dte 45 --agent
Unique Capabilities
watchlist
watchlistSave named ticker groups locally for reuse across commands.
bash
yahoo-finance-pp-cli watchlist create tech
yahoo-finance-pp-cli watchlist add tech AAPL MSFT NVDA GOOGportfolio
portfolioTrack local lots with purchase date and cost basis, then join them with live quotes.
bash
yahoo-finance-pp-cli portfolio add AAPL 50 185.50 --purchased 2024-06-15
yahoo-finance-pp-cli portfolio perf --agent
yahoo-finance-pp-cli portfolio gains --agentdigest
digestSummarize a watchlist into biggest gainers and losers.
bash
yahoo-finance-pp-cli digest --watchlist tech --agentcompare
compareShow a normalized multi-symbol comparison.
bash
yahoo-finance-pp-cli compare AAPL MSFT GOOG NVDA --agentsparkline
sparklineRender a compact terminal sparkline from recent chart data.
bash
yahoo-finance-pp-cli sparkline AAPL --range 3mosql
sqlRun SQL directly against the local Yahoo/watchlist/portfolio database.
bash
yahoo-finance-pp-cli sql "SELECT watchlist, COUNT(*) FROM watchlist_members GROUP BY watchlist" --agentfx
fxConvert currencies without manually building Yahoo FX pair symbols.
bash
yahoo-finance-pp-cli fx USD EUR --amount 100 --agentoptions-chain
options-chainFilter Yahoo's raw chain into a usable options view by moneyness and DTE.
bash
yahoo-finance-pp-cli options-chain AAPL --moneyness otm --max-dte 45 --type calls --agentauth login-chrome
auth login-chromeImport a browser session when Yahoo blocks the automatic crumb bootstrap from the current IP.
bash
yahoo-finance-pp-cli auth login-chrome --cookies ~/yahoo-cookies.json --crumb abc123Command Reference
Market data:
yahoo-finance-pp-cli quote --symbols AAPL,MSFTyahoo-finance-pp-cli quote summary AAPLyahoo-finance-pp-cli chart AAPL --range 1mo --interval 1dyahoo-finance-pp-cli fundamentals AAPL --type annualTotalRevenueyahoo-finance-pp-cli insights --symbol AAPLyahoo-finance-pp-cli options AAPLyahoo-finance-pp-cli recommendations AAPLyahoo-finance-pp-cli screener --scr-ids day_gainersyahoo-finance-pp-cli trending USyahoo-finance-pp-cli search "apple"yahoo-finance-pp-cli autocomplete --query appl
Local-state and derived workflows:
yahoo-finance-pp-cli watchlist create|add|remove|list|show|deleteyahoo-finance-pp-cli portfolio add|list|remove|perf|gainsyahoo-finance-pp-cli digestyahoo-finance-pp-cli compareyahoo-finance-pp-cli sparklineyahoo-finance-pp-cli sqlyahoo-finance-pp-cli fxyahoo-finance-pp-cli options-chain
Utilities:
yahoo-finance-pp-cli syncyahoo-finance-pp-cli workflow archiveyahoo-finance-pp-cli workflow statusyahoo-finance-pp-cli exportyahoo-finance-pp-cli importyahoo-finance-pp-cli doctoryahoo-finance-pp-cli auth statusyahoo-finance-pp-cli auth logoutyahoo-finance-pp-cli auth login-chrome
Practical Recipes
Morning briefing over a watchlist
bash
yahoo-finance-pp-cli watchlist create tech
yahoo-finance-pp-cli watchlist add tech AAPL MSFT NVDA GOOG META
yahoo-finance-pp-cli digest --watchlist tech --agentTrack a real portfolio with cost basis
bash
yahoo-finance-pp-cli portfolio add AAPL 50 185.50 --purchased 2024-06-15
yahoo-finance-pp-cli portfolio add MSFT 20 340.00 --purchased 2024-03-01
yahoo-finance-pp-cli portfolio perf --agent
yahoo-finance-pp-cli portfolio gains --agentCompare several large-cap names
bash
yahoo-finance-pp-cli compare AAPL MSFT NVDA GOOG --agentFallback when Yahoo blocks your IP
bash
yahoo-finance-pp-cli auth login-chrome --cookies ~/yahoo-cookies.json --crumb abc123
yahoo-finance-pp-cli doctorSession Model
Yahoo Finance uses a crumb/cookie session model, not an API key model.
- first live request: the CLI tries to bootstrap the session automatically
- if Yahoo blocks that bootstrap with HTTP 429: use
auth login-chrome - inspect cached state:
auth status - clear a bad cached session:
auth logout
Agent Mode
Add when you want machine-oriented output.
--agentIt expands to:
--json--compact--no-input--no-color--yes
Useful companion flags:
--select <fields>--dry-run--no-cache--data-source auto|live|local--rate-limit <n>
Filtering output
--selectbash
yahoo-finance-pp-cli <command> --agent --select id,name
yahoo-finance-pp-cli <command> --agent --select items.id,items.owner.nameUse this to narrow huge payloads to the fields you actually need — critical for deeply nested API responses.
Response envelope
Data-layer commands wrap output in . Parse for data and to know whether it's or local. The summary is printed to stderr only when stdout is a TTY; piped/agent consumers see pure JSON on stdout.
{"meta": {...}, "results": <data>}.results.meta.sourceliveN results (live)Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error |
| 3 | Resource not found |
| 4 | Session/auth-style error |
| 5 | API error |
| 7 | Rate limited |
| 10 | Config error |
Argument Parsing
Given :
$ARGUMENTS- Empty, , or
help→ run--helpyahoo-finance-pp-cli --help - → install CLI
install - → install MCP server
install mcp - Anything else → map the user request to the best command above and run it with
--agent
MCP Server Installation
bash
go install github.com/mvanhorn/printing-press-library/library/commerce/yahoo-finance/cmd/yahoo-finance-pp-mcp@latest
claude mcp add yahoo-finance yahoo-finance-pp-mcpDirect Use
- Check whether is installed.
yahoo-finance-pp-cli - If not installed, offer CLI installation.
- Choose the command that matches the user's intent most directly.
- Run with unless the user explicitly wants human-formatted output.
--agent - If Yahoo is rate-limiting this machine, guide the user to .
auth login-chrome
Agent Workflow Features
This CLI exposes three shared agent-workflow capabilities patched in from cli-printing-press PR #218.
Named profiles
Persist a set of flags under a name and reuse them across invocations.
bash
# Save the current non-default flags as a named profile
yahoo-finance-pp-cli profile save <name>
# Use a profile — overlays its values onto any flag you don't set explicitly
yahoo-finance-pp-cli --profile <name> <command>
# List / inspect / remove
yahoo-finance-pp-cli profile list
yahoo-finance-pp-cli profile show <name>
yahoo-finance-pp-cli profile delete <name> --yesFlag precedence: explicit flag > env var > profile > default.
--deliver
Route command output to a sink other than stdout. Useful when an agent needs to hand a result to a file, a webhook, or another process without plumbing.
bash
yahoo-finance-pp-cli <command> --deliver file:/path/to/out.json
yahoo-finance-pp-cli <command> --deliver webhook:https://hooks.example/inFile sinks write atomically (tmp + rename). Webhook sinks POST (or when is set). Unknown schemes produce a structured refusal listing the supported set.
application/jsonapplication/x-ndjson--compactfeedback
Record in-band feedback about this CLI from the agent side of the loop. Local-only by default; safe to call without configuration.
bash
yahoo-finance-pp-cli feedback "what surprised you or tripped you up"
yahoo-finance-pp-cli feedback list # show local entries
yahoo-finance-pp-cli feedback clear --yes # wipeEntries append to as JSON lines. When is set and either is passed or , the entry is also POSTed upstream (non-blocking — local write always succeeds).
~/.yahoo-finance-pp-cli/feedback.jsonlYAHOO_FINANCE_FEEDBACK_ENDPOINT--sendYAHOO_FINANCE_FEEDBACK_AUTO_SEND=true