Did yfinance and yahoo_fin for Python stop working recently?
Asked Answered
H

5

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.

Hampson answered 2/7, 2021 at 1:9 Comment(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?Hampson
P
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.

Popular answered 2/7, 2021 at 14:59 Comment(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. :)Hampson
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. ThanksHampson
P
16

This fixed the issue

pip install yfinance --upgrade --no-cache-dir 
Pusan answered 12/7, 2021 at 22:7 Comment(1)
Thanks, confirmed, this still works in December 2021.Drew
S
9

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.

Seve answered 10/7, 2021 at 14:49 Comment(1)
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...Hampson
P
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.

Popular answered 2/7, 2021 at 14:59 Comment(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. :)Hampson
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. ThanksHampson
O
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/

Odilia answered 2/7, 2021 at 1:14 Comment(1)
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?Hampson
M
-4

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

Medius answered 12/8, 2021 at 18:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.