Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to TWS/ IB Gateway on GCP #52

Closed
MarioMZhang opened this issue Sep 17, 2023 · 5 comments
Closed

Cannot connect to TWS/ IB Gateway on GCP #52

MarioMZhang opened this issue Sep 17, 2023 · 5 comments

Comments

@MarioMZhang
Copy link

Hi there,

I'm working on google cloud and got this error when connecting
image
image
I had the global configuration set on localhost:6080
image

from the docker's log, i feel like I can connect to the API port
image
there is no connection refused log as in #16

Could anyone help? Thanks in advance!

@extrange
Copy link
Owner

Have you forwarded the ports in docker-compose.yml?

@MarioMZhang
Copy link
Author

MarioMZhang commented Sep 17, 2023

Have you forwarded the ports in docker-compose.yml?

Thanks for the reply!
do you mean forwarding port 4002 or 7497? do we have a pointer to forward ports?
And I had put 127.0.0.1 into trusted IP in the setting
here is my compose.yml
image

@MarioMZhang
Copy link
Author

Have you forwarded the ports in docker-compose.yml?

are we supposed to use app.connect('127.0.0.1',8888,xxx). I feel like I misunderstood the readme

@MarioMZhang
Copy link
Author

Hi @extrange ,
after changing the port to 8888, I was able to connect, but not sure if it's the right way to do so. if so, how do I know if I'm on live or paper mode? Thanks!

@extrange
Copy link
Owner

That's correct, port 8888 is where the TWS API is being exposed.

You can set the mode with the variable IBC_TradingMode (default live).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants