Imported from previous forum
Hi all,
I have few doubts regarding what responce will be send by executing system for Cancel/Replace message in following cases :
- Original Qty is 1000
Cancel/Replace message is sent for this order with intended quantity 600. Will this message be treated as new order with quantity 600 and original order will get cancelled or it will update the same order with order quantity as 600?
If it is treated as new order and inbetween, 500 quantity from original order got executed. In this case, what all messages will executing system send? It will definately send execution for 500 quantity. What OrigClOrdId will it send on this message, of original order or of replace order? Will it send ur out for remaining 500?
Else if original order gets updated on receiving Cancel/Replace message, will it send ur out of 400 quantity, after sending execution of 500?
- Original Qty is 1000
Cancel/Replace message is sent for this order for intended quantity 600. And inbetween, 700 from original order got executed. In this case what all messages will executing system send? Will it send ur out for 300 quantity and cancel reject for 100, or it will only send ur out for 300 quantity?
On Order Cancel Reject message, how to find out for what quantity cancellation got rejected?
thanks,
Ashwini
[ original email was from Ryan Pierce - rpierce@taltrade.com ]
First, I’d like to state that the FIX concept of Cancel/Replace and the CMS concept differ significantly. This is probably one of the biggest sources of confusion about the FIX application layer. It usually is more helpful to think of FIX not in terms of Cancel/Replace but in terms of Order Modification.
> 1. Original Qty is 1000
> Cancel/Replace message is sent for this order with intended quantity 600. Will this message be treated as new order with quantity 600 and original order will get cancelled or it will update the same order with order quantity as 600?
The order effectively gets modified, decreasing its size from 1000 to 600. The FIX spec requires a new ClOrdID to be assigned to it. The sell-side has the option of keeping the same OrderID or assigning a new OrderID.
> If it is treated as new order and inbetween, 500 quantity from original order got executed. In this case, what all messages will executing system send? It will definately send execution for 500 quantity. What OrigClOrdId will it send on this message, of original order or of replace order? Will it send ur out for remaining 500?
>
> Else if original order gets updated on receiving Cancel/Replace message, will it send ur out of 400 quantity, after sending execution of 500?
There is no FIX concept of "UR OUT 400".
FIX has two stages to accepting a successful Order Modification. First, the modification is acknowledged as being received and pending. Then, the modification becomes completed. (OrdStatus = Replaced in 4.1, 4.2, OrdStatus = New on the ClOrdID of the new order in 4.0).
If the trade of 500 happens before the other party receives your Order Modification Request, the ClOrdID will be the old ID. If it happens after the request is received but before it is completed, the old ClOrdID will be used, and fields such as OrderQty and LeavesQty will reflect the old values (OrderQty=1000, LeavesQty=500). If it happens after the change is complete, the new ClOrdID will be used, as are the new values (OrderQty=600, LeavesQty=100).
> 2. Original Qty is 1000
> Cancel/Replace message is sent for this order for intended quantity 600. And inbetween, 700 from original order got executed. In this case what all messages will executing system send? Will it send ur out for 300 quantity and cancel reject for 100, or it will only send ur out for 300 quantity?
Usually, one of two things happens:
-
Reject the Order Modification Request.
-
In 4.1/2, report the fill of 700, and report the order with ExecType=Replaced, OrdStatus=Filled.
> On Order Cancel Reject message, how to find out for what quantity cancellation got rejected?
Each Order Cancel Request and Order Modification Request gets a unique ClOrdID assigned by the sender. The Order Cancel Reject message references that ID, so you know which action was rejected.