int
base: intFIX 4.4FIX 4.2
int is a FIX datatype defined in FIX 4.4 and FIX 4.2, carried on the wire as int. 193 fields use it.
Wire format
- Base type
- int
- Fields
- 193
A whole number, optionally signed. Leading zeros are legal on the wire and are preserved in the raw value.
What the specification says
Sequence of digits without commas or decimals and optional sign character (ASCII characters "-" and "0" - "9" ). The sign character utilizes one byte (i.e. positive int is "99999" while negative int is "-99999"). Note that int values may contain leading zeros (e.g. "00023" = "23"). Examples: 723 in field 21 would be mapped int as |21=723|. -723 in field 12 would be mapped int as |12=-723| The following data types are based on int.
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-int when it does not lex as one; the raw string is kept either way.
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