Imported from previous forum
Hi all,
Consider the following scenario:
- An order is entered onto the market for 100 shares.
- The order is modified to be 70 shares.
- 30 shares are executed against this order, leaving 40 remaining.
- An order cancellation message is sent for this order
Which of the following 2 answers is correct according to the FIX 4.2 spec?
(i) The order quantity in the cancellation message should be for 100 shares.
(ii) The order quantity in the cancellation message should be for 70 shares.
Thank you very much
Stefano
70 shares. You are combining “D13” followed by “D4” in FIX 4.2’s Appendix D “Order State Change Matrices”. At point “2.” in your example, the Cancel/Replace is a new ClOrdID and once it has been accepted it is “the order” (the first one is no longer active), thus if you want to cancel it, you need to issue the Cancel Request for the ClOrdID of “2.” and OrderQty should reflect 2’s OrderQty.
> Hi all,
>
> Consider the following scenario:
> 1. An order is entered onto the market for 100 shares.
> 2. The order is modified to be 70 shares.
> 3. 30 shares are executed against this order, leaving 40 remaining.
> 4. An order cancellation message is sent for this order
>
> Which of the following 2 answers is correct according to the FIX 4.2 spec?
> (i) The order quantity in the cancellation message should be for 100 shares.
> (ii) The order quantity in the cancellation message should be for 70 shares.
>
> Thank you very much
>
> Stefano
>
[ original email was from Ryan Pierce - rpierce@taltrade.com ]
Things become more interesting if the cancel/replace is pending when the cancel happens, and there’s a rather interesting “gotcha” relating to it.
The buy-side is supposed to take an "optimistic" view of ClOrdIDs. Example: the buy-side sends ClOrdID=A and then sends a change with ClOrdID=B. Regardless of whether the change is accepted, the client must send ClOrdID=B as the cancel, and must send the OrderQty of order B (70 shares) UNLESS the buy-side has received a Cancel Reject on B, in which case the cancel has ClOrdID=A and OrderQty=100.
This clarification of the buy-side being optimistic is relatively recent (4.3 or 4.2) so not everyone on the buy-side may have implemented it.
In implementing a sell-side implementation, I determined that for maximum flexibility, and given that the FIX spec made this change relatively recently, we needed to support receiving cancels on either OrigClOrdID=A or B. We also have insisted on validating OrderQty on a cancel. This means that if someone cancels OrigClOrdID=A, I need to validate that OrderQty=100, or if they OrigClOrdID=B, I need to validate that OrderQty=70.
> 70 shares. You are combining “D13” followed by “D4” in FIX 4.2’s Appendix D “Order State Change Matrices”. At point “2.” in your example, the Cancel/Replace is a new ClOrdID and once it has been accepted it is “the order” (the first one is no longer active), thus if you want to cancel it, you need to issue the Cancel Request for the ClOrdID of “2.” and OrderQty should reflect 2’s OrderQty.
>
> > Hi all,
> >
> > Consider the following scenario:
> > 1. An order is entered onto the market for 100 shares.
> > 2. The order is modified to be 70 shares.
> > 3. 30 shares are executed against this order, leaving 40 remaining.
> > 4. An order cancellation message is sent for this order
> >
> > Which of the following 2 answers is correct according to the FIX 4.2 spec?
> > (i) The order quantity in the cancellation message should be for 100 shares.
> > (ii) The order quantity in the cancellation message should be for 70 shares.
> >
> > Thank you very much
> >
> > Stefano
> >
>