Dear Trader Work Station API Development Team

Discussion in 'Automated Trading' started by memacdon, Dec 5, 2011.

  1. memacdon


    Danny, can you forward this to IB tech support....

    Dear IB API dev team,

    I am requesting some information about the TWS API that is above the
    technical support I can find in the manuals, example code, and online
    forum support. I will briefly explain my problem to you and I suspect
    that you will know the answer immediately.

    I have designed a trading bot and would like to test it using the
    simulated trading papermoney account. It is built off of the *.cpp
    code provided on the IB website. I wrote a round robin type loop to
    limit the number of queries to the IB server as I was getting many
    server errors per second. Mkt data has been coming in fine for some
    time now and I am very happy. I am able to send orders the way my
    stradegy intends, more or less, but I notice that there is a vastly
    larger number of events occuring then I am sending queries for. These
    events occur in the PosixTestClient.cpp of the example code in the
    '//EVENTS' section where there are thirty or so events.

    I have been able to read the fields associated with common events used
    for querying data and checking that orders get filled, but I have been
    less successful decoding so for the error events. Is there some
    further documentation about these methods or some example code that
    demonstrates how to use them? Before I can consider making trades
    through this system I would like to know why various errors come up
    and why. For example is there any way to determine when I find that
    the previous days close does not get returned because I am using and
    invalid symbol, or because that particular symbol has been removed
    from the exchange?

    I am also wondering if there is documentation about the TWS itself,
    for example from the unix terminal readout of the TWS i get something
    like this:

    "09:42:35:389 JTS-cashfarmDispatcher-790: handleCompatibleRouting
    MARKET_DATA compmode=true ready=true
    09:42:36:167 JTS-usfarmDispatcher-796: handleCompatibleRouting
    MARKET_DATA compmode=true ready=true
    09:42:36:338 JTS-PostAuthenticate-801: pre-logon message successfully sent
    09:42:36:001 AWT-EventQueue-0: Could not read from resetTime.dat file
    /home/myname/IB/IBJts/dzgercxxn/resetTime.dat (No such file or
    09:42:36:001 AWT-EventQueue-0: Reconnected!
    09:42:37:005 JTS-CCPDispatcher-805: Proccess end"

    when my orders are not sent. If I knew what this referenced I would be
    set.... On my marry way. It would be a lot easier if I had someone
    working with me on this but I have developing as a lone wolf so that
    makes errors like this a lot harder to deal with.

    I would like to be able to use this information in my trading system
    logic, I suspect that you do as well. I am hoping that you can forward
    me a more completed version of the PosixTestClient.cpp file where all
    of the potential event fields are readouts with printfs or something.
    Also it would be good to have some documentation about the field's
    potential outcomes and the codes from from the TWS API terminal
    readout. I hope there is someone that can give me a quick hand with
    resolving this issue,