Since the update when running the following Python script the software keeps disconnecting and attempting to reconnect in a continuous loop. - ProgramOrdersOnly.py The last version of this worked pretty well, but not so much now. If anyone has any ideas at all, I'd really appreciate any and all suggestions.
I'd double check the API port and the allowed hosts settings. Perhaps they got reset to defaults and are disallowing connections from your script's IP or the port is different from before. File -> Global Configuration -> API -> Settings Specifically "Socket Port", "Trusted IPs", and "Allow connections from localhost only", but really double check everything on that page. Is it establishing the connection successfully and then disconnecting or outright refusing to establish?
It's connecting successfully and then disconnecting more or less immediately and then putting up a countdown of however many seconds and attempting to try again, but seems to get stuck in a loop doing this.
The TWS API does provide a number of samples of Python scripts and this is one of them. If you install the TWS API the files (and the one mentioned above) would be found in the following location: - C:\TWS API\samples\Python\Testbed\
You might want close out, "clear the decks", and reload. Apparently, they rolled back the ("Steady") 963.3o this morning -- the roll-out of 972.1m appears to have been very miss-timed, or misqueued, or something. Lots of posts sprinkled around. But my re-load this morning was back to 963.3o. BEST WISHES!
That's TWS, mostly irrelevant when it comes to the API which is version 973.07. He might also be using Gateway.
"Mostly" you're right, but there is so much chatter around the web, and I personally have never seen a version *rescinded* like this, that it's pretty relevant at this point. Even TWS vis TWS_API vis IB Gateway. Somebody screwed up biggly in letting something out before it was vetted, and if it's that deep in the stack, we all need to "clean up."