Every evening I get error 2103 Market data connection is broken
I then receive 2108 market data farm connection is inactive but should be available upon demand.cashfarm
-followed by 2104 Market data connection OK problem is that it hangs my python code and I have to manually restart the program. Is there a way to avoid having to do this every night? This happens regardless of using TWS or IBgateway.
thank you for any help
Update
def error(self, reqId:TickerId, errorCode:int, errorString:str):
print("Error: ", reqId, "", errorCode, "", errorString)
So something like if statement referencing the errorCode variable to restart the script or sleep for 5 min then restart?