开云体育

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Paper trading account Warning popup not closing

 

Dear Richard,
Appreciate the work and installation guide, that helped me connected ibgateway through IBC 3.15.2
Now, I tried to test the setup with following command -
$ DISPLAY=:0 /opt/ibc/gatewaystart.sh

Through vnc, I could see it logged in perfectly to my paper account. However, the paper trading warning dialog kept opened till I closed manually.
Is that normal? I believed it would also be closed automatically by IBC.

Please let me know if I am missing something.

Regards,
Souvik


Re: Just installed IBC 3.15.2

 

开云体育

Why did you try to open the jar or version files?

?

Read the User Guide. It tells you exactly what to do.

?

Yes, it is secure: you have exactly the same login as using TWS or Gateway directly, including 2FA via the IBKR Mobile app.

?

And no, your account can’t be hacked. Of course you need to make sure you don’t leave your phone unlocked in a place where someone else can access it while logon is under way.

?

There is absolutely no reason to do any coding, or know anything at all about coding, to use IBC.

?

Richard

?

?

From: [email protected] <[email protected]> On Behalf Of evewang777@...
Sent: 16 January 2023 20:00
To: [email protected]
Subject: [ibc] Just installed IBC 3.15.2

?

I tried to open jar or version file, it asked me how I want to use them??

It's the first time I installed this, can someone help me?

Also, is this secure? Is it possible by installing this, my account can be hacked?

Sorry, coding is not my strong suit.?


Just installed IBC 3.15.2

 

I tried to open jar or version file, it asked me how I want to use them??

It's the first time I installed this, can someone help me?

Also, is this secure? Is it possible by installing this, my account can be hacked?

Sorry, coding is not my strong suit.?


Re: Duplicate TWS on restarts

 

I re-installed TWS and that seems to have fixed the issue. I am not really sure what broke. But I am good


Duplicate TWS on restarts

 

I am having trouble with restarts. Whenever TWS restarts, there are two TWS applications that launch. One of them launches properly and other hangs waiting for the 2FA. IBC seems to be controlling the TWS that doesnt not properly restart. I tried using 3.15.2 as well as 3.16 beta. I using TWS 1020.


Re: handle restarts

 

There may be a better way, but I use an autoHotKeys script to check if the IB Gateway window is open and run the script to launch IB Gateway if it’s not there.

It has performed well this way for over a year.



On Fri, Dec 16, 2022 at 11:07 AM <nkulki@...> wrote:
What I am hoping to do is to create a script that will run say every 5 minutes. It will check if TWS is running. If its running then it should just quit if its not running then it will launch TWS. ANy clue on how to detect if TWS is currently running. I am on windows and the task manager just shows as Java. There is no way to tell its TWS or some other java application.


Re: AutoRestart File INFO LOG

 

Thanks Richard.

Yes, as you state ib_insync does call the StartIBC.bat directly (from what I can see).

I was unsure where I needed to go to suppress the message, but figured IBC was the best starting point since that is where the message originated.? It is not essential no, but it does add clutter to logs where I only want to see things that are deemed relevant.

I shall investigate a little further to see if I can tweak anything, otherwise I shall look out for its disappearance in any future updates!

So, no need to stress, but something to add to the wish list over christmas I guess.? Thanks for the great resource and have a good break!


Re: AutoRestart File INFO LOG

 

开云体育

Ah, this is becoming clearer now. I misunderstood what you wrote initially: I took it to mean that all these lines are appearing on the console:

?

Finding autorestart file

INFO: Could not find files for the given pattern(s).

autorestart file not found

?

but actually you just mean the middle line – re-reading it now I see you stated quite clearly what you meant, so apologies that I misunderstood.

?

The reason for the difference is that the first and last of these lines are simply the result of echo statements, whereas the middle one is an error message produced by the ‘where’ command when trying to locate the autorestart file: presumably it’s written to the STDERR stream.

?

Now my DisplayBannerAndLaunch.bat script redirects STDERR to STDOUT, and STDOUT is redirected to the logfile. But if ib_insync doesn’t use DisplayBannerAndLaunch.bat, and just calls the low-level StartIBC.bat directly, then perhaps STDERR is not being redirected in this way, so it ends up elsewhere.

?

So I guess this is not really a question for me: you’ll need to check what ib_insync does.

?

