

earnings_trend # show next event (earnings, etc) msft. recommendations_summary # show analysts other work msft. sustainability # show analysts recommendations msft. quarterly_earnings # show sustainability msft. quarterly_cashflow # see `Ticker.get_income_stmt()` for more options # show holders msft. quarterly_balance_sheet # - cash flow statement msft. quarterly_income_stmt # - balance sheet msft. get_shares_full ( start = "", end = None ) # show financials: # - income statement msft. shares # - accurate time-series count: msft. capital_gains # only for mutual funds & etfs # show share count # - yearly summary: msft. history_metadata # show actions (dividends, splits, capital gains) msft. history ( period = "1mo" ) # show meta information about the history (requires history() to be called first) msft. info # get historical market data hist = msft. Ticker ( "MSFT" ) # get all stock info msft. The Ticker module, which allows you to access ticker data in a more Pythonic way: import yfinance as yf msft = yf. Is technically possible to extract this from their webpage but not implemented because difficult, see discussion in the issue thread. Yahoo is now regularly changing their decryption key, breaking yfinance decryption. price stats and forcing users to switch (sorry but we think necessary). Then in 0.2.6 introduced Ticker.fast_info, providing much faster access to some elements wherever possible e.g.

In December we rolled out version 0.2 with optimised scraping. Is it to stop scrapers? Maybe, so we've implemented changes to reduce load on Yahoo. yfinance is now better prepared for any future changes by Yahoo. Fortunately the decryption keys are available, although Yahoo moved/changed them several times hence yfinance breaking several times. Since December 2022 Yahoo has been encrypting the web data that yfinance scrapes for non-price data.

→ Check out this Blog post for a detailed tutorial with code examples. Yfinance offers a threaded and Pythonic way to download market data from Yahoo!Ⓡ finance. Yahoo! finance API is intended for personal use only. You should refer to Yahoo!'s terms of useĭetails on your rights to use the actual data downloaded. Intended for research and educational purposes.

It'sĪn open-source tool that uses Yahoo's publicly available APIs, and is Yfinance is not affiliated, endorsed, or vetted by Yahoo, Inc. Yahoo!, Y!Finance, and Yahoo! finance are registered trademarks of Download market data from Yahoo! Finance's API *** IMPORTANT LEGAL DISCLAIMER ***
