在云服务器中运行Interactive Brokers客户端门户API [英] Running interactive brokers client portal API in cloud server

查看:147
本文介绍了在云服务器中运行Interactive Brokers客户端门户API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用客户端门户Web API从IBKR获取历史股票和指数价格数据.在云服务器中,我正在运行Ubuntu 18.04,并且已经配置了Java运行时环境.Java版本高于最低要求.因此,我可以在服务器中运行客户端门户网站网关.俗话说服务器正在 https://localhost:5000 中运行.

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.

我的服务器ip地址是123.176.98.246,域名是动量数据库.因此,我尝试访问 https://123.176.98.246: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.

我还询问了有关使用IBKR帮助中心的可能性的问题,他们回答说有可能,并且某些客户端正在AWS实例中运行客户端门户API.

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.

如果您有使用IBKR客户端门户API并在云服务器中运行它的经验,请帮助我.谢谢

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

推荐答案

来自IBKR客户端门户Web API的消息具有误导性.

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

Open https://localhost:5000 to login

该网关实际上正在侦听您正在运行api网关的主机的所有接口上.

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

假设您正在运行linux或MacOS,则可以通过运行netstat命令进行检查

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.

为了使您的客户端连接到 https://momentumdb.pro:5000 ,确保网关允许客户端IP网段.

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.

检出root/conf.yaml:

Checkout root/conf.yaml:

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

根据您的客户端IP,您需要相应地替换X.Y. *以上.

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/

当然,如果该主机上具有IP防火墙,则需要修改iptables规则以允许来自客户端的此类访问.

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

btw,来自IBKR客户端门户网关的SSL证书不受信任.出于安全原因,您可能不想冒险直接将其公开到Internet.

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.

希望这会有所帮助.

这篇关于在云服务器中运行Interactive Brokers客户端门户API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