# ER when canceling a partially filled order

**URL:** <https://forum.fixtrading.org/t/er-when-canceling-a-partially-filled-order/1669>\
**Category:** General Q&A\
**Tags:** algorithmic-trading, xid\_3965888, imported\
**Created:** [May 12, 2017, 4:00am UTC](https://forum.fixtrading.org/t/er-when-canceling-a-partially-filled-order/1669 "2017-05-12T04:00:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![freitas\_x](https://avatars.discourse-cdn.com/v4/letter/f/cdc98d/32.png) [@freitas\_x](https://forum.fixtrading.org/u/freitas_x)\
**Post date:** [May 12, 2017, 4:00am UTC](https://forum.fixtrading.org/t/er-when-canceling-a-partially-filled-order/1669/1 "2017-05-12T04:00:28Z")

</div>

Imported from previous forum

---

<div class="post-metadata">

**Author:** ![freitas\_x](https://avatars.discourse-cdn.com/v4/letter/f/cdc98d/32.png) [@freitas\_x](https://forum.fixtrading.org/u/freitas_x)\
**Post date:** [May 12, 2017, 4:00am UTC](https://forum.fixtrading.org/t/er-when-canceling-a-partially-filled-order/1669/2 "2017-05-12T04:00:28Z")

</div>

When cancel an order I receive an ER with order status CANCELED.  
If the order is partially filled when I cancel, after receiving the ER with order status CANCELED  
will I receive an ER with order status FILLED?

---

<div class="post-metadata">

**Author:** ![yemioluwi\_x](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@yemioluwi\_x](https://forum.fixtrading.org/u/yemioluwi_x)\
**Post date:** [May 12, 2017, 8:03am UTC](https://forum.fixtrading.org/t/er-when-canceling-a-partially-filled-order/1669/3 "2017-05-12T08:03:07Z")

</div>

It should be cancelled, as cancelled order status has a higher precedence than the filled. See OrdStatus precedence list in the ExecutionReport (8) spec, also see the order state matrixes. In FIX 5.0 sp2 these are on p19 and p59.

---

<div class="post-metadata">

**Author:** ![freitas\_x](https://avatars.discourse-cdn.com/v4/letter/f/cdc98d/32.png) [@freitas\_x](https://forum.fixtrading.org/u/freitas_x)\
**Post date:** [May 13, 2017, 1:43am UTC](https://forum.fixtrading.org/t/er-when-canceling-a-partially-filled-order/1669/4 "2017-05-13T01:43:21Z")

</div>

Thank you very much Yemi Oluwi! The Order State Change Matrices [http://www.onixs.biz/fix-dictionary/4.4/app\_d.html](http://www.onixs.biz/fix-dictionary/4.4/app_d.html) were very useful.
