hello , i use a simple script as below and my paper account API Key and Api Secret
from alpaca.data.live import StockDataStream
wss_client = StockDataStream(‘my_key’, ‘my_secret’)
async def quote_data_handler(data):
print(data)
wss_client.subscribe_quotes(quote_data_handler, “SPY”)
wss_client.run()
when I start it sometimes it gives me market data quotes but sometimes not.
how can I solve the issue ?