float
base: floatFIX 4.4FIX 4.2
float is a FIX datatype defined in FIX 4.4 and FIX 4.2, carried on the wire as float. 17 fields use it.
Wire format
- Base type
- float
- Fields
- 17
A decimal number. The wire form keeps its trailing zeros, which is why decoders expose the raw string alongside the parsed number.
What the specification says
FIX 4.4
Sequence of digits with optional decimal point and sign character (ASCII characters "-", "0" - "9" and "."); the absence of the decimal point within the string will be interpreted as the float representation of an integer value. All float fields must accommodate up to fifteen significant digits. The number of decimal places used should be a factor of business/market needs and mutual agreement between counterparties. 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."). Note that fields which are derived from float may contain negative values unless explicitly specified otherwise.
FIX 4.2
Sequence of digits with optional decimal point and sign character (ASCII characters "-", "0" - "9" and "."); the absence of the decimal point within the string will be interpreted as the float representation of an integer value. All float fields must accommodate up to fifteen significant digits. The number of decimal places used should be a factor of business/market needs and mutual agreement between counterparties.
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
| Tag | Field | Dialects | Messages |
|---|---|---|---|
| 155 | SettlCurrFxRate | FIX 4.4, FIX 4.2 | 5 |
| 211 | PegOffsetValue | FIX 4.4, FIX 4.2 | 8 |
| 228 | Factor | FIX 4.4 | 59 |
| 231 | ContractMultiplier | FIX 4.4, FIX 4.2 | 59 |
| 246 | UnderlyingFactor | FIX 4.4 | 59 |
| 253 | LegFactor | FIX 4.4 | 50 |
| 389 | DiscretionOffsetValue | FIX 4.4, FIX 4.2 | 8 |
| 436 | UnderlyingContractMultiplier | FIX 4.4, FIX 4.2 | 59 |
| 469 | RoundingModulus | FIX 4.4 | 18 |
| 485 | ExecPriceAdjustment | FIX 4.4 | 1 |
| 520 | ContAmtValue | FIX 4.4 | 2 |
| 614 | LegContractMultiplier | FIX 4.4 | 50 |
| 623 | LegRatioQty | FIX 4.4 | 50 |
| 656 | SettlCurrBidFxRate | FIX 4.4 | 3 |
| 657 | SettlCurrOfferFxRate | FIX 4.4 | 3 |
| 811 | PriceDelta | FIX 4.4 | 2 |
| 850 | TargetStrategyPerformance | FIX 4.4 | 1 |
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