yfinance
yfinance copied to clipboard
After so many requests, the timeout limit is always reached
*** READ BEFORE POSTING ***
Before posting an issue - please upgrade to the latest version and confirm the issue/bug is still there.
Upgrade using:
$ pip install yfinance --upgrade --no-cache-dir
Bug still there? Delete this content and submit your bug report here...
I am running analysis each day on 8-10 stocks over a 365 day period, and after about 90 days of analysis the ticker.history function is continually reaching the timeout limit of 5 seconds, and returns nothing. Is this an issue with the scraper, or some sort of Yahoo internal limit?
My understanding is this is Yahoo rate-limiting API access. So you have to rate-limit your own data requests, implement some form of caching.
... which is why I'm working on a caching wrapper for yf, because everyone has this issue. Smart caching that only contacts Yahoo if enough time has passed for new data, and then only requests the new data and integrates it into cache. Not simply caching http requests. Not quite ready yet but close, so feel free to follow me.
Hi @ValueRaider, I'm searching a cache solution too on YF. Did you release yours ?
Hi @ValueRaider, I'm searching a cache solution too on YF. Did you release yours ?
It's almost ready. Just fixing some type issues (date vs datetime vs pd.Timestamp)
@AnatoleT Actually I also need one significant yfinance
fix to be tested, can you volunteer? Info here: https://github.com/ranaroussi/yfinance/issues/954#issuecomment-1182558587
Hi @ValueRaider, I'm searching a cache solution too on YF. Did you release yours ? It's almost ready. Just fixing some type issues (date vs datetime vs pd.Timestamp)
Awesome, excited to try your new versions. Sure, I'll clone your branch and give you some feedback.