IB API questions...

Discussion in 'Retail Brokers' started by oo7, Jan 31, 2004.

  1. oo7

    oo7

    i'm still not sure if i should open an account at ib or not. i only used their demo tws. i have two questions,

    1. in a regular trading account, does tws has charting? there's no charting in the demo version.

    2. i don't understand why they split tickPrice() and tickSize() in two callback functions. i notice in the demo version, tickPrice() is not always followed by a tickSize(). this means you cannot always match a size with a price. do i misunderstand anything here?


    thanks in advance,
     
  2. If the price and size sync is important to you, then it will be an issue.

    No charting from IB TWS. You can use other third party charting tools based on TWS data feed.
     
  3. oo7

    oo7

    Thanks for quick reply,
     
  4. jaan

    jaan

    no, i don't think it has (i'm using separate quotes provider myself).

    you're right.

    the fact of life is that TWS API is rather poorly designed. another example of brain-deadness is that there is a method to query open positions, yet there is no way to query how *many* open positions there are in total, so you never know if a reported position is the last one or if there are more to come.

    having said that, i must admit that most of the shortcomings of TWS API can be circumvented by clever programming, resulting in a system that works surprisingly well in practice.

    still, every now and then i find myself wishing that IB would cut the crap and open up the FIX interface to their servers (without the current draconian terms that is).

    - jaan
     
  5. oo7

    oo7

    amazing... ib's api seems useless to me.
     
  6. Bob111

    Bob111

    007-TWS is trading platform,used for placing orders. if you don't like IB API(personally-i'm very happy with it and found very easy to use) you can try MB trading SDK kit. from february MB will have same comm for stocks and with they SDK you can do whatever you want, but it bit more complicated than IB API. separation of size and side for me did not make any sense,since it updated immediately. nanoseconds not going to make big deal there.

    they updated only when it change(as far as i know). if ask still same, but only size changed-only ticksize will be fired.
     
  7. jaan

    jaan

    correct. the problem, however, arises when you need to differentiate between "trade @ new price but with same size than previous trade" and "trade @ new price and with new size" events. then you're basically SOL.

    for example, if your system monitors big trades going off on the ask, then the TWS API *is* rather useless for you, because even when it gets a king-sized tickSize() callback, there is no way to know for sure the price level for that trade, as the next (or previous) tickPrice() callback may correspond to another trade.

    don't get me wrong -- i'd never call the API "useless" in general. in fact, i've been using it almost from the day it was released. it just has severe limitations that could have been avoided had more thought been invested at the design stage.

    - jaan
     
  8. Bob111

    Bob111

    maybe subscription to L2 will help you? you will be able to see any changes on both sides in price and size?
    i use one array for price and size, so if you watching big block-size will fire and price will be price,which been assigned in last time for this tickside. example: if last and ask -same price, but last size was changed-this mean trade was occured at ask price. or im missing something?i mean-i did not see a big problem there. in this particular situation that you mentioned. as i said before-you may consider MB trading SDK as posible solution, if you work on automated system.
    just my humble opinion
     
  9. oo7

    oo7

    Bob,

    thank you very much for the input. in fact, i do need a recommendation for sdk. i forgot to ask in my last post. i just took a look at their web site. looks pretty good to me, will do more research on it.

    as to the problems in ib's api, jann read me correctly.

    the problem is i don't want to guess, there're just too many scenarios you have to check and make sure that your guessing algorithm is correct.

    the correct api is actually extremly simple, just,

    tick(int type, float price, int size)

    type: ask, bid, or last

    then you don't have to guess. besides, the api guide never says which one comes first price or size.

    i think the only reason they split it into two is to reduce the network traffic.

    matching the price with its size could be critical if you want to calculate some technical indictors on a tick by tick basis.
     
  10. Bob111

    Bob111

    i like MB SDK. it a bit complicated for average Joe like me, but should be no problem for expirienced programmer. you can build entire trading platform from it just the way you like it or use components in your own application. guys from MB very very supportive. i got very quick respond on all my questions.
     
    #10     Feb 1, 2004