Qty
base: floatFIX 4.4FIX 4.2FIX 5.0 SP2
Qty is a FIX datatype defined in FIX 4.4, FIX 4.2 and FIX 5.0 SP2, carried on the wire as float. 36 fields use it.
Wire format
- Base type
- float
- Fields
- 36
A decimal quantity. Fractional quantities are legal, which is why this is a float family rather than an integer.
What the specification says
FIX 4.4
float field capable of storing either a whole number (no decimal places) of "shares" (securities denominated in whole units) or a decimal value containing decimal places for non-share quantity asset classes (securities denominated in fractional units).
FIX 4.2
float field (see definition of "float" above) capable of storing either a whole number (no decimal places) of "shares" or a decimal value containing decimal places for non-share quantity asset classes.
FIX 5.0 SP2
Sequence of digits with optional decimal point and sign character (characters "-", "0" - "9" and "."); the absence of the decimal point within the string will be interpreted as the float representation of an integer value. Note that float values may contain leading zeros (e.g. "00023.23" = "23.23") and may contain or omit trailing zeros after the decimal point (e.g. "23.0" = "23.0000" = "23" = "23.").
Descriptions are quoted from the FIX Orchestra sources under the Apache 2.0 licence.
How @boarteam/fix handles it
@boarteam/fix parses the value as a number and reports parse/invalid-float when it does not lex as one; the raw string is kept so precision and trailing zeros are never lost.
Fields with this datatype
Decode this in your own code
The same engine that produced the decoded example above is an Apache-2.0 npm package with zero runtime dependencies. It runs in Node and in the browser, and parse() returns problems as data instead of throwing.
npm i @boarteam/fix @boarteam/fix-dict-fix44