Data has stopped updating in websocket for SENSEX and its option chain since 11:37:04 AM
@Pradeep_Jaiswar @Ketan please help check
Data has stopped updating in websocket for SENSEX and its option chain since 11:37:04 AM
@Pradeep_Jaiswar @Ketan please help check
I had to restart the algorithm for the websocket to start working, I have implemented auto connect as well, could you tell how to avoid this? if websocket stops working what can be done?
The SDK includes streamer functions with built-in reconnect functionality. You can enable this feature by specifying the number of retries and the interval between them using the auto_reconnect(enable, interval, retryCount)
function. You can consider using them for your code.
Please refer following links for more information
Thank you
I have the following implemented in my main() function:
process_thread = Thread(target=processThread)
streamer = upstox_client.MarketDataStreamer(
upstox_client.ApiClient(configuration), instrument_keys, "full")
streamer.on("message", on_message)
# Modify auto-reconnect parameters: enable it, set interval to 10 seconds, and retry count to 3
streamer.auto_reconnect(True, 20, 3)
streamer.connect()
it already had auto_reconnect, is it missing something?