TWS API order status : partially filled?

Discussion in 'Automated Trading' started by TraDaToR, Mar 22, 2009.

  1. TraDaToR

    TraDaToR

    Hello,

    Do you know what is the order status given by the DDE API when an order is partially filled? Like "Submitted", "Inactive"...

    "PartiallyFilled" ?, "Partiallyfilled"? "Partially Filled"?

    I didn't find it on the website.

    Thanks a lot for your help.
     
  2. IQ139

    IQ139

    partially filled is as good as NOT filled

    in my trading world, filled is the only word that means filled

    Phone IB, this has to be cleared up, you can't have your bot partial around like a drunken sailor
     
  3. TraDaToR

    TraDaToR

    ...
     
  4. As far as I know the TWS sends a 'filled' and you can get more information if it is complete or not by checking 'remaining'. If it is zero it is complete :)

    (That's from the C++ docu)
    virtual void orderStatus(OrderId id, const CString &status, int filled, int remaining, double avgFillPrice, int permId, int parentId, double lastFillPrice, int clientId, const CString& whyHeld)

    Here is the complete API description: http://individuals.interactivebrokers.com/php/apiUsersGuide/apiguide.htm

    Hope this helps?
    Daniel
     
  5. TraDaToR

    TraDaToR

    OK,

    Thanks a lot, Daniel. It will be even simpler for what I want to do.
     
  6. TraDaToR

    TraDaToR

    On the IB forum, someone told me that it remains "submitted" until the complete order is filled. Does someone using excel knows about it? ( don't know if it changes from DDE to C++, java...)
     
  7. TraDaToR

    TraDaToR

    Now TWS is open after the WE and "sharesFilled" and "sharesRemaining" are "invalid req type". I love that...
     
  8. The status of an open order stays 'submitted' until the complete order is filled. Here is the part from the documetation:

    'Filled - indicates that the order has been completely filled.'

    I think that is clear. Please see here the complete documentation for the order-status:

    status
    The order status. Possible values include:

    PendingSubmit - indicates that you have transmitted the order, but have not yet received confirmation that it has been accepted by the order destination. NOTE: This order status is not sent by TWS and should be explicitly set by the API developer when an order is submitted.

    PendingCancel - indicates that you have sent a request to cancel the order but have not yet received cancel confirmation from the order destination. At this point, your order is not confirmed canceled. You may still receive an execution while your cancellation request is pending. NOTE: This order status is not sent by TWS and should be explicitly set by the API developer when an order is canceled.

    PreSubmitted - indicates that a simulated order type has been accepted by the IB system and that this order has yet to be elected. The order is held in the IB system until the election criteria are met. At that time the order is transmitted to the order destination as specified.

    Submitted - indicates that your order has been accepted at the order destination and is working.

    Cancelled - indicates that the balance of your order has been confirmed canceled by the IB system. This could occur unexpectedly when IB or the destination has rejected your order.

    Filled - indicates that the order has been completely filled.

    Inactive - indicates that the order has been accepted by the system (simulated orders) or an exchange (native orders) but that currently the order is inactive due to system, exchange or other issues.


    Daniel
     
  9. TraDaToR

    TraDaToR

    Thanks a lot again Daniel,you're better than me at searching on the IB website.

    Now, how do I know if my order has been partially filled? When I use =myname|ord!id7908?sharesFilled, it gives me "invalid req type". Same thing for sharesRemaining...
     
  10. TraDaToR

    TraDaToR

    Perhaps the status must be "Submitted" to use the "sharesFilled" DDE link?
     
    #10     Mar 22, 2009