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.**
Ticker: single ticker dataTickers: multiple tickers' datadownload: download market data for multiple tickersMarket: get information about a marketWebSocketandAsyncWebSocket: live streaming dataSearch: quotes and news from searchLookup: ticker symbol lookupSectorandIndustry: sector and industry information
Clone the repository and install in editable mode:
$ git clone https://github.com/ryroeu/yfinance
$ cd yfinance
$ pip install -e .
To run the FastAPI web app, install the optional web dependencies:
$ pip install -e .[web]
Run in terminal
python app/main.py
Run in browser
# Install web app dependencies first:
pip install -e .[web]
# Start it with:
uvicorn app.web.app:app --reload
# Then open:
http://localhost:8000.
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.

