ranaroussi

    ranaroussi/yfinance

    #324 this week

    Download market data from Yahoo! Finance's API

    api
    financial-data
    fix-yahoo-finance
    market-data
    pandas
    python
    Python
    Apache-2.0
    24.9K stars
    3.4K forks
    24.9K GitHub watchers
    Updated 8/9/2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Use Cases & Benefits

    • yfinance is a Python library for downloading financial and market data from Yahoo! Finance's public API.
    • Key features include fetching single/multiple ticker data, live streaming via WebSocket, market info, and screening tools using pandas.
    • Strengths are ease of use, extensive data coverage, and active community; limitations include reliance on unofficial Yahoo API and personal use restrictions.
    • Organizations can integrate yfinance for research, analytics, and prototyping but should verify compliance with Yahoo's terms for production use.
    • Ideal for financial analysts, data scientists, and developers needing accessible historical and real-time stock market data in Python.

    About yfinance

    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

    • 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

    Installation

    Install yfinance from PYPI using pip:

    $ pip install yfinance
    

    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

    Discover Repositories

    Search across tracked repositories by name or description