YFRateLimitError('Too Many Requests. Rate limited. Try after a while.')

Hello Community,

I am implementing an application on Streamlit Cloud, but I am unable to use Yahoo Finance. There is a message regarding the rate limit. I do not have this issue on Streamlit Local with the same code.

I would appreciate any help/comments.

Link: https://fundamentalanalysis-llrxumzq9aujn47c4dtmmz.streamlit.app/

Here is the requirements.txt:

pandas
datetime
plotly
matplotlib
numpy
yfinance==0.2.56
data
streamlit
scipy
psutil

I tried different versions of Yahoo Finance, but it did not work.

Thanks.

Yahoo can limit your access in any way, at any time, for any reason. This includes applying different limits to requests coming from different computers.

We can only speculate. Yahoo will give no explanations. If it doesn’t work, it doesn’t work. You don’t know when, or if, it will.

Note that many apps in streamlit cloud may be, or have been in the past, making requests to yahoo finance. From yahoo’s point of view, these requests seem to come from just a bunch of IP addresses. It may be that these IPs have been blocked permanently or for a long time, due to high traffic coming from them.

Or it can be something else.

Hi Luiz,

Please let me know if you find a solution. I have also tried the latest yfinance version.

Hello,

Thank you for your message.

Unfortunately, we do not have a solution for this limit. But this issue only occurs on Streamlit Cloud. On my computer, Streamlit Local is working fine.

tks

Hello,

Thanks for your message. I have a workaround, which is to load all the yf datasets on my computer. I save the data and upload it to GitHub.

If I want this application to be updated, I need to do this process every day. This is not practical, but it is a workaround.

Thanks.

Please check this one: YFRateLimitError('Too Many Requests · Issue #2422 · ranaroussi/yfinance · GitHub
It worked for me.