Skip to content

IBController doesn't consistently select 'paper' trading mode on IB Gateway 959.1b (and other previous versions as well) #118

@bfreis

Description

@bfreis

UPDATE-

tl;dr - as explained in the many messages below, if the file jts.ini doesn't exist, IB Controller fails to select Trading Mode = 'paper' in the login screen; this has been reproduced consistently on my tests.


Hello,

For some reason, IB Controller 3.2.0 some times fails to select 'paper' Trading Mode. It's inconsistent - sometimes it does select paper, sometimes it doesn't. When it doesn't, since I'm using my paper credentials, IB Gateway will then show an error message complaining that I used paper user/password but didn't select paper trading mode.

Please see the attached screenshot.

Any ideas?
Thanks!

Here's some additional info.

  1. The java process is started like this: /opt/i4j_jres/1.8.0_60/bin/java -cp /root/Jts/959/jars/*:/opt/IBController/IBController.jar -Xmx256m -Xms256m -Xss1m ibcontroller.IBGatewayController /root/IBController/IBController.ini MY_USERNAME MY_PASSWORD paper (with redacted user/password).

  2. The IB Controller logs seem to show that it correctly understood that I wanted to use my paper account:

18:19:13:610 IBController: using default settings provider: ini file is /root/IBController/IBController.ini
18:19:13:614 IBController: using default login manager: getting username and password from args
18:19:13:615 IBController: using default config dialog manager: constructor parameter isGateway=true
18:19:13:615 IBController: using default trading mode manager: constructor parameter args: tradingMode=paper
  1. However, the following log entry on IB Controller only exists when it works:
 IBController: Setting Trading mode = paper

I've compared the full logs for one execution that did work, and one that didn't. That line is the single difference in the logs.

  1. I've tried different settings on IBController.ini for the parameter TradingMode. I tried to comment out the line, I tried to set it to 'paper', and I tried to set it to 'live'. It doesn't seem to make any difference - I still observe inconsistent results.

  2. The 'launcher.log' file contains the following lines when IB Controller fails to select Trading Mode 'paper', that seem to be related to this issue:

2016-10-25 18:57:56.639 [DN] INFO  [JTS-AuthDispatcherS2-16] - NSErrorResponse.PROD_PAPER_INVALID_CHOICE
2016-10-25 18:57:56.642 [DN] INFO  [JTS-AuthDispatcherS2-16] - Connection to server failed: <html>You have selected the Live Trading Mode, but the specified user <br> is a Paper Trading user. <br><br>Please select the correct Trading Mode.</html>

ibcontroller-issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions