ranaroussi / yfinance

Download market data from Yahoo! Finance's API
https://aroussi.com/post/python-yahoo-finance
Apache License 2.0
14.88k stars 2.44k forks source link

πŸ’₯ Is yahoo finance broken? #2052

Open paintdog opened 2 months ago

paintdog commented 2 months ago

Describe bug

Since yesterday, Yahoo Finance has not been providing data for several stocks, making it impossible for me to download them using your software. For example, for Honeywell – a Nasdaq 100 stock (!!!) – Yahoo Finance states: "There are no [data] in the selected time period."

I understand that this is likely a Yahoo Finance issue, but your software becomes unusable if the platform behind it stops providing data. As far as I can tell, this issue has affected a wide range of stocks (some US, mostly European) since yesterday.

Are others experiencing this problem as well? Does this happen from time to time, or is it a sign of a bigger issue? Any suggestions? Will Yahoo fix this problem, or are they already aware of it? Is Yahoo discontinuing data support?

Simple code that reproduces your problem

No simple code, as I use your software within my own modules.

Debug log

see above

Bad data proof

see above

yfinance version

0.24.3

Python version

Python 3.11

Operating system

Linux Mint 21.3

divyankm commented 2 months ago

Seems some Symbols are working, while some symbols are not working for yahoofinance since yesterday. yfinance version: 0.2.43 python version: 3.10.12

Working Symbol: INDIGO.NS

import yfinance as yf
symbol = 'INDIGO.NS'  
df = yf.download(symbol, start='2022-11-05', interval='1h')
df.head()
>> 
Open | High | Low | Close | Adj Close
-- | -- | -- | -- | --

1774.849976 | 1817.699951 | 1774.849976 | 1801.349976 | 1801.349976
1800.599976 | 1802.000000 | 1769.050049 | 1777.800049 | 1777.800049
1778.050049 | 1788.000000 | 1774.150024 | 1778.050049 | 1778.050049
1784.849976 | 1784.849976 | 1676.300049 | 1683.650024 | 1683.650024
1683.400024 | 1721.000000 | 1680.150024 | 1720.000000 | 1720.000000

Non Working Symbol since Yesterday:

import yfinance as yf
symbol = 'TCS.NS'  
df = yf.download(symbol, start='2022-11-05', interval='1h')
df.head()
>> ERROR:yfinance:Could not get exchangeTimezoneName for ticker 'TCS.NS' reason: 'chart'
[*********************100%***********************]  1 of 1 completed
ERROR:yfinance:
1 Failed download:
ERROR:yfinance:['TCS.NS']: YFTzMissingError('$%ticker%: possibly delisted; no timezone found')

Are others experiencing this problem as well? Yes , I am also experiencing the same.

Does this happen from time to time, or is it a sign of a bigger issue? Its stable, using since lot of time. May be some issue at Yahoo Side.

Will Yahoo fix this problem, or are they already aware of it? Is Yahoo discontinuing data support? May be will get clarity after some time.

QuentinBennett commented 2 months ago

Getting the same problem with a number of (but not all) .NZ tickers.

USF.NZ not working. GNE.NZ working.

divyankm commented 2 months ago

Earlier Issues raised : https://github.com/ranaroussi/yfinance/issues/2044 https://github.com/ranaroussi/yfinance/issues/1996 https://github.com/ranaroussi/yfinance/issues/1957

QuentinBennett commented 2 months ago

Getting the same problem with a number of (but not all) .NZ tickers.

USF.NZ not working. GNE.NZ working.

Replying to myself - https://finance.yahoo.com/quote/USF.NZ/history/ is empty which is probably the cause of the problem

paintdog commented 2 months ago

It seems Yahoo Finance has fixed the issue (Honeywell)!?

andrewbritt1 commented 2 months ago

For :

GetFacebookInformation = yfinance.Ticker("META")
print(*values: GetFacebookInformation.info)

I get:

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://query2.finance.yahoo.com/v6/finance/quoteSummary/META?modules=financialData&modules=quoteType&modules=defaultKeyStatistics&modules=assetProfile&modules=summaryDetail&ssl=true
conda list | grep finance
yfinance                  0.2.28             pyhd8ed1ab_0    conda-forge

P.S. Putting the above url into the browser produces: image

Seems like it started to work today....

I just wanted to add that I'm getting the same issue too. I hope there is a solution for this.

04 Client Error: Not Found for url: https://query2.finance.yahoo.com/v6/finance/quoteSummary/TSLA?modules=financialData&modules=quoteType&modules=defaultKeyStatistics&modules=assetProfile&modules=summaryDetail&ssl=true

cdcv commented 1 month ago

Can someone please clarify: is this issue solved, and is it possible to use yfinance again? Does yfinance 0.2.43 somehow solve the core issue with Yahoo changing their data availability? Can't quite see if Yahoo has made the data unavailable how a software update would fix that.

ValueRaider commented 1 month ago

Version 0.2.32 added cookie & crumb, it helped a lot. I'm not sure what the remaining issue is - spam? old cookie? country-specific?

(deleted @az-z comments because using old version)

cdcv commented 1 month ago

Thank you ValueRaider. Does the cookie/crumb fully restore all prior functionality? Again, my understanding is that YFinance had removed considerable functionality from their API whether you're auth'd or not, like detailed historical data, and having a cookie wouldn't solve that. Am I miss-understanding? Thx again.

ValueRaider commented 1 month ago

Yahoo had removed considerable functionality from their API

This would break their website so I don't believe this. You could just install yfinance use it.

kunif commented 1 month ago

According to the first paragraph of this article:

Exploring Alternatives to the Yahoo Finance API
https://eodhd.medium.com/exploring-alternatives-to-the-yahoo-finance-api-aa0415085cc5

Yahoo Finance recently limited access to its historical data downloads to Gold membership subscribers, which costs $50 per month (or $500 per year with a discount).


According to this help article, it looks like you can download your historical data if you pay for a Gold subscription.

Yahoo Finance subscription plans
https://help.yahoo.com/kb/SLN36623.html

Plans for desktop computers, billed annually

  • Gold - $49.95/Month, $479.40/Year ($120 savings on yearly payment plan)

Yahoo Finance Gold plan
Build your own investing strategies to maximize profits with premium charts, smart screeners, and 40+ years of historical downloadable data.

  • 40+ years of downloadable data