How to install the penetration security IB GATEWAY under Linux bash

Author: Inventors quantified, Created: 2023-12-04 14:38:31, Updated: 2023-12-12 12:51:56

FMZ supports access to IB penetration securities, windows below is very simple, no more instructions on how to install, Linux general user rental servers have no interface, only SSH, installation is more difficult, here is an article on how to install IB GateWay for quantitative transactions, in general we choose to install IB GATEWAY instead of TWS client, because TWS client will shut down on time, not very suitable for quantitative transactions, here with Debian example:

Step 1: Install the desktop service with VNC

First, you need to install a desktop service with a VNC server to enable remote desktop access. Here we will use xfce and TightVNC as examples. Run the following command in the debian terminal to install:

sudo apt update
sudo apt install xfce4 xfce4-goodies dbus-x11
sudo apt install tightvncserver
tightvncserver

Please note that the password you enter during installation is up to 8 bits long, set it to a high-security password, and start the first session on port 5901 by default.

CentOS can be replaced by:

yum install epel-release -y
yum groupinstall Xfce -y
yum install tigervnc-server -y
vncserver

Step 2: Connect VNC and install IB Gateway

The default address isvnc://IP地址:5901Enter the password to log in, Windows will download and install the VNC client on its own

The download page is:https://www.interactivebrokers.com/en/trading/ibgateway-stable.phpPlease use a widget-like tool to download it. If you can't find the corresponding version, click the Download for Other Operating Systems tab on the page.

wget https://download2.interactivebrokers.com/installers/ibgateway/stable-standalone/ibgateway-stable-standalone-linux-x64.sh

If it is not convenient to download in VNC, an SSH download can be started separately and then installed in the VNC desktop environment.

bash ibgateway-stable-standalone-linux-x64.sh

Here you can see the interface, the manual run can install directories and run them directly../ibgateway

img

Once installed, log in to find the API options, tick the Read-Only API tab, the port number is also in the settings, and click on the port number here to configure the exchange correctly

img

Note that when adding FMZ configuration localhost with 127.0.0.1 in the Linux operating system lower layer is not a network address, where localhost is used.

IB markets require a paid subscription, if you need real-time ticker and depth information, please pay to subscribe, otherwise you will only receive delayed markets.

Set up

Cancel the confirmation of the order of the API, you need to uncheck the confirmation box

img

To avoid IB Gateway exit, you need to select the "Auto restart" button in "Configuration"-> "Lock and Exit" button (default is "Auto logoff is not what we need)

img

If the self-winding lock screen is not working, you can installxscreensaver to solve it. (For security, please exit the lock screen after running)

apt install xscreensaver

Run after installationxscreensaverSet up and run the lock screen

Be careful.


More