yfinance README

The project's README from github.com/ranaroussi/yfinance. As one markdown file: README.md.

Download market data from Yahoo! Finance's API

Python version PyPi version PyPi status PyPi downloads Star this repo Follow me on twitter

ranaroussi%2Fyfinance | Trendshift

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

Installation

Install yfinance from PYPI using pip:

$ 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


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 Aroussi

yfinance (ranaroussi/yfinance)

Searching Database…

25.5K ·GitHub
What is this?yfinance is a Python library that downloads financial and market data from Yahoo! Finance's API - stock quotes, live streaming, search and screener queries - straight from your Python code.
Is it a library I import into my own code, or a hosted service?It's a Python library: you install it from PyPI and call it in your code. There is no server or app to run.
How do I add it to a project?Install it from PyPI with pip (pip install yfinance). Full documentation lives at the dedicated site ranaroussi.github.io/yfinance.
Do I need anything besides Python installed?No separate services - pip pulls everything in. By default the install includes curlcffi (used for the requests fallback); the docs describe installing without it under Advanced ▸ Installation.
Is this an official Yahoo product?No - yfinance is not affiliated with, endorsed by, or vetted by Yahoo. It's an independent open-source tool that uses Yahoo's publicly available APIs, so Yahoo guarantees nothing.
What's allowed under the license - for the code and for the data?The code is under the Apache Software License (Apache-2.0). But the Yahoo! finance API is intended for personal use only, and Yahoo's terms of use govern your rights to the downloaded data.
Can I pull data for many stocks at once?Yes. The Tickers object handles multiple tickers, and the download function fetches market data for several tickers in one call; a single Ticker covers one symbol.
Does it give real-time prices or only historical data?Real-time is included: yfinance ships WebSocket and AsyncWebSocket components for live streaming data on top of the regular downloads.
Can I search for quotes and news or screen stocks by criteria?Yes - the Search component returns quotes and news from search, EquityQuery and Screener let you build queries to screen the market, and Sector and Industry components provide sector and industry information.
Is this a mature project or a weekend hack?It has been around since May 2017 and counts over 25,000 GitHub stars. Maintenance is community-driven: the README says yfinance relies on the community to investigate bugs and contribute code.
Creator
ranaroussi
Size
10.1 MB
Stars
25.5K
Age
9y
Commits · 90 Days