Too Late To Cancel?

Imported from previous forum

[ original email was from Mark Bigenwald - mbigenwald@sungard.com ]
Hello,
I’m working on implementing a fix engine and am not sure how to handle a certain situation:

FIX 4.0

  1. I send an order: 35=d, 11=1950
  2. Order is acknowledged
  3. Receive a partial fill: 35=8, 39=1
  4. Send a cancel request: 35=F, 11=1951
  5. Receive a Pending Cancel Replace: 35=8, 39=6, 11=1950
  6. Receive a Fill: 35=8, 39=2, 11=1950

I am unsure of protocol in this scenario:
Should I also EXPECT an ORDER CANCEL REJECT message with a reject resaon of 102=0/1
OR
once I get the fill, should I change the status of the cancelling order from Pending/Cancel to Too Late to Cancel?

Thanks for your help!!!

[ original email was from Ryan Pierce - rpierce@taltrade.com ]
> I am unsure of protocol in this scenario:
> Should I also EXPECT an ORDER CANCEL REJECT message with a reject resaon of 102=0/1
> OR
> once I get the fill, should I change the status of the cancelling order from Pending/Cancel to Too Late to Cancel?

I don’t believe the FIX spec requires one to send a cancel reject if the order is filled. It seems rather obvious that the cancel has failed if the order is filled. Most sell-side systems I know of don’t send the Cancel Reject, but I know of at least one that does.

When writing a buy-side implementation, I would think the best approach is not to require the cancel reject, but to be able to handle it properly if you receive it. (Which might involve just ignoring it.)

It’s a different case if the cancel and fill ended up crossing the wire at the same time, such that the sell-side receives the cancel request after the order has been filled. Then the sell-side should send a Cancel Reject.