Partial Fills

Imported from previous forum

We are trying to determine a way to differentiate between a partial fill and a pending cancel or pending replace execution report.

Previously, we assumed that as long as the execution report contained a lastShares quantity and an ExecTransType = "new", it was sent as a result of a partial fill. This took care of the case that we received a execution report for a partial fill against an order that was pending cancel (i.e. … 20=0|39=6|32=100|…)

We have since found out that for a partially filled order, lastShares will contain a quantity regardless of whether or not a NEW partial fill has occured. I.E:

  1. Send Order for 200 shares of XYZ @ 99.00
  2. Received Order Entry Confirmation
    (ExecTransType=New,ordstatus=New, lastShares=0)
  3. Received Partial Fill of 100 shares (ExecTransType=New,ordstatus=partially filled, lastShares=100)
  4. Send Cancel Request
  5. Received Pending Cancel Message (ExecTransType=New,ordstatus=pendingCancel, lastShares=100)
  6. Received Cancel Message
    (ExecTransType=Cancel,ordstatus=Cancel, lastShares=100)

Any help is greatly appreciated!

[ original email was from Ryan Pierce - rpierce@taltrade.com ]
> We are trying to determine a way to differentiate between a partial fill and a pending cancel or pending replace execution report.
>
> Previously, we assumed that as long as the execution report contained a lastShares quantity and an ExecTransType = "new", it was sent as a result of a partial fill. This took care of the case that we received a execution report for a partial fill against an order that was pending cancel (i.e. … 20=0|39=6|32=100|…)
>
> We have since found out that for a partially filled order, lastShares will contain a quantity regardless of whether or not a NEW partial fill has occured. I.E:
> 1) Send Order for 200 shares of XYZ @ 99.00
> 2) Received Order Entry Confirmation
> (ExecTransType=New,ordstatus=New, lastShares=0)
> 3) Received Partial Fill of 100 shares (ExecTransType=New,ordstatus=partially filled, lastShares=100)
> 4) Send Cancel Request
> 5) Received Pending Cancel Message (ExecTransType=New,ordstatus=pendingCancel, lastShares=100)
> 6) Received Cancel Message
> (ExecTransType=Cancel,ordstatus=Cancel, lastShares=100)

It is generally (but not universally!) accepted that one should not carry around the values of the last trade against the order in LastShares and LastPx, as you listed in steps 5 and 6. This practice is codified in the FIX 4.1 state change matrices and carried forward into 4.2. However, while this behavior is clearly wrong in 4.1 and 4.2, the 4.0 spec isn’t clear on the useage of LastShares and LastPx. Hence it would be hard to argue against this behavior solely from the standpoint of the 4.0 spec itself, and doing so is understandable from the word “Last” in the field names.

This ambiguity is a good reason why one should not use FIX 4.0. FIX 4.1 made significant advances to reduce ambiguity, and it has entirely removed the ambiguity you mention with the ExecType field. (For instance, ExecType=Partial Fill, OrdStatus=Pending Cancel is what one says when a trade happens while a cancel is pending.)

If 4.1 or 4.2 are not options, one could add two modes to their 4.0 software. For instance, my firm has seen this behavior in 4.0, and our outbound order routing software can be configured either to consider LastShares / LastPx non-zero as a trade (although OrdStatus=Stopped may use these to indicate a guaranteed price/volume so one should be careful), or to consider messages as trades only when OrdStatus=Filled or Partially Filled.

> We are trying to determine a way to differentiate between a partial fill and a pending cancel or pending replace execution report.
>
> Previously, we assumed that as long as the execution report contained a lastShares quantity and an ExecTransType = "new", it was sent as a result of a partial fill. This took care of the case that we received a execution report for a partial fill against an order that was pending cancel (i.e. … 20=0|39=6|32=100|…)
>
> We have since found out that for a partially filled order, lastShares will contain a quantity regardless of whether or not a NEW partial fill has occured. I.E:
> 1) Send Order for 200 shares of XYZ @ 99.00
> 2) Received Order Entry Confirmation
> (ExecTransType=New,ordstatus=New, lastShares=0)
> 3) Received Partial Fill of 100 shares (ExecTransType=New,ordstatus=partially filled, lastShares=100)
> 4) Send Cancel Request
> 5) Received Pending Cancel Message (ExecTransType=New,ordstatus=pendingCancel, lastShares=100)
> 6) Received Cancel Message
> (ExecTransType=Cancel,ordstatus=Cancel, lastShares=100)
>
> Any help is greatly appreciated!
>
Are you connecting FIX 4.0 to another FIX server 4.1. I know the tags changed from using TAG125=P to TAG35=F. This seems to occur when the other server is not supporting the FIX 4.0 ver.

Let me know if this helps…Good Luck
>