Price
base: floatFIX 4.4FIX 4.2
Price is a FIX datatype defined in FIX 4.4 and FIX 4.2, carried on the wire as float. 45 fields use it.
Wire format
- Base type
- float
- Fields
- 45
A decimal price. Precision is a venue convention, not a protocol rule, so compare the raw string when exactness matters.
What the specification says
FIX 4.4
float field representing a price. Note the number of decimal places may vary. For certain asset classes prices may be negative values. For example, prices for options strategies can be negative under certain market conditions. Refer to Volume 7: FIX Usage by Product for asset classes that support negative price values.
FIX 4.2
float field (see definition of "float" above) representing a price. Note the number of decimal places may vary.
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 |
|---|---|---|---|
| 6 | AvgPx | FIX 4.4, FIX 4.2 | 6 |
| 31 | LastPx | FIX 4.4, FIX 4.2 | 6 |
| 44 | Price | FIX 4.4, FIX 4.2 | 21 |
| 99 | StopPx | FIX 4.4, FIX 4.2 | 8 |
| 132 | BidPx | FIX 4.4, FIX 4.2 | 5 |
| 133 | OfferPx | FIX 4.4, FIX 4.2 | 5 |
| 140 | PrevClosePx | FIX 4.4, FIX 4.2 | 10 |
| 153 | AllocAvgPx | FIX 4.4, FIX 4.2 | 2 |
| 188 | BidSpotRate | FIX 4.4, FIX 4.2 | 5 |
| 190 | OfferSpotRate | FIX 4.4, FIX 4.2 | 5 |
| 194 | LastSpotRate | FIX 4.4, FIX 4.2 | 2 |
| 202 | StrikePrice | FIX 4.4, FIX 4.2 | 59 |
| 260 | BasisFeaturePrice | FIX 4.4 | 1 |
| 270 | MDEntryPx | FIX 4.4, FIX 4.2 | 2 |
| 316 | UnderlyingStrikePrice | FIX 4.4, FIX 4.2 | 59 |
| 332 | HighPx | FIX 4.4, FIX 4.2 | 1 |
| 333 | LowPx | FIX 4.4, FIX 4.2 | 1 |
| 366 | AllocPrice | FIX 4.4, FIX 4.2 | 4 |
| 426 | DayAvgPx | FIX 4.4, FIX 4.2 | 1 |
| 566 | LegPrice | FIX 4.4 | 5 |
| 612 | LegStrikePrice | FIX 4.4 | 50 |
| 631 | MidPx | FIX 4.4 | 5 |
| 637 | LegLastPx | FIX 4.4 | 3 |
| 640 | Price2 | FIX 4.4 | 5 |
| 645 | MktBidPx | FIX 4.4 | 3 |
| 646 | MktOfferPx | FIX 4.4 | 3 |
| 651 | UnderlyingLastPx | FIX 4.4 | 1 |
| 662 | BenchmarkPrice | FIX 4.4 | 22 |
| 669 | LastParPx | FIX 4.4 | 4 |
| 679 | LegBenchmarkPrice | FIX 4.4 | 5 |
| 681 | LegBidPx | FIX 4.4 | 2 |
| 684 | LegOfferPx | FIX 4.4 | 2 |
| 697 | YieldRedemptionPrice | FIX 4.4 | 17 |
| 730 | SettlPrice | FIX 4.4 | 2 |
| 732 | UnderlyingSettlPrice | FIX 4.4 | 2 |
| 734 | PriorSettlPrice | FIX 4.4 | 1 |
| 799 | OrderAvgPx | FIX 4.4 | 4 |
| 810 | UnderlyingPx | FIX 4.4 | 59 |
| 839 | PeggedPrice | FIX 4.4 | 1 |
| 845 | DiscretionPrice | FIX 4.4 | 1 |
| 860 | AvgParPx | FIX 4.4 | 3 |
| 861 | ReportedPx | FIX 4.4 | 1 |
| 867 | EventPx | FIX 4.4 | 59 |
| 882 | UnderlyingDirtyPrice | FIX 4.4 | 59 |
| 883 | UnderlyingEndPrice | FIX 4.4 | 59 |
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