# TAG 151

**URL:** <https://forum.fixtrading.org/t/tag-151/12777>\
**Category:** General Q&A\
**Tags:** imported, 44-changes, xid\_165318\
**Created:** [January 4, 2008, 11:48am UTC](https://forum.fixtrading.org/t/tag-151/12777 "2008-01-04T11:48:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![techdumm\_x](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@techdumm\_x](https://forum.fixtrading.org/u/techdumm_x)\
**Post date:** [January 4, 2008, 11:48am UTC](https://forum.fixtrading.org/t/tag-151/12777/1 "2008-01-04T11:48:31Z")

</div>

Imported from previous forum

---

<div class="post-metadata">

**Author:** ![techdumm\_x](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@techdumm\_x](https://forum.fixtrading.org/u/techdumm_x)\
**Post date:** [January 4, 2008, 11:48am UTC](https://forum.fixtrading.org/t/tag-151/12777/2 "2008-01-04T11:48:31Z")

</div>

I have a scenario where the leavesQty came back with a negative value in the execution report. Is this normal?  
I understand the LeavesQty=OrdQty-CumQty

1st BUY order with quantity 35  
Matched 20, remaining 15  
Execution report returned - OrdQty=35, LeavesQty=15 and CumQty=20

2nd Order Modification to quantity 25  
My execution report returned - CumQty=20, OrdQty=5 and LeavesQty=-15

Anyone can explain on this? Thanks a lot.

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [January 4, 2008, 2:05pm UTC](https://forum.fixtrading.org/t/tag-151/12777/3 "2008-01-04T14:05:07Z")

</div>

[original email was from Dean Kauffman - [dean.kauffman@tradeweb.com](mailto:dean.kauffman@tradeweb.com) ]  
I agree with you that a negative LeavesQty seems bizarre. The Order State Change Matrices in the FIX spec (4.4 vol 4, table E.1.c) lay out a proper flow when an order quantity changes up or down during fill:

ER 1: ExecType=F “Trade” OrderQty=35 LastQty=20 CumQty=20 LeavesQty=15  
ER 2: ExecType=D “Restated” OrderQty=25 LastQty=0 CumQty=20 LeavesQty=5  
ER 3: ExecType=F “Trade” OrderQty=25 LastQty=5 CumQty=25 LeavesQty=0

> I have a scenario where the leavesQty came back with a negative  
> value in the execution report. Is this normal? I understand the  
> LeavesQty=OrdQty-CumQty
> 
> 1st BUY order with quantity 35 Matched 20, remaining 15 Execution report  
> returned - OrdQty=35, LeavesQty=15 and CumQty=20
> 
> 2nd Order Modification to quantity 25 My execution report returned -  
> CumQty=20, OrdQty=5 and LeavesQty=-15
> 
> Anyone can explain on this? Thanks a lot.

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [January 4, 2008, 2:20pm UTC](https://forum.fixtrading.org/t/tag-151/12777/4 "2008-01-04T14:20:22Z")

</div>

[original email was from George Brisco - [george.brisco@trialius.com](mailto:george.brisco@trialius.com) ]  
That looks suspiciously as if the sell-side has got its knickers in a bit of a twist. Are ClOrdIds coming back correctly after your amendment?

I would ask your sellside why they are sending a negative leaves quantity.

George

> I have a scenario where the leavesQty came back with a negative  
> value in the execution report. Is this normal? I understand the  
> LeavesQty=OrdQty-CumQty
> 
> 1st BUY order with quantity 35 Matched 20, remaining 15 Execution report  
> returned - OrdQty=35, LeavesQty=15 and CumQty=20
> 
> 2nd Order Modification to quantity 25 My execution report returned -  
> CumQty=20, OrdQty=5 and LeavesQty=-15
> 
> Anyone can explain on this? Thanks a lot.

---

<div class="post-metadata">

**Author:** ![sunilsingh57\_x](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@sunilsingh57\_x](https://forum.fixtrading.org/u/sunilsingh57_x)\
**Post date:** [January 8, 2008, 7:38am UTC](https://forum.fixtrading.org/t/tag-151/12777/5 "2008-01-08T07:38:43Z")

</div>

I have also seen this scenario while testing with a number of sell-side clients. This basically is a bug in thier Application which you need to point out to them and ask them to correct. Their system has to follow the logic of Tag 151= Tag 38 - Tag 14. And I have got this implemented with all of them. This requires a bit of de-bugging and troubleshooting at their end.

Regards,  
Sunil Kumar Singh

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [February 15, 2008, 5:01pm UTC](https://forum.fixtrading.org/t/tag-151/12777/6 "2008-02-15T17:01:31Z")

</div>

[original email was from Hugo Darley - [hugo.darley@fidessa.com](mailto:hugo.darley@fidessa.com) ]  
Does tag 151 ALWAYS equal 38 - 14?

> I have also seen this scenario while testing with a number of sell-side  
> clients. This basically is a bug in thier Application which you need to  
> point out to them and ask them to correct. Their system has to follow  
> the logic of Tag 151= Tag 38 - Tag 14. And I have got this implemented  
> with all of them. This requires a bit of de-bugging and troubleshooting  
> at their end.
> 
> Regards, Sunil Kumar Singh

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [February 16, 2008, 8:43am UTC](https://forum.fixtrading.org/t/tag-151/12777/7 "2008-02-16T08:43:52Z")

</div>

[original email was from Karsten Strobaek - [kst@saxobank.com](mailto:kst@saxobank.com) ]  
No. If the OrdStatus (39) is Canceled, DoneForTheDay, Expired, Calculated, or Rejected (in which case the order is no longer active) then LeavesQty could be 0, otherwise LeavesQty = OrderQty (38) - CumQty (14).

Kost

> Does tag 151 ALWAYS equal 38 - 14?
> 
> > I have also seen this scenario while testing with a number of sell-  
> > side clients. This basically is a bug in thier Application which you  
> > need to point out to them and ask them to correct. Their system has to  
> > follow the logic of Tag 151= Tag 38 - Tag 14. And I have got this  
> > implemented with all of them. This requires a bit of de-bugging and  
> > troubleshooting at their end.
> > 
> > Regards, Sunil Kumar Singh
