yfinance
Skill by HKUDS
Gives AI assistants access to global stock, ETF and index data from Yahoo Finance. It covers US, Hong Kong and Canadian markets and needs no API key. Built for developers running market analysis and backtests.
Install yfinance
Built from the published package, never by AI.
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/Vibe-Trading && mkdir -p ~/.claude/skills && cp -r /tmp/Vibe-Trading/agent/src/skills/yfinance ~/.claude/skills/yfinanceRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/Vibe-Trading && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Vibe-Trading/agent/src/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 an agent skill that wraps Yahoo Finance market data for US, HK and Canadian stocks, ETFs and indices. It is an open-source Python wrapper for Yahoo Finance. The source says it is free, with no registration or API key required. The HKUDS project also ships a built-in yfinance DataLoader for backtests, and a Yahoo public-API client for additional fields.
The skill covers historical OHLCV bars, company info, financial statements, dividends and splits, institutional holdings, indices, ETFs and FX rates. For OHLCV, it prefers the get_market_data tool, which normalizes symbols and removes malformed rows. It is aimed at developers and analysts building agents, swarms or backtests on Yahoo data. Yahoo rate-limits by source IP, so the source recommends batch downloads.
Written from the project's SKILL.md and checked against it.
What it can do
- get_market_dataReturns OHLCV bars through the project loader layer, with normalized symbols and strict JSON output.
- Historical OHLCVFetches daily and intraday price bars for US, HK and Canadian tickers.
- Company infoReads fields such as market cap, PE, EPS and dividend yield for a ticker.
- Financial statementsLoads annual and quarterly income statements, balance sheets and cash flow statements.
- Dividends and splitsRetrieves dividend history, stock split history and all corporate actions.
- Institutional holdingsShows institutional holders, major holders summary and insider transactions.
- Indices and ETFsDownloads history for indices such as S&P 500, NASDAQ and Hang Seng, and ETFs like SPY.
- FX ratesDownloads currency pair history such as USD/CNY, USD/HKD and EUR/USD.
- Backtest sourceWorks as a data source in backtest configs when source is set to yfinance or auto.
What you need
- Python
- Access to the HKUDS project loader layer for the DataLoader examples
Try asking
- Get daily OHLCV bars for AAPL, 700.HK and TD.TO for 2025.
- Show the income statement and balance sheet for AAPL.
- Download S&P 500 and Hang Seng index history for last year.
Good to know
- Yahoo rate-limits requests by source IP, so high-frequency calls may trigger temporary bans.
- Minute data is limited: 1m covers up to 7 days, and 1h covers up to 730 days.
- Through the backtest loader, yfinance returns OHLCV only, so fundamentals need profile reads or yahoo_ticker.
- The source notes less depth than Tushare for A-share data.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: agent/src/skills/yfinance/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md9 KB -
references/tool_get_options_chain.md4 KB -
references/tool_get_stock_profile.md3 KB -
references/yahoo_client_get_chart.md3 KB -
references/yahoo_client_get_options.md3 KB
Show all 7 files
-
references/yahoo_client_get_quote_summary.md3 KB -
references/yahoo_client_search.md2 KB
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 reads Yahoo Finance public data.
Which markets does yfinance cover?
The source says it covers US, HK and Canadian stocks, ETFs and indices. It also lists FX rate examples such as CNY=X and HKD=X.
What is the rate limit for yfinance?
The source does not give a fixed number. It warns that high-frequency requests may trigger temporary Yahoo bans, so batch downloads are preferred.
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 published under the MIT licence. The service it connects to may have its own pricing.
Is yfinance safe to use?
It scores 92 of 100. Grades: maintenance A, licence A, quality A. 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.
