Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 92
  • 39k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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/yfinance

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install yfinance in Claude Code

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

A

No 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 →

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.

yfinance Install

Add to stack

Loading.