Re: How to connect to TWS from server side
That sounds compatible with the latest from IBKR where they say a new login is needed weekly. Is your middleware a python script looping and doing the REST commands, or something more heavy? I'll look
By
John Griessen
·
#48300
·
|
Re: What does the fields in Portfolio section for options mean in TWS?
I remember a while back that TWS showed different P&L on different windows, and sometimes used the previous close as the basis instead of the most recent price. I don't know what they do these days
By
Nick <news1000@...>
·
#48299
·
|
What does the fields in Portfolio section for options mean in TWS?
Hi folks, I am fairly new to options trading and learning the ropes using the paper account. I bought a spread for FB: BUY 2 CALL@350, SELL 2 CALL@360 to be sold on Oct'15 2021. The account window
By
shankholove@...
·
#48298
·
|
Re: How to connect to TWS from server side
The restart kind of happens automatically for me. The "middleware app" (the REST service) runs on the same container and if looses connection to IB Gateway, it will re-try to connect 5x and than
By
Matthias Frener <matthias.frener@...>
·
#48297
·
|
Re: Wednesday night TWS restart not clean - stuck in "Initializing managers..." and purple grids
The time and duration of TWS restarts is somewhat of a moving target. What has worked for me is to do the TWS restart when the US markets are closed at 5:15pm Eastern. TWS seems able to reconnect
By
Nick <news1000@...>
·
#48296
·
|
Re: How to connect to TWS from server side
How do you deal with these changes by IBKR? Daily restart? https://github.com/IbcAlpha/IBC/blob/master/userguide.md " in Gateway 975 IBKR have introduced the same autologoff functionality as TWS: ie
By
John Griessen
·
#48295
·
|
LastUndPrice Broken?
Hi, I'm new to TWSAPI so not sure if I'm just being stupid. However, I'm trying to call the stock price of an options contract using LastUndPrice in EXCEL with the RTD function, but what is returned
By
peterhartmann10@...
·
#48294
·
|
Wednesday night TWS restart not clean - stuck in "Initializing managers..." and purple grids
Hello everyone, I am in pacific timezone. I do my daily TWS restart at 9:50 pm so its after the daily resets. I have noticed now with fair regularity that my restarts on Wed night will not complete -
By
rajeshh
·
#48293
·
|
Re: How to connect to TWS from server side
I use docker for automating IB Gateway startup and login. https://github.com/waytrade/ib-gateway-docker It's an image with IB Gateway, IBC and Xvfb. Will read username and password from env-vars and
By
Matthias Frener <matthias.frener@...>
·
#48292
·
|
Re: How to connect to TWS from server side
The idea is to make everything totally transparent so that no application is aware of the fact that TWS (and other services) are not actually running locally. They can request services at any point in
By
J¨¹rgen Reinold
·
#48291
·
|
Re: How to connect to TWS from server side
Thanks for the detailed response, makes a lot of sense to me Just curious on one small thing: I could see automatically tunneling to the server for troubleshooting but why do you connect to the TWS
By
hieuimba@...
·
#48290
·
|
Re: How to connect to TWS from server side
There are two different things - the TWS restart and the TWS login. The TWS restart is daily so your API program will be disconnected from the socket and will have to re-connect after TWS restarts.
By
Nick <news1000@...>
·
#48289
·
|
Re: How to connect to TWS from server side
Let's look at your the last comment first. It would be most convenient for you to run TWS (or IB/Gateway) on the database server. Many here on the forum run TWS or IB/Gateway on a server in a more
By
J¨¹rgen Reinold
·
#48288
·
|
Re: How to connect to TWS from server side
I read just the other week in the terms that weekly is the timing of re-logins required by IB gateway and TWS. Also in the terms is that they expect a GUI login is not automated, but in person.
By
John Griessen
·
#48287
·
|
Re: How to connect to TWS from server side
Your program is going to have to deal with outages no matter what. You have money on the line so you have to have a plan for every possible situation (even if the plan is just for the program to
By
Nick <news1000@...>
·
#48286
·
|
Re: How to connect to TWS from server side
Could you elaborate here, in the reverse SSH tunnel, the final traffic would be directed to port 22 of the machine that initiates ssh -R In command form that would be: ssh -R 50000:localhost:22
By
hieuimba@...
·
#48285
·
|
Re: How to connect to TWS from server side
We'd need to know a little more about your specific setup, but you are generally on the right track with SSH. Especially for cases where untrusted networks exist between the two systems. If the two
By
J¨¹rgen Reinold
·
#48284
·
|
Re: How to connect to TWS from server side
OK. IB gateway has a GUI login also. How do you run that on a server with its 99.99% uptime? I'd like to, but have not figured out or asked IBKR support. Their docs suggest not what they want. If
By
John Griessen
·
#48283
·
|
Re: How to connect to TWS from server side
@John That's a good point, I definitely would just use a headless IBgateway server if possible, but I plan to connect to TWS too because I might want to adjust orders manually Here's the setup that
By
hieuimba@...
·
#48282
·
|
Re: How to connect to TWS from server side
Not sure. So far in my reading about TWS API on the ibkr site, They want the TWS program on port xxxx or IB gateway on 4001 to be the authenticated connection. They WANT the GUI authentication, so
By
John Griessen
·
#48281
·
|