quantconnect / ibautomater Goto Github PK
View Code? Open in Web Editor NEWAutomates IB Gateway start, stopping and restarting.
Home Page: https://www.lean.io
License: Apache License 2.0
Automates IB Gateway start, stopping and restarting.
Home Page: https://www.lean.io
License: Apache License 2.0
Should it test if installed and/if not prompt the user via a distribution specific method? What about also supporting Xorg dummy devices instead? Perhaps support for Wayland?
A hello-world demonstration is needed for an application which might be connecting and using the IBAutomater.
demo.exe
After version 974 of IB Gateway, IB re-introduced the automatic logoff every day thing that has plagued IB automation with TWS for ages.. now in IB Gateway latest (976 at this time) - It would be great if IBAutomater could support logging in again when this popup appears.
I am able to log in manually to IBGateway 978.
When I run the demo app, IBGateway pops up but I get an "invalid twsInfo" pop-up dialog in IBGateway. Prior to the pop-up, the IBGateway progress bar seems to make it about halfway. I get the following output to console from IBAutomator:
2020-03-21T20:30:43.0697435Z IBAutomater process started - Id:4564
2020-03-21T20:30:43.2187452Z StartIBGateway(): starting IBGateway
2020-03-21T20:30:43.4786111Z WARNING: An illegal reflective access operation has occurred
2020-03-21T20:30:43.4786111Z WARNING: Illegal reflective access by twslaunch.security.c (file:/C:/Jts/ibgateway/978/jars/twslaunch-978.jar) to field sun.awt.Win32GraphicsDevice.pfDisabled
2020-03-21T20:30:43.4796077Z WARNING: Please consider reporting this to the maintainers of twslaunch.security.c
2020-03-21T20:30:43.4796077Z WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
2020-03-21T20:30:43.4796077Z WARNING: All illegal access operations will be denied in a future release
2020-03-21T20:30:44.5102290Z StartIBGateway(): IBGateway started
2020-03-21T20:30:45.2387904Z Window event: [WINDOW_ACTIVATED] - Window title: [IB Gateway]
2020-03-21T20:30:45.2407906Z Window event: [WINDOW_OPENED] - Window title: [IB Gateway]
2020-03-21T20:30:45.2407906Z Trading mode: paper
2020-03-21T20:30:45.2417912Z Click button: [Paper Log In]
2020-03-21T20:30:45.6268515Z Window event: [WINDOW_DEACTIVATED] - Window title: [IB Gateway]
2020-03-21T20:30:45.6298502Z Window event: [WINDOW_ACTIVATED] - Window title: [Loading...]
2020-03-21T20:30:45.6308522Z Window event: [WINDOW_OPENED] - Window title: [Loading...]
2020-03-21T20:30:45.7268551Z Window event: [WINDOW_DEACTIVATED] - Window title: [Loading...]
2020-03-21T20:30:45.7268551Z Window event: [WINDOW_ACTIVATED] - Window title: [Authenticating (trying for another 19 seconds)...]
2020-03-21T20:30:45.7358517Z Window event: [WINDOW_OPENED] - Window title: [Authenticating (trying for another 19 seconds)...]
2020-03-21T20:30:46.1977042Z Window event: [WINDOW_DEACTIVATED] - Window title: [Requesting startup parameters...]
2020-03-21T20:30:46.1977042Z Window event: [WINDOW_ACTIVATED] - Window title: [null]
2020-03-21T20:30:46.2007044Z Window event: [WINDOW_OPENED] - Window title: [null]
2020-03-21T20:30:46.2007044Z Error: IB API toggle button not found
2020-03-21T20:30:50.2109384Z Window event: [WINDOW_DEACTIVATED] - Window title: [null]
2020-03-21T20:30:53.5881646Z Window event: [WINDOW_ACTIVATED] - Window title: [null]
Most likely for myself and I would assume many others, they already have an IB API process running and don't need a new one started and logged into. Can IBAutomater detect, based on a port given, the directory provided and/or a process check. If there is one running, then connect to that one and don't start new.
The check could be done in Lean but as this is an automation tool I would assume the decision could be handled in here.
IBAutomater is point to TWS 974 and we might need to upgrade to TWS 978 because of CBOE ONE datafeed (see TWS 978 Release).
I have sent an email to Interactive Brokers asking whether this change is required since we use the latest IB Gateway version (10.19).
Hi,
I am running into the issue that it seems the automator cannot locate the switch for trading mode. The log is shown as following. Does anyone have similar experience before?
Thanks,
R
StartIBGateway(): starting IBGateway
StartIBGateway(): IBGateway started
Window event: [WINDOW_ACTIVATED] - Window title: [IB Gateway]
Window event: [WINDOW_OPENED] - Window title: [IB Gateway]
Error: java.lang.Exception: Trading Mode toggle button not found
Hi guys,
Yesterday I have tested the changes in the IBAutomater after you merged #18 I see the issues that prevent me from running IBGateway with IBAutomater - gateway restarts. The gateway application goes down on the scheduled logoff/restart time even despite IBAutomater trying to change the restart time in the dialog.
Platform: Win 2012 (x64)
Steps to repro:
Any ideas on how to fix this?
Wondering if it is possible to download prev versions of IB Gateway as a temporary solution for now?
Best regards,
Pavel
IBAutomater is set to try to connect to IB Gateway as early as Sunday 2 AM EST: IBAutomater.cs#L769
Some users are not awake by that time and will miss the 2FA request.
This restart could be configurable to attend to the user's timezone.
Example:
IBAutomater.bat C:\Jts 978 xxxx yyyyy paper 4002 c:\program files\common files\i4j_jres\1.8.0_152-tzdata2019c
this will fail with:
The system cannot find the path specified.
Currently, this popup window is not detected.
We should detect it via the "Enter security code" window title, add a window handler for it and log an appropriate message so client applications can be notified of this error condition.
Currently, IBAutomater only targets NET Framework 4.5. Would it be possible to support multi-targeting, so that it can be used from NET Standard projects as well?
Hello.
Thanks for awesome tool. I've looked into sources, and i understood that its a java program wrapper. I dont know C# and Java tools, and looking to do docker image for that wrapper.I need to know how to build this wrapper to work in docker image in headless mode, if thats possible.
Can you help me?
This GitHub Issue is created in Lean-CLI and IBAutomater because it has not been observed in QuantConnect Cloud or locally, only within Digital Ocean environment.
Based on the syslog, it looks like the IBGateway process is still running but not responding, because, after the countdown popups, no other events are received (especially the usual Shutdown/OnExited message, which triggers the restart).
We can see the countdown starting after 2021-09-27T23:41:01.1807775Z:
2021-09-27T23:41:01.1924755Z TRACE:: InteractiveBrokersBrokerage.OnIbAutomaterOutputDataReceived(): Content: Set Auto Restart Time (HH:MM) The application will automatically restart in 4 minutes 30 seconds EXIT SESSION SETTING
After connected to the docker instance about 23.47 UTC, we confirmed that the java process which contains the IBGateway was running. In fact, the memory consumption of that process on top
command was about 35% of the 1GB.
IB Gateway's launcher.log, we can verify that IBGateway did actually restart:
2021-09-29 23:45:22.662 [WR] INFO [JTS-Main] - ------------------------------- IB GATEWAY RESTART --------------------------------
2021-09-29 23:45:22.702 [WR] INFO [JTS-Main] - installer version: 2.82, installer type: standalone, install dir: '/root/ibgateway/', Jts dir: '/root/Jts', VM options file: '/root/ibgateway/ibgateway.vmoptions'
Ref.: QuantConnect/lean-cli#34
Running demo project, and "Settings will not be downloaded from the server because the feature has been temporarily disabled. " msg displayed, login hangs on.
Does this has any problems with my config or my account?
I've tried IBController, this does work.
ibgateway 977,windows 10
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.