Partial Fill then Cancel Replace

Imported from previous forum

[ original email was from Vin Nguyen - vin.nguyen@comcast.net ]
If I submit an order and receive partial executions then I sumbit a cancel/replace, what would be the values for ExecTransType, ExecType, and OrdStatus if the broker accepts the cancel/replace?

I’m assuming:
20=0 (New)
150=5 (Replace)
39=1 (Partial Fill)

Am I correct?

Some brokers are sending
20=0 (New)
150=5 (Replace)
39=5 (Replace

D6 matrix is the only case were 150=5 and 39=5, this is when there is no Executions. Which seems correct because Replace has higher precedence then New.

Every other case where there were partials then a cancel/replace, 39=1. Which seems correct since Partially Filled has a higher precedence than Replaced.

But what doesn’t make sense is in the FIX 4.2 spec page 86 - Execution Reports it states OrdStatus: Replace - Replaced order with or without executions. If OrdStatus is used to convey the state of the order how can OrdStatus=Replace for an order that is with Executions?

[ original email was from John Prewett - jprewett@lavatrading.com ]
Hi Vin,

I believe you are correct.

The D7 example appropriately illustrates the point.
You will notice on the 2nd step 7 (where the replace request is actually accepted and the order is partially filled) OrdStatus=partially filled and ExecType=replace.

In FIX.4.2 OrdStatus precedence, partially filled has value 4 whereas Replaced has value 3. Therefore partially filled wins out against replaced.

On the discrepancy you point out in the FIX.4.2 specification, I believe the words on the page number you state (86) are incorrect.
[Incidentally, MS Word seems to have a life of its own when it comes to pagination. In my view of this document, the words you mention were found on page 92]
A better set of words would be:
OrdStatus 3 - Replaced - Replaced order without executions.

All that said, what I always recommend is twofold:

  1. Conform exactly to the specification when sending messages.
  2. Be liberal when receiving messages.

In the case you mention where some brokers are sending OrdStatus=replaced instead of partially filled, the meaning of their message is still unambiguous. You should be able to process it without problem.

If you feel particularly zealous, you could inform these brokers of their error. Don’t hold your breath waiting for a change. Unfortunately, they are already trapped with their incorrect bahavior. If they make this change for everyone, some of their existing customers who have explicitly coded to expect this behavior could break. Thus any change they make would then have to be configurable per FIX session, which would add to their pain.

I hope this helps.

JohnP

If I submit an order and receive partial executions then I sumbit a
cancel/replace, what would be the values for ExecTransType, ExecType,
and OrdStatus if the broker accepts the cancel/replace?

I’m assuming: 20=0 (New) 150=5 (Replace) 39=1 (Partial Fill)

Am I correct?

Some brokers are sending 20=0 (New) 150=5 (Replace) 39=5 (Replace

D6 matrix is the only case were 150=5 and 39=5, this is when there is
no Executions. Which seems correct because Replace has higher
precedence then New.

Every other case where there were partials then a cancel/replace,
39=1. Which seems correct since Partially Filled has a higher
precedence than Replaced.

But what doesn’t make sense is in the FIX 4.2 spec page 86 - Execution
Reports it states OrdStatus: Replace - Replaced order with or without
executions. If OrdStatus is used to convey the state of the order how
can OrdStatus=Replace for an order that is with Executions?