yahoo-finance

This skill should be used when the user asks to "get stock prices", "check stock quotes", "look up earnings", "get financial data", "find trending stocks", or needs stock market data from Yahoo Finance.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "yahoo-finance" with this command: npx skills add stuhorsman/yahoo-finance-cli

Yahoo Finance CLI

A Node.js CLI for fetching comprehensive stock data from Yahoo Finance using the yahoo-finance2 library.

Requirements

  • Node.js
  • yahoo-finance2 installed globally or available as yf
  • jq

Install

brew install jq
npm install yahoo-finance2
sudo ln -s /opt/homebrew/bin/yahoo-finance /usr/local/bin/yf

Usage

The tool is available as yf. It outputs JSON, which can be piped to jq for filtering.

yf <module> <symbol> [queryOptions]

Modules

Quote (Real-time Price & Data)

Get real-time price, change, and basic data.

yf quote AAPL
yf quote AAPL | jq '.regularMarketPrice'

Quote Summary (Fundamentals & More)

Get detailed modules like earnings, financial data, and profiles.

# Get specific sub-modules
yf quoteSummary AAPL '{"modules":["assetProfile", "financialData", "defaultKeyStatistics"]}'

# Common modules to request:
# - assetProfile (Company info, sector)
# - financialData (Target price, margins, cash)
# - defaultKeyStatistics (Enterprise value, float, shares)
# - calendarEvents (Earnings dates)
# - earnings (History and trend)
# - recommendationTrend (Analyst ratings)
# - upgradeDowngradeHistory

Insights

Get technical and fundamental insights (valuation, outlook).

yf insights AAPL

Search

Search for symbols.

yf search "Apple"
yf search "BTC-USD"

Historical Data (Deprecated)

Get historical OHLCV data. Note: historical is deprecated; use chart instead.

# Deprecated - use chart instead
yf historical AAPL '{"period1":"2024-01-01","period2":"2024-12-31"}'

# Recommended: use chart
yf chart AAPL '{"period1":"2024-01-01","period2":"2024-12-31"}'

Trending

See what's trending.

yf trendingSymbols US

Examples

Quick Price Check

# Full JSON then filter with jq
yf quote NVDA | jq '{symbol: .symbol, price: .regularMarketPrice, changePct: .regularMarketChangePercent}'

Next Earnings Date

# Use single quotes around the JSON option in zsh/bash
yf quoteSummary TSLA '{"modules":["calendarEvents"]}' | jq '.calendarEvents.earnings.earningsDate'

Analyst Recommendations

yf quoteSummary AAPL '{"modules":["recommendationTrend"]}'

Company Profile

yf quoteSummary MSFT '{"modules":["assetProfile"]}'

Historical OHLCV

# Using chart (recommended)
yf chart AAPL '{"period1":"2024-01-01","period2":"2024-12-31","interval":"1d"}' | jq '.quotes[0:5]'

# Using historical (deprecated, but still works)
yf historical AAPL '{"period1":"2024-01-01","period2":"2024-12-31","interval":"1d"}' | jq '.[0:5]'

Search for Symbols

yf search 'Apple'
yf search 'BTC-USD'

Trending Symbols (US)

yf trendingSymbols US

Insights (valuation, outlook)

yf insights AAPL

Troubleshooting

  • Cookies: The tool automatically handles cookies (stored in ~/.yf2-cookies.json). If you encounter issues, try deleting this file.
  • JSON Output: The output is pure JSON. Use jq to parse it for scripts or readability.

Additional tips:

  • If you see authentication or parsing errors, delete the cookie file and retry:
rm -f ~/.yf2-cookies.json
yf quote AAPL
  • On macOS with zsh, prefer single quotes around JSON option arguments and use double quotes inside (see examples above).
  • If you want a compact numeric value only (no jq), use a short jq filter, e.g.:
yf quote AAPL | jq -r '.regularMarketPrice'

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

feishu-doc-publisher

将 Markdown 文件发布为飞书(Feishu/Lark)在线文档。 支持完整的 Markdown 语法,包括标题、段落、表格、有序/无序列表、 待办事项、分隔线、加粗/斜体等富文本样式。 当用户需要将本地 Markdown 文件同步或发布到飞书文档时使用。

Registry SourceRecently Updated
General

Secretary Memory

OpenClaw 秘书式多分区记忆系统 v3.0。仿生现代秘书的笔记本分类法,支持:(1) 多分区并发搜索 + 每分区3条上下文召回,(2) 会话自动摘要,(3) 偏好自动提取 + 用户关系图谱,(4) 记忆冲突主动检测,(5) 定时 consolidation + 会话结束 hook,(6) 精细化恢复/回溯,...

Registry SourceRecently Updated
General

Secretary Memory Hook

秘书记忆系统核心 Hook — 会话压缩时自动触发摘要/偏好提取/上下文召回。基于 session:compact:before 和 session:compact:after 事件,实现功能3(会话摘要)、功能4(偏好提取)、功能8(跨会话召回)的自动化。

Registry SourceRecently Updated
General

Verified Humanizer New

Transform AI-generated content into natural, human-sounding writing, measure the improvement, and optionally verify the result.

Registry SourceRecently Updated