Why IB API echoes same order status multiple times?

Discussion in 'Automated Trading' started by Chronos.Phenomena, Oct 24, 2010.

  1. DAV

    DAV ET Sponsor

  2. #22     May 12, 2011
  3. I get the same thing, on fill events. Two of them.

    Here's the problem:

    If I want to do something as-soon-as a fill arrives, which involves resetting an order status, I get screwed by the second fill event.

    So .. I now have an intermediate state "KIND_OF_FILLED", which indicates that I should not proceed yet, but wait for the next IB fill event... Works as a work around.

    Amend by reducing the qty in an existing order through another call to EClientSocket::placeOrder. Amends existing order. Also does it faster than cancel/replace .. so use it to amend UP too.

    public virtual void placeOrder(int id, Contract contract, Order order);
     
    #23     May 13, 2011
  4. OK looks like you cannot update an order if you can how?

    The placeOrder API will not update an order. If you resumit the same order id and changes to the order you get Request in progress for: orderID Please wait

    Anyone had success with this ??

    Seems you have to cancel the order and resubmit a new order.

    Thanks
    James

    :(
     
    #24     May 13, 2011
  5. sprstpd

    sprstpd

    The placeOrder API does update/modify orders. I have never had any problems with it.
     
    #25     May 13, 2011
  6. Wait for the ack.
     
    #26     May 14, 2011
  7. up23

    up23

    try using execDetails() which gets called once per fill.
     
    #27     Jun 4, 2011