yahoo-finance-2
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.
Оригинален текст · няма потвърден превод на българскиПърво прочетете инструкцията.
Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.
GitHub хранилище- Звезди на репото
- 370
- Лиценз
- Не е посочен. Проверете в репозитория.
- Последна проверка на записа
- Няма посочена дата
Добавете в своя инструмент.
Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.
npx skills add sundial-org/awesome-openclaw-skillsСтраницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.
Откъс от SKILL.md
Началото на файла на автора, без превод.
Yahoo Finance CLI
A Node.js CLI for fetching comprehensive stock data from Yahoo Finance using the yahoo-finance2 library.
Requirements
- Node.js
yahoo-finance2installed globally or available asyfjq
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"]}'