8

yfinance and yahoo_fin no longer seem to work in their entirety.

Is anyone else experiencing this problem with no financial data for any company using these packages?

Does anyone know if these have been deprecated or blocked or if yfinance and yahoo_fin are still working?

EDIT: The .history seems to be working, also the .info on some companies does work but not all.

Anon Omiss
  • 117
  • 1
  • 1
  • 6
  • 1
    I'm surprised nobody has an answer for this simple question. Does nobody use yfinance or yahoo_fin? If you do, the question is simply, is it working for you? Can you pull in company's financials and income statements to get their financial data? Is anyone using either of these packages able to use them right now? – Anon Omiss Jul 02 '21 at 14:36

5 Answers5

13

This fixed the issue

pip install yfinance --upgrade --no-cache-dir 
Sven Eberth
  • 3,057
  • 12
  • 24
  • 29
Sri
  • 131
  • 3
8

I had a similar issue with yfinance. It worked in the morning of July 9 but stopped working around 5pm EST, July 9. I resolved the issue by installing the latest release, 0.1.62 (https://pypi.org/project/yfinance/#history), which was released on July 9.

Step 1: uninstall the current version of yfinance, !pip uninstall -y yfinance.

Step 2: install the current version of yfinance, pip install yfinance

I did nothing special to install version 0.1.62, but I checked that there was a folder, yfinance-0.1.62.dist-info to verify the version.

Cam
  • 83
  • 1
  • 3
  • Yes, I had it stop working again for a moment. All I did was pip install yahoo_fin --upgrade and pip install yfinance --upgrade and it worked... The packges of course have to be updated by their creator first... – Anon Omiss Jul 12 '21 at 18:46
6

For the yahoo_fin module take a look here https://github.com/atreadw1492/yahoo_fin/issues/55 The author is taking care of it.

Vorotori
  • 76
  • 2
  • That's great, just what I was looking for... Looks to be an overall issue with a change in Yahoo Finance, which isnt surprising... Thank-you for the answer. :) – Anon Omiss Jul 02 '21 at 15:38
  • 2
    Both yfinance and yahoo_fin have been updated and are now both working again. These were down for a few days at most. Yahoo Finance made a change on their site and the packages just needed to be updated by their maintainers in order to work around the changes. Then simply doing a pip install package --upgrade worked. My code is now working again. Thanks – Anon Omiss Jul 03 '21 at 14:45
3

Apparently you need to install a fix before you can use it, since their API has changed.

Here is the link to the fix:

https://pypi.org/project/fix-yahoo-finance/

Joshua
  • 551
  • 4
  • 13
  • Hi, thanks. Yes, Im aware the API was deprecated and the yfinance is just wrapping it to make it work... The yfinance has been working for me just fine and is only very recently that it stopped. Just days ago the code ran just fine and returned all the data, and today suddenly there's no data. Is anyone else who uses yfinance and yahoo_fin experiencing this problem or are you still able to pull the data in? – Anon Omiss Jul 02 '21 at 01:21
-4

If I turn off my anti-virus, it works fine.

Bala K
  • 7
  • 4