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

Trading TWS session is connected from a different IP address #1

Closed
jordics opened this issue Aug 12, 2021 · 7 comments
Closed

Trading TWS session is connected from a different IP address #1

jordics opened this issue Aug 12, 2021 · 7 comments

Comments

@jordics
Copy link

jordics commented Aug 12, 2021

Hi!

I wanted to try this library but when I try the sample code I just receive this error:

{'error': 'Trading TWS session is connected from a different IP address'}

Any idea about if this is a bug or theres something wrong?

@utilmon
Copy link
Owner

utilmon commented Aug 12, 2021

Hello,
This wrapper uses Client Portal Web API, not TWS API.
I am guessing this is the reason?
You can check out https://github.com/Voyz/ibeam for connecting to CPW API.
Part Time Larry (https://www.youtube.com/watch?v=O1OhiiCx6Ho&t=1s) also has a youtube tutorial on ibeam if you are interested in.

@jordics
Copy link
Author

jordics commented Aug 12, 2021

No, this is weird in fact (I assumed was a but from IB). I'm using the Client Portal Gateway... but I get this error. I don't have even installed the TWS

@utilmon
Copy link
Owner

utilmon commented Aug 12, 2021

Hmm, that's interesting.
What do you get when you type the following command in the shell terminal?
curl -X GET "https://localhost:5000/v1/api/one/user" -k

Another guess is that your account is connected to TWS session from a different computer.

@jordics
Copy link
Author

jordics commented Aug 12, 2021

I found the reason: I was authenticated using the paper account. No idea why it says "TWS session" because I have never used it, it must be a minor issue in their API. Thanks! Good work!

@jordics jordics closed this as completed Aug 12, 2021
@utilmon
Copy link
Owner

utilmon commented Aug 12, 2021

Cool, thanks. Just want to note that paper account should work fine as well, but maybe you need to initialize it first from your main account.

@utilmon
Copy link
Owner

utilmon commented Oct 30, 2021

Just for anyone having this error, I experienced this error when my account was logged in my web browser at the same time.

@inagib21
Copy link

Hey im getting this same error, but im not logged in the browser at the same time.

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

3 participants