ZagTrader

FIX Protocol Tag 151: LeavesQty

Quantity still open for execution. It is 0 when the order is filled, cancelled, rejected, expired or done for the day; otherwise it is OrderQty (38) minus CumQty (14).

Tag number
151
Data type
QTY
FIX versions
FIX 4.1 to 5.0 SP2
Used in
6 message types

Practical notes on LeavesQty

LeavesQty is the quantity still open for execution.

  • For a working order, OrderQty = CumQty + LeavesQty.
  • It is 0 once the order can no longer trade: filled, canceled, rejected or expired. A canceled order has LeavesQty 0 even when CumQty is below OrderQty.

Common mistakes

  • Computing open quantity as OrderQty minus CumQty, which is wrong for canceled and expired orders.

Changes between FIX versions

  • Added in FIX 4.1.

Tag 151 in each FIX version

Values and message usage as defined in a specific version.

Data type

QTY: A decimal number of units, such as shares or contracts.

Example

151=500

Illustrative value. In a message, fields are separated by the SOH character (0x01), often shown as | or ^ in logs.

Decode a message with this tag

Message types that use tag 151

Covers every version from FIX 4.0 to 5.0 SP2, including fields reached through components and repeating groups. The version pages above show whether the tag is required in each message.

Field and message data comes from the QuickFIX data dictionaries for FIX 4.0 to 5.0 SP2 and FIXT 1.1, used under the QuickFIX Software License. This product includes software developed by quickfixengine.org (http://www.quickfixengine.org/). Enumerated value names are converted to plain text for reading.