3

I am using client portal web API to get historical stocks and indices price data from IBKR. In the cloud server, I am running Ubuntu 18.04 and java runtime environment has been configured. Java version is higher than the minimum requirement. So I could run the client portal gateway in the server. Its saying that the server is running in https://localhost:5000.

My server ip address is 123.176.98.246 and domain name is momentumdb.pro. So I tried to visit https://123.176.98.246:5000 and https://momentumdb.pro:5000/. But I couldn't get it working.

I also asked questions about any possibility of my approach to IBKR help center and they replied it is possible and some clients are running client portal API in AWS instances.

If you have an experience with IBKR client portal API and running it in cloud server, please help me. Thanks

Chowon
  • 53
  • 1
  • 8

1 Answers1

1

The message from IBKR client portal web API is kind of misleading.

Open https://localhost:5000 to login

The gateway is actually listening on all the interfaces of the host you are running the api gateway.

Assuming you are running linux or MacOS, you can check by running netstat command

>> netstat -na|grep LISTEN|grep 5000
tcp6       0      0 :::5000                 :::*                    LISTEN

That tells it is accepting connections from all the interfaces.

In order for your client to connect to https://momentumdb.pro:5000, you need to make sure the client ip network segment is allowed by the gateway.

Checkout root/conf.yaml:

 ips:
  allow:
    - 192.*
    - X.Y.*
    - 127.0.0.1
  deny:
    - 212.90.324.10

Depends on your client ip, you need to replace above X.Y.* accordingly.

Once you make the change and restart the gateway, it should be able to connect to

https://momentumdb.pro:5000/

Of course, if you have ip firewall on that host, you need to modify your iptables rules to allow such access from client.

btw, the SSL certificate from IBKR client portal gateway is not trusted. You probably don't want to take the risk to expose it directly to the internet due to security reasons.

Hopefully that helps.

Alan Jiang
  • 11
  • 1