ranaroussi /yfinance
Download market data from Yahoo! Finance's API
★ 25,928⑂ 3,497👁 269⑃ 1,068● 1,733▤ 116
+10
Daily
+118
Weekly
+446
Monthly
25,928
stars
3,497
forks
269
watchers
1,068
prs
1,733
issues
116
releases
README
Download market data from Yahoo! Finance's API
yfinance offers a Pythonic way to fetch financial & market data from Yahoo!Ⓡ finance.
---
[!IMPORTANT]
Yahoo!, Y!Finance, and Yahoo! finance are registered trademarks of Yahoo, Inc.
yfinance is not affiliated, endorsed, or vetted by Yahoo, Inc. It's an open-source tool that uses Yahoo's publicly available APIs, and is intended for research and educational purposes.
You should refer to Yahoo!'s terms of use (here, here, and here) for details on your rights to use the actual data downloaded.
Remember - the Yahoo! finance API is intended for personal use only.
---
[!TIP]
THE NEW DOCUMENTATION WEBSITE IS NOW LIVE! 🤘
Visit ranaroussi.github.io/yfinance
---
Main components
- Ticker: single ticker data
- Tickers: multiple tickers' data
- download: download market data for multiple tickers
- Market: get information about a market
- WebSocket and AsyncWebSocket: live streaming data
- Search: quotes and news from search
- Sector and Industry: sector and industry information
- EquityQuery and Screener: build query to screen market
[!NOTE]
Prices are default adjusted for dividends (auto_adjust=True).
Installation
Install yfinance from PYPI using pip:
{.sourceCode .bash}
$ pip install yfinance
To install without curl_cffi for requests fallback, see Advanced ▸ Installation.
yfinance relies on the community to investigate bugs and contribute code. Here's how you can help.
---
!Star History Chart
---
Legal Stuff
yfinance is distributed under the Apache Software License. See
the LICENSE.txt file in the release for details.
AGAIN - yfinance is not affiliated, endorsed, or vetted by Yahoo, Inc. It's
an open-source tool that uses Yahoo's publicly available APIs, and is
intended for research and educational purposes. You should refer to Yahoo!'s terms of use
(here,
here, and
here) for
details on your rights to use the actual data downloaded.
---
P.S.
Please drop me a note with any feedback you have.
Ran AroussiTop issues
#1591Unable to get open price of a stock on the current day itself, getting yesterday instead21 comments · 2023-07-12#2070Adjusted Close from yfinance is not the same as total return from Yahoo Finance17 comments · 2024-10-03#2486Unable to use request_cache to cache the yfinance response16 comments · 2025-05-11#445_requests.get() times out14 comments · 2020-09-10#2463[0.2.59] CertificateVerifyError('Failed to perform, curl: (60) SSL certificate problem: self signed certificate in certificate chain. See https://curl.se/libcurl/c/libcurl-errors.html first for more details.')9 comments · 2025-05-08#2449[0.2.59] curl_cffi won't compile9 comments · 2025-05-06#2353yfinance does not return the latest (current day during market session) day's data using 'max' parameter.9 comments · 2025-03-10#1868Add support for python-polars8 comments · 2024-02-24
Discussions
#2998^VXN and ^VXD return no intraday data while ^VIX works3 comments · 2026-10-14#2975pandas_datareader exception2 comments · 2026-09-20#2940Data scrutiny/ Data discrepancy2 comments · 2026-08-06#2928Possible Yahoo Finance data issue for GC=F (Gold Aug 2026) on 2026-07-29?1 comments · 2026-07-29#2912sec_filings: fetch from EDGAR directly to fix stale data2 comments · 2026-07-21#2854I ran this morning, missing yesterday's data3 comments · 2026-06-10#2841How to resolve data scaling errors?3 comments · 2026-06-05#2788non-English comments & docs0 comments · 2026-04-26
Latest release
1.8.0 1.8.0 2026-11-03Features - Force curl_cffi = 0.17 for security updates - Tickers.calendar and Tickers.info (use at your own risk of being spam-blocked) - Add methodology to EPS - Price-split-repair improvement Lots of fixes! Full changelog 3016 Thanks @dwaddle @heykav @idpfaff @jackiectl2 @LeonxLJX @louis75aubin-prog @mehdyhaghy @monody0007 @ryanduguid @Shawn-Kim96 @spicysharkco @WatchTree-19 @wavebyrd