¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: TWS vs Gateway at reconnections


Amine
 

Hi Despair

My answer is not the smartest and could help. I use TWS and its data disconnected due to internet disconnection, then it it was restored once internet was restablish,
I run TWS API (python) in a loop:

app = IBapi()
app.connect('127.0.0.1', port=port, clientId=clientId)
print("serverVersion:%s connectionTime:%s" % (app.serverVersion(),
app.twsConnectionTime()))

def run_loop():
app.run()

api_thread = threading.Thread(target=run_loop, daemon=True)
api_thread.start()

Join [email protected] to automatically receive all group messages.