MCPcopy
hub / github.com/ranaroussi/yfinance

github.com/ranaroussi/yfinance @1.5.1 sqlite

repository ↗ · DeepWiki ↗ · release 1.5.1 ↗
969 symbols 2,836 edges 71 files 185 documented · 19%
README

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

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 Aroussi

Core symbols most depended-on inside this repo

get
called by 159
yfinance/scrapers/quote.py
get
called by 94
yfinance/data.py
append
called by 75
yfinance/calendars.py
history
called by 65
yfinance/tickers.py
all
called by 54
yfinance/lookup.py
items
called by 39
yfinance/scrapers/quote.py
_dts_in_same_interval
called by 38
yfinance/utils.py
keys
called by 35
yfinance/scrapers/quote.py

Shape

Method 783
Class 108
Function 75
Route 3

Languages

Python100%

Modules by API surface

tests/test_ticker.py147 symbols
yfinance/cache.py74 symbols
yfinance/utils.py66 symbols
yfinance/ticker.py60 symbols
yfinance/scrapers/quote.py56 symbols
yfinance/base.py50 symbols
yfinance/data.py34 symbols
tests/test_prices.py27 symbols
tests/test_auth.py27 symbols
yfinance/scrapers/history.py25 symbols
tests/test_utils.py25 symbols
yfinance/live.py22 symbols

Dependencies from manifests, versioned

beautifulsoup44.11.1 · 1×
curl_cffi0.15 · 1×
lxml4.9.0 · 1×
multitasking0.0.7 · 1×
numpy1.16.5 · 1×
pandas1.3.0 · 1×
peewee3.16.2 · 1×
platformdirs2.0.0 · 1×
protobuf3.19.0 · 1×
pytz2022.5 · 1×
requests2.31 · 1×
requests_cache1.0 · 1×

For agents

$ claude mcp add yfinance \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact