yfinance
Skill by OpenSucker
Retrieves global market data from Yahoo Finance for US stocks, HK stocks, ETFs and indices. Useful for backtesting and market analysis, with no API key or registration required.
Install yfinance
Built from the published package, never by AI.
git clone --depth 1 https://github.com/OpenSucker/OpenSucker /tmp/OpenSucker && mkdir -p ~/.claude/skills && cp -r /tmp/OpenSucker/skills/vibe_skills/yfinance ~/.claude/skills/yfinanceRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/OpenSucker/OpenSucker /tmp/OpenSucker && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/OpenSucker/skills/vibe_skills/yfinance ~/.gemini/antigravity-cli/skills/yfinanceAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
yfinance is a skill that wraps the open-source yfinance Python library for Yahoo Finance. It gives an AI assistant access to historical OHLCV bars, company info, financial statements, dividends and splits, institutional holdings, indices, ETFs and FX rates. The source covers US stocks, HK stocks, ETFs and indices.
The project includes a built-in yfinance DataLoader for backtests, selected by setting source to yfinance or auto. A unified ticker format is converted to yfinance format, so 700.HK becomes 0700.HK. The source describes the data as free, with no registration or API key needed.
Written from the project's SKILL.md and checked against it.
What it can do
- Historical OHLCVDownloads daily and intraday price bars for single or multiple tickers.
- Company infoReads company name, industry, market cap, PE, EPS and dividend yield.
- Financial statementsRetrieves income statement, balance sheet, cash flow and earnings data.
- Dividends and splitsPulls dividend history, stock split history and all corporate actions.
- Institutional holdingsReads institutional holders, major holders summary and insider transactions.
- Indices and ETFsDownloads data for indices such as S&P 500, NASDAQ and Hang Seng, and ETFs such as SPY.
- FX ratesDownloads currency pair data such as USD/CNY, USD/HKD and EUR/USD.
What you need
- Python
- pip packages yfinance and pandas
Try asking
- Download one year of daily prices for AAPL and summarise the trend.
- Get Tencent's 0700.HK price history since January 2025.
- Show the latest income statement and balance sheet for MSFT.
Good to know
- High-frequency requests may trigger temporary Yahoo Finance bans; prefer batch downloads.
- 1m interval data is limited to 7 days; 2m to 90m intervals to 60 days; 1h to 730 days.
- Backtest loader returns OHLCV only; PE, PB and other fundamentals need separate calls.
- Data is scraped from Yahoo Finance public data, which is less deep than Tushare for A-shares.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/vibe_skills/yfinance/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to yfinance
All alternatives →Lists live launchpad token feeds and AI-detected hot topics for meme tokens on BSC, Solana and Base. Covers new, finalizing and just-migrated tokens on launchpads such as Pump.fun and Four.meme.
The okx-market skill lets an AI assistant retrieve cryptocurrency market data from the OKX V5 REST API. It is aimed at users who want spot, derivatives and index data in Python without an account.
Calculates key SaaS health metrics such as ARR, churn, LTV and CAC from raw business numbers, then gives prioritized advice. Built for founders and finance leads who share revenue or customer figures.
Fetches U.S. SEC EDGAR data for research. It resolves a ticker to its CIK, lists recent filings with primary-document URLs, and pulls XBRL financial series. Built for analysts who need free, U.S.-only filing data.
Provides free, no-auth access to Eastmoney market data for A-shares, Hong Kong stocks and US stocks. It covers fund flows, dragon-tiger lists, financial statements and stock screening.
Reads and manages a user's QuickBooks business through Intuit's official MCP server. It answers finance questions from reports, invoices, customers, products and benchmarks, and completes approved actions.
Compare with meme-rush, okx-market or saas-metrics-coach
yfinance: common questions
Does yfinance need an API key?
No. The source says it is completely free and requires no registration or API key, because it scrapes Yahoo Finance public data.
How are HK stock tickers written?
The project format such as 700.HK is converted to yfinance format 0700.HK by padding the number to four digits. Yahoo Finance uses four-digit numbers with the .HK suffix.
Can yfinance be used for backtests?
Yes. The project has a built-in yfinance DataLoader, and setting source to yfinance or auto in the config invokes it.
How do I install yfinance?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is yfinance free?
The code is public, but no licence file was found, so check the repository before commercial use.
Is yfinance safe to use?
It scores 45 of 100. Grades: maintenance D, licence F, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to yfinance?
Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.
