https://github.com/ranaroussi/yfinance
Download market data from Yahoo! Finance's API
https://github.com/ranaroussi/yfinance
financial-data fix-yahoo-finance market-data pandas python stock-data yahoo-finance yahoo-finance-api
Last synced: 30 days ago
JSON representation
Download market data from Yahoo! Finance's API
- Host: GitHub
- URL: https://github.com/ranaroussi/yfinance
- Owner: ranaroussi
- License: apache-2.0
- Created: 2017-05-21T10:16:15.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2026-10-05T19:12:16.000Z (about 1 month ago)
- Last Synced: 2026-10-11T01:34:12.268Z (about 1 month ago)
- Topics: financial-data, fix-yahoo-finance, market-data, pandas, python, stock-data, yahoo-finance, yahoo-finance-api
- Language: Python
- Homepage: https://ranaroussi.github.io/yfinance
- Size: 9.89 MB
- Stars: 25,485
- Watchers: 271
- Forks: 3,438
- Open Issues: 106
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-python - ranaroussi/yfinance - Download market data from Yahoo! Finance's API (Other / Scientific Computing)
- awesome-systematic-trading - yfinance - |`Python`| - yfinance offers a threaded and Pythonic way to download market data from Yahoo\!Ⓡ finance. (Data Source / Stocks and General)
- awesome-python-machine-learning-resources - GitHub - 56% open · ⏱️ 11.07.2022): (金融数据处理)
- Awesome_AI4Finance - yfinance
- awesome-finance - yfinance - Yahoo Finance market data downloader (Libraries & SDKs / Python)
- awesome - ranaroussi/yfinance - Download market data from Yahoo! Finance's API (Python)
- awesome-quant - yfinance - `Python` - Yahoo\! Finance market data downloader (+faster Pandas Datareader). (Market Data & Data Sources)
- awesome-github-projects - yfinance - Download market data from Yahoo! Finance's API ⭐25,494 `Python` 🔥 (⚙️ Backend & APIs)
- awesome-quant-ai - yfinance
- awesome-data - Yfinance
- awesome-python - yfinance - Easy Pythonic way to download market and financial data from Yahoo Finance. (Downloader)
- fucking-awesome-python - yfinance - Easy Pythonic way to download market and financial data from Yahoo Finance. (Downloader)
- awesome-quant-cn - yfinace - - yahoo财经 (金融数据)
- github-ultimate-repos - ranaroussi/yfinance - | ⭐ 25,605★ | 🍴 3,452 | 💻 `Python`🔗 <https://github.com/ranaroussi/yfinance>📝 Download market data from Yahoo\! Finance's API⚙️ `CPython C-API binding -> vectorized NumPy ndarray broadcasting -> SIMD/BLAS numerical linear algebra -> computational pipeline execution -> serialized analytical output.` (📜 Master Categorized Repository Directory (100% Clickable Links) / [55] PYTHON ECOSYSTEM, DATA SCIENCE, SCIENTIFIC COMPUTING & ANALYTICS)
- awesome-quant - github.com/ranaroussi/yfinance
- Awesome-AITools - Github
- awesome-quant - ranaroussi/yfinance - 06-22 · license Apache-2.0 (Data and Feeds)
- awesome-systematic-trading - yfinance - yfinance offers a threaded and Pythonic way to download market data from Yahoo\!Ⓡ finance. (Data Sources / General)
README

# Download market data from Yahoo! Finance's API
**yfinance** offers a Pythonic way to fetch financial & market data from [Yahoo!Ⓡ finance](https://finance.yahoo.com).
---
> [!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](https://policies.yahoo.com/us/en/yahoo/terms/product-atos/apiforydn/index.htm), [here](https://legal.yahoo.com/us/en/yahoo/terms/otos/index.html), and [here](https://policies.yahoo.com/us/en/yahoo/terms/index.htm)) **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**](https://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`)](https://ranaroussi.github.io/yfinance/advanced/price_adjustment.html).
## Installation
Install `yfinance` from PYPI using `pip`:
``` {.sourceCode .bash}
$ pip install yfinance
```
To install without `curl_cffi` for requests fallback, see [Advanced ▸ Installation](https://ranaroussi.github.io/yfinance/advanced/install.html).
### [yfinance relies on the community to investigate bugs and contribute code. Here's how you can help.](https://github.com/ranaroussi/yfinance/blob/main/CONTRIBUTING.md)
---

---
### Legal Stuff
**yfinance** is distributed under the **Apache Software License**. See
the [LICENSE.txt](https://github.com/ranaroussi/yfinance/blob/main/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](https://policies.yahoo.com/us/en/yahoo/terms/product-atos/apiforydn/index.htm),
[here](https://legal.yahoo.com/us/en/yahoo/terms/otos/index.html), and
[here](https://policies.yahoo.com/us/en/yahoo/terms/index.htm)) for
details on your rights to use the actual data downloaded.
---
### P.S.
Please drop me a note with any feedback you have.
**Ran Aroussi**