PriceOffset
base: floatFIX 4.4FIX 4.2FIX 5.0 SP2
PriceOffset is a FIX datatype defined in FIX 4.4, FIX 4.2 and FIX 5.0 SP2, carried on the wire as float. 10 fields use it.
Wire format
- Base type
- float
- Fields
- 10
A signed decimal price delta. Negative values are legal and meaningful.
What the specification says
FIX 4.4
float field representing a price offset, which can be mathematically added to a "Price". Note the number of decimal places may vary and some fields such as LastForwardPoints may be negative.
FIX 4.2
float field (see definition of "float" above) representing a price offset, which can be mathematically added to a "Price". Note the number of decimal places may vary and some fields such as LastForwardPoints may be negative.
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
| Tag | Field | Dialects | Messages |
|---|---|---|---|
| 189 | BidForwardPoints | FIX 4.4, FIX 4.2, FIX 5.0 SP2 | 5 |
| 191 | OfferForwardPoints | FIX 4.4, FIX 4.2, FIX 5.0 SP2 | 5 |
| 195 | LastForwardPoints | FIX 4.4, FIX 4.2, FIX 5.0 SP2 | 2 |
| 218 | Spread | FIX 4.4, FIX 4.2, FIX 5.0 SP2 | 22 |
| 451 | NetChgPrevDay | FIX 4.4, FIX 5.0 SP2 | 2 |
| 639 | PriceImprovement | FIX 4.4, FIX 5.0 SP2 | 1 |
| 641 | LastForwardPoints2 | FIX 4.4, FIX 5.0 SP2 | 1 |
| 642 | BidForwardPoints2 | FIX 4.4, FIX 5.0 SP2 | 5 |
| 643 | OfferForwardPoints2 | FIX 4.4, FIX 5.0 SP2 | 5 |
| 834 | ThresholdAmount | FIX 4.4, FIX 5.0 SP2 | 3 |
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