yf-finance

v1.0.0

Fetch real-time and historical financial data from Yahoo Finance using yf-cli. Use when the user asks about stock prices, company financials, earnings calend...

0· 75·0 current·0 all-time
byErhWen Kuo@erhwenkuo

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for erhwenkuo/yf-finance.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "yf-finance" (erhwenkuo/yf-finance) from ClawHub.
Skill page: https://clawhub.ai/erhwenkuo/yf-finance
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install yf-finance

ClawHub CLI

Package manager switcher

npx clawhub@latest install yf-finance
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the behavior: SKILL.md instructs running yf-cli to fetch quotes, history, financials, news, etc. No unrelated binaries or credentials are requested.
Instruction Scope
Runtime instructions only call yf-cli and (in examples) simple one-liner Python processing; they do not reference unrelated files, secrets, or external endpoints beyond normal network access to fetch Yahoo Finance data.
Install Mechanism
No install spec in the registry; the included install.sh only checks for yf and runs `uv tool install yf-cli` if missing. This is a low-risk, expected install pattern (no opaque downloads or extracted archives in the skill).
Credentials
The skill requires no environment variables, credentials, or config paths. Its stated requirements (Python 3.13+, uv, yf-cli) are reasonable for running the described CLI tool.
Persistence & Privilege
always is false and the skill does not request persistent system-wide configuration or elevated privileges. The small install script only invokes uv and yf and does not modify other skills or agent configuration.
Assessment
This skill is internally consistent: it uses the yf-cli tool to get Yahoo Finance data and does not ask for secrets. Before installing, ensure you trust the provenance of the external tools it invokes (uv and yf-cli) and that your environment allows network access. If you are concerned about autonomous invocation, note the skill can run yf-cli commands when invoked by the agent — consider restricting autonomous use or reviewing logs. If you need stronger guarantees, verify the sources for uv and yf-cli (package repositories/releases) and inspect the yf-cli code you will install.

Like a lobster shell, security has layers — review code before you run it.

latestvk97fv1nm1rq6v79dtwmkpj6bp185adct
75downloads
0stars
1versions
Updated 5d ago
v1.0.0
MIT-0

yf-finance

Query Yahoo Finance data from the command line using yf-cli.

Pre-flight Check

Always run this before any yf command.

command -v yf

If the command is not found, install it:

uv tool install yf-cli

Confirm the tool is ready before continuing:

yf --version

Never skip this check — assume nothing about the environment.


Command Catalogue

Real-time Quote

yf quote TICKER

Returns current price, daily change, volume, and market cap.

Historical OHLCV

yf history TICKER [--period PERIOD] [--interval INTERVAL] [--output FORMAT]
FlagDefaultCommon values
--period1mo1d 5d 1mo 3mo 6mo 1y 2y 5y 10y ytd max
--interval1d1m 5m 15m 30m 60m 1d 1wk 1mo
--outputtablejson csv

Company Info

yf info TICKER

Returns business summary, sector, industry, employee count, and key ratios.

Financials

yf financials TICKER [--type TYPE]

--type values: income (default), balance, cashflow. Returns the most recent annual statements.

Corporate Actions

yf dividends TICKER   # dividend history
yf splits TICKER      # stock split history
yf actions TICKER     # combined dividends and splits

Analyst Data

yf analyst TICKER

Returns price targets (low / mean / high), buy/hold/sell recommendation counts, and EPS estimates.

Ownership

yf holders TICKER

Returns major holders, institutional holders, and insider transactions.

Earnings Calendar

yf calendar TICKER

Returns next earnings date, EPS estimate, and revenue estimate.

Options Chain

yf options TICKER [--output FORMAT]

Returns calls and puts for the nearest expiry. Use --output json to process programmatically.

Search

yf search QUERY

Resolves a company name or partial ticker to a symbol. Use this when the user does not know the exact ticker.

Market Screener

yf screen --preset PRESET

Common presets: most_actives, day_gainers, day_losers, undervalued_large_caps, growth_technology_stocks, aggressive_small_caps.

Market Overview

yf market

Returns sector performance and broad market indices.

News

yf news TICKER

Returns the latest headlines and article links for a ticker.


Output Format Guidance

FormatFlagUse when
Table (default)(none)Displaying results directly to the user
JSON--output jsonParsing values, computing statistics, chaining commands
CSV--output csvExporting data for spreadsheet use

Add --no-color in environments that do not support ANSI escape codes.


Decision Guide

User intentCommand
"What is the current price of X?"yf quote TICKER
"Show me X's stock history / chart data"yf history TICKER
"Tell me about company X"yf info TICKER
"Show X's income statement / balance sheet"yf financials TICKER --type income|balance|cashflow
"When does X report earnings?"yf calendar TICKER
"What do analysts think of X?"yf analyst TICKER
"Who owns X?"yf holders TICKER
"Show X's options"yf options TICKER
"What are today's top movers?"yf screen --preset most_actives|day_gainers|day_losers
"How is the market doing?"yf market
"Latest news on X"yf news TICKER
Unknown ticker or company nameyf search "company name"

Edge Cases

  • Unknown ticker — if yf quote returns no data, run yf search QUERY first to resolve the correct symbol.
  • Delisted or OTC tickers — some symbols are unavailable on Yahoo Finance; inform the user and suggest an alternative ticker if known.
  • Rate limiting — if Yahoo Finance returns an error or empty response, wait a few seconds and retry once before reporting failure.
  • Empty options chain — not all tickers have listed options; handle gracefully and inform the user.
  • Market closedyf quote still returns the last closing price; note this to the user when markets are closed.

Reference Files

Comments

Loading comments...