On the other hand, I may be able to discard this error message altogether since it doesn’t really add anything of value, but initial attempts at this have failed (normally one would redirect STDERR for the command to NUL with 2>NUL, but this doesn’t work because the ‘where’ command is within nested FOR ?statements, and it gives a syntax error. But I’ll fiddle a bit more to see if I can bend it to my will. At the end of the day, though, does this actually really matter at all?

?

Richard

?

?

From: [email protected] <[email protected]> On Behalf Of agftrading@...
Sent: 22 December 2022 14:41
To: [email protected]
Subject: Re: [ibc] AutoRestart File INFO LOG

?

Hi Richard,

Not that console window.? I run the launch as part of another script that logs to the terminal.? So in the terminal window, not the specific window that you reference above.? There is some independent logging that I am doing there.? I can control those logs fine.? It does use ib_insync to reference the ibc launch.? Underneath the hood there is its (ib_insync's) own logger, I can control what that logs to the terminal also.? The strange thing is no matter how much I control the other logs (to confirm that they are not logging anything to that terminal window) this specific line from the ibc launch always gets printed to the terminal.? That is what is confusing at the moment.? I attach a screenshot (not sure how helpful that is, but should illustrate clearly what I mean).



Thanks


Re: AutoRestart File INFO LOG

 

Hi Richard,

Not that console window.? I run the launch as part of another script that logs to the terminal.? So in the terminal window, not the specific window that you reference above.? There is some independent logging that I am doing there.? I can control those logs fine.? It does use ib_insync to reference the ibc launch.? Underneath the hood there is its (ib_insync's) own logger, I can control what that logs to the terminal also.? The strange thing is no matter how much I control the other logs (to confirm that they are not logging anything to that terminal window) this specific line from the ibc launch always gets printed to the terminal.? That is what is confusing at the moment.? I attach a screenshot (not sure how helpful that is, but should illustrate clearly what I mean).



Thanks


Re: C#

 

开云体育

I don’t know what you mean.

?

Please explain.

?

I’ll be out for the rest of the day, but will respond when I can.

?

From: [email protected] <[email protected]> On Behalf Of barone via groups.io
Sent: 22 December 2022 10:04
To: [email protected]
Subject: [ibc] C#

?

If I am running my app with IB C# API, can I still run IBCalpha in Python for automated restart? thanks b.


C#

 

If I am running my app with IB C# API, can I still run IBCalpha in Python for automated restart? thanks b.


Re: AutoRestart File INFO LOG

 

开云体育

Well, that didn’t throw any light on it. I really can’t see why just those three lines should appear on the console.

?

I presume by ‘console’ you mean the banner window? And when you say ‘no others show’, ?presumably you mean the usual stuff shows, like this:

?

+==============================================================================

+

+ IBC version 3.16.0-beta.1

+

+ Running TWS 1020 at 21/12/2022 18:20:00.76

+

+ Diagnostic information is logged in:

+

+ C:\IBC-Paper\.\Logs\IBC-3.16.0-beta.1_TWS-1020_WEDNESDAY.txt

+

+

+ ** Caution: closing this window will close TWS 1020 **

+

?

But you get these three extra lines at the end?

?

If you mean something else, please send a screenshot if you can capture one.

?

The only other thing that might be of interest is the value of the LOG_PATH setting in StartTWS.bat.

?


Re: Restart TWS without IBC to keep session

 

开云体育

I didn’t manage to get as far as I hoped yesterday – it was all working fine for TWS, but not yet for Gateway.

?

As I’m not sure when I’ll be able to finish the Gateway work, I decided to issue a beta version so that TWS users can test the new RESTART command (if you try it on Gateway, the command will be accepted but nothing happens, it just keeps running).

?

So this is IBC 3.16.0-beta.1:

?

?

You’ll need to extract the IBC.jars and version files, overwriting your existing ones.

?

If you’re running on Windows, you’ll also need to extract the new SendCommand.bat script, and the SendIBCCommand.vbs file from the /Scripts subfolder. You’ll probably need to Unblock all these files. You’ll need to read the comments in SendCommand.bat and make any necessary changes. SendIBCCommand.vbs should not be altered. When you run this script, you must supply the relevant command as the first argument, for example:

?

SendCommand RESTART

?

or

?

SendCommand STOP

?

On Linux, run the telnet session in the usual way and use the command RESTART (I can never remember how to script telnet on Linux, and I don’t want to waste time looking it up now, but I’m sure you lot know what to do).

?

?

?

From: [email protected] <[email protected]> On Behalf Of Richard L King
Sent: 20 December 2022 13:17
To: [email protected]
Subject: Re: [ibc] Restart TWS without IBC to keep session

?

Shrivelled walnut, more like. And decreasing with every passing day…

?

I have actually just done the code for this, need to test – but lunch first! Maybe issue a beta version later today (probably won’t be tested on Linux because everything here runs on Windows during the day, but in practise this sort of thing tends to work equally well on both with no trouble).

?


Re: AutoRestart File INFO LOG

 

Here you go Richard.? Thanks.


Re: Restart TWS without IBC to keep session

 

开云体育

Shrivelled walnut, more like. And decreasing with every passing day…

?

I have actually just done the code for this, need to test – but lunch first! Maybe issue a beta version later today (probably won’t be tested on Linux because everything here runs on Windows during the day, but in practise this sort of thing tends to work equally well on both with no trouble).

?

?

?

From: [email protected] <[email protected]> On Behalf Of Mark Murari
Sent: 20 December 2022 11:40
To: [email protected]
Subject: Re: [ibc] Restart TWS without IBC to keep session

?

That’s very clever, perhaps you do have the brain the size of a planet Richard.?



On 20 Dec 2022, at 12:26, Richard L King <rlking@...> wrote:

?

That’s correct.

?

Having said that, it occurs to me that until IB provide the Restart menu entry in Gateway, it would be possible for IBC’s proposed RESTART command to force a Gateway restart by explicitly changing the Auto-restart time to something in the near future: Gateway would then do a normal restart when that time arrived, and IBC would do the necessary. Because doing this would persist that new auto-restart time in the Gateway settings, It would be necessary for config.ini to contain the AutoRestartTime setting to reconfigure it back to the desired ‘normal’ time.

?

I don’t know how close to current time you can set the Auto-restart time such that Gateway will act on it, but I can find out via experimentation. But it may be necessary to incur a delay of say 30 seconds when using this approach.

?

Regarding life, Marvin the paranoid android would agree with you, but I’m not sure working on IBC would have alleviated the pain in all the diodes down his left side…

?

?

?

From: [email protected] <[email protected]> On Behalf Of t1user
Sent: 20 December 2022 10:47
To: [email protected]
Subject: Re: [ibc] Restart TWS without IBC to keep session

?

Sorry, missed this part, my bad, will read more carefully in the future.

So, basically at the moment there is no way to restart Gateway without triggering 2FA (apart from automatic daily restarts)?

This life thing is overrated. There's no reason to prioritise it over work on IBC.


Re: Restart TWS without IBC to keep session

 

开云体育

That’s very clever, perhaps you do have the brain the size of a planet Richard.?


On 20 Dec 2022, at 12:26, Richard L King <rlking@...> wrote:

?

That’s correct.

?

Having said that, it occurs to me that until IB provide the Restart menu entry in Gateway, it would be possible for IBC’s proposed RESTART command to force a Gateway restart by explicitly changing the Auto-restart time to something in the near future: Gateway would then do a normal restart when that time arrived, and IBC would do the necessary. Because doing this would persist that new auto-restart time in the Gateway settings, It would be necessary for config.ini to contain the AutoRestartTime setting to reconfigure it back to the desired ‘normal’ time.

?

I don’t know how close to current time you can set the Auto-restart time such that Gateway will act on it, but I can find out via experimentation. But it may be necessary to incur a delay of say 30 seconds when using this approach.

?

Regarding life, Marvin the paranoid android would agree with you, but I’m not sure working on IBC would have alleviated the pain in all the diodes down his left side…

?

?

?

From: [email protected] <[email protected]> On Behalf Of t1user
Sent: 20 December 2022 10:47
To: [email protected]
Subject: Re: [ibc] Restart TWS without IBC to keep session

?

Sorry, missed this part, my bad, will read more carefully in the future.

So, basically at the moment there is no way to restart Gateway without triggering 2FA (apart from automatic daily restarts)?

This life thing is overrated. There's no reason to prioritise it over work on IBC.


Re: Restart TWS without IBC to keep session

 

开云体育

That’s correct.

?

Having said that, it occurs to me that until IB provide the Restart menu entry in Gateway, it would be possible for IBC’s proposed RESTART command to force a Gateway restart by explicitly changing the Auto-restart time to something in the near future: Gateway would then do a normal restart when that time arrived, and IBC would do the necessary. Because doing this would persist that new auto-restart time in the Gateway settings, It would be necessary for config.ini to contain the AutoRestartTime setting to reconfigure it back to the desired ‘normal’ time.

?

I don’t know how close to current time you can set the Auto-restart time such that Gateway will act on it, but I can find out via experimentation. But it may be necessary to incur a delay of say 30 seconds when using this approach.

?

Regarding life, Marvin the paranoid android would agree with you, but I’m not sure working on IBC would have alleviated the pain in all the diodes down his left side…

?

?

?

From: [email protected] <[email protected]> On Behalf Of t1user
Sent: 20 December 2022 10:47
To: [email protected]
Subject: Re: [ibc] Restart TWS without IBC to keep session

?

Sorry, missed this part, my bad, will read more carefully in the future.

So, basically at the moment there is no way to restart Gateway without triggering 2FA (apart from automatic daily restarts)?

This life thing is overrated. There's no reason to prioritise it over work on IBC.


Re: Restart TWS without IBC to keep session

 

Sorry, missed this part, my bad, will read more carefully in the future.

So, basically at the moment there is no way to restart Gateway without triggering 2FA (apart from automatic daily restarts)?

This life thing is overrated. There's no reason to prioritise it over work on IBC.


Re: Restart TWS without IBC to keep session

 

开云体育

When I wrote:

?

‘Note that this restart menu item isn't available for Gateway, but maybe IB will provide it in a future version.’

?

what did you think I meant?

?

I will do this command when I get some time to do it. Strange to say, I do actually have a life outside of working on IBC…

?

?

?

From: [email protected] <[email protected]> On Behalf Of t1user
Sent: 20 December 2022 09:15
To: [email protected]
Subject: Re: [ibc] Restart TWS without IBC to keep session

?

+1 on the restart request

The whole point of using IBC is to make the setup run fully automatically, manually restarting tws/gateway is not an option

@Richard: I presume what you said about TWS is also true about Gateway, correct?


Re: Restart TWS without IBC to keep session

 

+1 on the restart request

The whole point of using IBC is to make the setup run fully automatically, manually restarting tws/gateway is not an option

@Richard: I presume what you said about TWS is also true about Gateway, correct?