We are trying to connect to a gateway that we are running on QuantRocket enviroment, but from another different machine.
So we added our IP to ‘Trusted IPs’ list and unchecked “Allow connections from localhost only” cell.
To connect to the gateway, we use a code similar to the following:
from ib.ext.EClientSocket import EClientSocket
connection = EClientSocket(self._wrapper)
connection.eConnect(‘xxx.xxx.xxx.xxx’, 4002, 0)
But we get a 504 error:
Couldn’t connect to TWS. Confirm that “Enable ActiveX and Socket Clients” is enabled on the TWS “Configure->API” menu
Is this possible to do with QuantRocket? Are we missing any configuration?