I am testing an algorithm that compares all stocks with one another and picks the best one for trade. In the algorithm I compare all the stocks with each other. For this I need list of all the symbols, LTP and current volume. I am using NodeJS. Is it possible to do this, or what is the closest I can get to full fill this requirement ?
Im using python but I grab all stocks like:
stockUniverse = self.alpaca.list_assets(status=‘active’,asset_class=None)
for stock in stockUniverse:
if stock.exchange==‘NASDAQ’ and stock.tradable==True:
then I check volume in a loop like:
for stocks in self.allStocks:
stocks = self.alpaca.get_bars(stocks, TimeFrame.Day,