Giter Club home page Giter Club logo

ibautomater's People

Contributors

imphasing avatar jaredbroad avatar jhonabreul avatar martin-molinero avatar stefanoraggi avatar tuan-h avatar vslee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ibautomater's Issues

Create a complete hello world demo using the code.

A hello-world demonstration is needed for an application which might be connecting and using the IBAutomater.

  • Mock config
  • Create class, bind event handlers.
  • Start IBGateway, Login.
  • Print out logs to console. demo.exe
  • Wait 30 seconds. Stop.

Support automating automatic logoff in >974 IB Gateway

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.

"Invalid TwsInfo" on IBGateway 978

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]

IBAutomater should test for already running Gateway or TWS before trying to start a new Gateway

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.

Upgrade to Use TWS 978

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).

Trading Mode toggle button not found

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

IB gateway still restarts after #18

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:

  1. Schedule the IB gateway for the time T+3 hours (it did not work for me if I set T+1 hours).
  2. Run IBAutomater.
  3. In three hours IB gateway goes down without recovery.
    I have tried to reproduce this behavior by manually starting IB gateway, scheduling restart for T+3 hours, and trying to keep it alive, but it just restarts.

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

Configurable Sunday Restart

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.

Add handler for "Enter security code" popup window

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.

Multi-targeting (NET Standard 2.0 + NET Framework 4.5)

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?

  1. The first step is that the .csproj would need to be modified to use be a SDK-style project instead of a MSBuild one. (PR #16 merged)
  2. After that's done, then the .csproj can be changed from targeting net452 to netstandard20

Docker image

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?

Unresponsive IB Gateway in Digital Ocean

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.

  1. The algorithm crashes with a "no connected" message. the crash is raised, in general, at 5.00 AM UTC.
  2. The algorithm is unable to connect with another paper-trading account. IB Gateway gets frozen for 15 mins and crashes because it is not able to connect.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.