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 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.

  • Score 45
  • 17 stars
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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

A

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

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.

yfinance Install

Add to stack

Loading.