Have a python pre market screening application and when we start the application and and prompt for the quote stream to start, the data feed does not start. Below is the code.
from alpaca.data.live import StockDataStream
wss_client = StockDataStream(‘PKKEOT3JO7QUNM86UBMB’, ‘GNOyg5R0z7Yr33G7rN3qkU3T0HrmMYAkgl4RqTvO’)
async handler
async def quote_data_handler(data):
quote data will arrive here
print(data)
wss_client.subscribe_quotes(quote_data_handler, “SPY”)
wss_client.run()
What are we doing wrong?