Automatic Order Entry API for IB

Discussion in 'Automated Trading' started by PeterCabus, Nov 15, 2001.

  1. Hi all,

    a couple of weeks ago there were some questions about an automatic order entry API for IB. I'm currently in the final stages of the development of an automatic trading system. Because we will be doing over 300 trades a day, we need automatic order entry.

    I know that IB offers a CTCI (FIX) interface. I'm not worried about their minimum commission (2400$). I am worried about performance (someone reported problems) and the cost of the dedicated leased line. This would put too much pressure on the project, especially during the first months, when the system is really put to the test.

    Someone on this board suggested to develop an API based on JAVA.

    I can develop such an interface and wrap it into a multi-threaded COM component. This will make it available to developers using C++, VB, Excel, Borland, etc.

    I will even do this for FREE.

    Here are my conditions:
    1. I'm working as full time consultant traveling the best part of the week. My time is limited therefore I cannot commit to any deadlines. It will be ready when it is finished.

    2. I would like to do this as an "open source project". I will make the source code available.

    3. I need YOUR help, either with the specs or with the programming (or both)

    Let me know what you guys think. Perhaps we could even involve IB. Def??

  2. Depending on the interest that this generates I am in. Def already mentioned that IB is commited to its ctci/fix interface and doesn't want to make an alternative offer, so I am not holding my breath about IB's cooperation.

    I would recommend to use J-Trader. It would be a much more solid foundation than IB, and you wouldn't have to be tied to a specific broker. Are you trading stocks or futures?
  3. hey - i am coding w. gcc using linux now for some years. an API would be a nice thing. I have already taken a look into the TWS source code, but recently IB programmers use a symbol scrambler making things very difficult. They did not do that in the past, thus i know TWS is nicely structured into the front end and some library-styled FIX order management API. IB SHOULD PUBLISH THE JAVA SOURCES OF THESE CLASSES. This would satisfy most of out API needs.
  4. That's funny, they protect their source code but customer's orders are unencripted and visible to anyone with an interest.

    As for the API, yes I agree with you Sascha, it's not a lot of programming they have to do. They don't even have to release the source code, just header files and explaining how to access internal routines and exchange information with external apps.
  5. tntneo

    tntneo Moderator

    I am worried about doing this without their permission.
    The reverse engineering is probably illegal..

    I agree it is really a matter of a couple hours to deliver something we could use as API because everything is in the TWS downloaded on any IB's customer.

    I prefer to remain lawful and maybe go to a JTrader broker. It is up to IB to help now.

    As far as an API open project is concerned, I am willing to help with both programming and specs.

    Actually I traded live this week with a macro automation with IB TWS. It worked without a glitch. Until now I was sending orders to TWS Demo.. but this week to regular TWS. ( eSignal -> Ensign -> AutoIT -> IB ) it is a long chain but it works to enter and send targets and stop loss automatically.

    THE problem is of course the impossibility to receive IB's feedback (number of position and actual entry price). This means, when the system wants to get out earlier than the targets and stop loss, it has to be done manually (that's a pity and sometimes just damn too difficult to do). Full automation is the only way as soon as you start some.

  6. neo - agree, would not decompile/modify their source without permission, it is likely to be not allowed and also it would be very dangerous to try out. just imagine your software to generate an uncontrollable order flow when you test it with your account. IB should help end this topic end release some sort of library with a small doc.
  7. RAY


    I don't know much about programming, but I have been looking for a good automated product for quite a while. I DO know people that are "programers," and they would be willing to do my share of the help.
  8. def

    def Sponsor

    i know that access via DDE is coming shortly which may serve your needs. i'll see if any priority has been given to allowing the API order entry.
  9. Hi Def,

    Any interface that allows automation of order entry and order management, even when it is DDE, is fine for me. It is not the nicest or newest technology, but it works. One technical problem with DDE is that you cannot create multi-threaded objects. The Microsoft implementation only supports single-threaded objects.

    Could you provide some more info on the functionality that will be supported via DDE?


  10. def

    def Sponsor

    unfortunately i can't provide any further info since I don't have any at this time. As I hear more (hopefully next week), i'll post it.
    #10     Nov 16, 2001