Discussion in 'Trading Software' started by BayStFXTrader, Aug 27, 2010.

  1. I'm wondering if there is anyone here who is using JAVA API to trade with Interactive brokers. I recently got the API and I'm trying to connect to the TWS through API.

    Unfortunately, I get the following error message

    -1 | 502 | Couldn't connect to TWS. Confirm that "Enable ActiveX and Socket Clients" is enabled on the TWS "Configure->API" menu.

    I've enabled the AxtiveX and Socket clients and I'm still getting this. I'm wondering if anyone else experienced this in the beginning.

    Thanks in advance for any help/comments.
  2. dloyer


    Yes, I use Java with IB. As I recall, it takes a little fussing to get it configured, but not a big deal.

    Biggest pain in the ass is that it shuts down once a day and requires a pin code to be keyed in. Silly.
  3. jetbird


  4. Thanks a lot for your response guys

    jeb999 :- from what I see, its an automated trading system. Do you use the Jsystemtrader? Does it have code to connect the IB's API?
    SInce I couldn't find it and I was wondering if you can direct me to the file i.e. the file name. I'm wondering if you use the "jsystemtrader" and "jbooktrader" and what has your experience been with them?

    dloyer :- Do you remember seeing this error? Also, I haven't connected yet so I wouldn't know about the system being reconnected once a day. I guess I'm still stuck at the very beginning and still trying to connect. Did you change any of the code in Java API code provided by IB?
  5. I'm wondering, do any of your guys trade forex through your Java API with IB?