Canel Replace Quantity (tag 38)

Imported from previous forum

I would like to know how tag 38 is used with cancel replace messages.

Original order has a quantity of 30.
An execution for 5 is received leaving 25 shares.
When a cancel replace is sent, is the value of tag 38 set to 25 or 30?

If it’s set to 30, what is the quantity of the new order?

[ original email was from Ryan Pierce - rpierce@taltrade.com ]
> I would like to know how tag 38 is used with cancel replace messages.

Original order has a quantity of 30. An execution for 5 is received
leaving 25 shares. When a cancel replace is sent, is the value of tag 38
set to 25 or 30?

If it’s set to 30, what is the quantity of the new order?

OrderQty(38) is expressed in terms of the entire order, not just the open part.

FIX treats these actions as modifications of the order, not a cancel of an order and a replace of the open quantity. This is true regardless of whatever translations happen between FIX and wherever the order gets routed. So if my original OrderQty is 30, and I want to buy 30 shares/contracts/etc. but I just want to change my price, my Cancel/Replace message will still have OrderQty=30. When this change is accepted, OrderQty will still be 30 however CumQty will be 5.