1

Good morning, evening and night!

I'm having an issue when trying to download stock data using the yfinance tool in JupyterLab. It will work perfectly in Google Colab, as I'm using the following simple code to get data from stocks:

import yfinance as yf

ticker = 'AAPL'
df = yf.download(ticker, period='1y')
df.head()

However, when I try executing the same code in JupyterLab, I'm getting the following error message:

[*********************100%***********************]  1 of 1 completed

1 Failed download:
['AAPL']: YFRateLimitError('Too Many Requests. Rate limited. Try after a while.')

I found it weird, since I haven't been using yfinance for a while, so there is no reason for it to suggest "Many Requests" made by myself.

Tried changing the stock ticker, updating the yfinance version, got the same error. Anyone got any solutions or suggestions?

Much appreciated.

2
  • 1
    It is possible that you share IP with smn who used to call API a lot and you were permanently banned. Also this is possible if you are using VPN instead of real IP. Commented May 29, 2025 at 20:38
  • which version of yFinance are you using? (i had this issue with yFinance-0.2.55), upgraded to 0.2.61 , I dont have access to jupyter notebook at present but it works from jupyter-console. Commented May 29, 2025 at 23:17

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.