Connecting to Interactive Brokers¶
AlgoEye can connect to an instance of TWS or IBGateway running on your PC or anywhere in the Net. In order to establish a connection you will need to to:
- Run TWS or IBGateway.
- Allow API connections.
- Set up port number and add AlgoEye server to trusted IP addresses.
- Set up your firewall to allow incoming connection to the port if needed.
Configuring TWS to work with AlgoEye¶
Run TWS as usually specifying the username/account you want to trade with.
After logging into TWS click Edit then Global Configuration.... Make sure Enable ActiveX and Socket Clients is ticked otherwise the interface for third-party applications is turned off and AlgoEye won’t be able to connect to your TWS. Change Socket Port number if necessary and add the server IP shown on the AlgoEye Trader page (https://algoeye.com/trader) to the list of Trusted IP Addresses.
Running IBGateway On Your PC¶
Please read carefully the official Interactive Brokers instructions on setting up IBGateway before proceeding.
After installing and running the gateway you will see the login screen.
If you don’t already have FIX connection or don’t know what it is then select IB API - the native Interactive Brokers interface for third-party applications. Type in your username and password then click Login. You will see the main screen with a green bar if the gateway connected to Interactive Brokers servers successfully.
The last step is to set up port number and add AlgoEye server to the list of trusted IP addresses. Click Configure and then Settings to bring up configuration screen. Change Socket Port number if necessary and add the server IP shown on the AlgoEye Trader page (https://algoeye.com/trader) to the list of Trusted IP Addresses.
Running IBGateway On a Headless Linux Server¶
# install Monit sudo apt-get install monit wget https://download2.interactivebrokers.com/download/unixmacosx_latest.jar echo "Done"