Reading data for a single ticker takes about 20 seconds, how can I make it faster?
I am polling data using the following code
a=yf.Ticker(QQQ)
b=yf.Ticker(^SPX)
c=yf.Ticker(TSLA)
price1=a.info['regularMarketPrice']
price2=b.info['regularMarketPrice']
price3=c.info['regularMarketPrice']
print(price1)
print(price2)
print(price3)
However, to get the 3 prints as needed, I have to wait about a minute...Surely there is a way I can make it faster right? Because in my code I have about 35 tickers and that will take an hour just to get current prices...
Pretty standard time Can be sometimes 3 seconds per ticker Can be sometimes much more
I never get 3 seconds though, it's always more than 10-20 per ticker
Where are you situated geographically?
Where are you situated geographically?
Does it depend on that?
It might be As the yahoo finance website is in the US
With YFrake, you can make up to 2000 requests in 1.5 seconds to all endpoints, depending on the size of the data being returned from the servers.
In recent releases info access should be much faster, 1 second for me.