Questions regarding IB API

Discussion in 'App Development' started by leonbrag215, Aug 19, 2017.

  1. #31     Nov 17, 2017
  2. But in my case this is a bracket order, so there is the parent order and two child orders one LMT and other STP.
    Only the parent order became Submitted, the child orders were still in the PreSubmitted state so I just want to make sure if this is a standard behavior.
     
    #32     Nov 17, 2017
  3. It is my understanding that IB runs several checks on an order line you send, before sending it to the exchange(s). This phase, when IB runs their checks, is the order state PreSubmitted. Checks include whether you are allowed to trade this instrument, whether you provided the correct parameters, whether your account has the necessary funds and margin, and so on. One of the checks could be that the child orders are being held until all conditions of the parent order have been completed.
     
    #33     Nov 18, 2017
    leonbrag215 likes this.
  4. d08

    d08

    Parent is the initial order. Think about it, there's no point in IB sending all orders to the exchange. The bracket children are essentially conditional orders.
     
    #34     Nov 18, 2017
    leonbrag215 likes this.
  5. Thanks, I got it now.
    I have misunderstood the way bracket orders work, my initial order should of been to actually buy MSFT and then the LMT and STP sells would of been submitted once the initial order was filled.
    Regarding the one-cancels-other children orders, are these types of orders natively supported by exchanges, or does the broker has to place both orders and send a cancellation manually to the one not filled. Or maybe I am missing something again :)
     
    #35     Nov 18, 2017
  6. IB provides the answer to your question:
    IB runs the algorithm on their servers and sends the required order (LMT, STP) to the exchange.
    https://www.interactivebrokers.com/en/index.php?f=617
     
    #36     Nov 18, 2017
  7. Thanks I have found this link as well, but in the very same link it is stated that:
    So it wasn't clear to me whether the cancellation is done from the client's machine although that seems unlikely or processed on their servers.

    Thanks a lot for the help, it closed a lot of knowledge gaps I had.

    So basically all their advanced features such as conditional orders and even stops are actually stored at their servers and executed once conditions are met?
    If so, it really creates an incentive to use their advanced features as much as possible, since I bet the latency from their servers to the exchanges are very competitive, that is if they can't serve the order internally which is even better.
     
    #37     Nov 18, 2017
  8. No, the order lines are not on the client's machine. That would require the customer to keep his/her computer on 24/7 and is unrealistic. I agree that the sentence you quote is a bit ill-formulated.
    Certain order types are held at the exchange, others at IB's servers. There is way to tell, but I'm not using TWS very often so I forgot the details. If you are looking in TWS at the order window you can see coloured symbols (circle, triangle, arrow) on the left side of the order line. The colour code indicates the status of the order and whether it is at the exchange or at IB.
    This might be of help: https://www.interactivebrokers.com/...imeactivitymonitoring/order_status_colors.htm
     
    #38     Nov 19, 2017
    leonbrag215 likes this.
  9. #39     Nov 19, 2017
  10. That is indeed an appropriate example.
    What I was refering to is shown in this screen shot:
    tws-screenshot-google-order.png

    In the lower right hand corner you see an order for GOOG. Left next to it you see a purple arrow symbol. The colour code indicates the status of the order and whether it is at IB's servers or at the exchange.
     
    #40     Nov 19, 2017