Length

base: intFIX 4.4FIX 4.2

Length is a FIX datatype defined in FIX 4.4 and FIX 4.2, carried on the wire as int. 18 fields use it.

Wire format

Base type
int
Fields
18

A byte count for the length-prefixed field that follows it. Count bytes, not characters — a multi-byte UTF-8 value makes the two differ.

What the specification says

int field representing the length in bytes. Value must be positive.

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

TagFieldDialectsMessages
9BodyLengthFIX 4.4, FIX 4.293
90SecureDataLenFIX 4.4, FIX 4.293
93SignatureLengthFIX 4.4, FIX 4.293
95RawDataLengthFIX 4.4, FIX 4.24
212XmlDataLenFIX 4.4, FIX 4.293
348EncodedIssuerLenFIX 4.4, FIX 4.259
350EncodedSecurityDescLenFIX 4.4, FIX 4.259
352EncodedListExecInstLenFIX 4.4, FIX 4.21
354EncodedTextLenFIX 4.4, FIX 4.271
356EncodedSubjectLenFIX 4.4, FIX 4.21
358EncodedHeadlineLenFIX 4.4, FIX 4.21
360EncodedAllocTextLenFIX 4.4, FIX 4.24
362EncodedUnderlyingIssuerLenFIX 4.4, FIX 4.259
364EncodedUnderlyingSecurityDescLenFIX 4.4, FIX 4.259
383MaxMessageSizeFIX 4.4, FIX 4.21
445EncodedListStatusTextLenFIX 4.4, FIX 4.21
618EncodedLegIssuerLenFIX 4.450
621EncodedLegSecurityDescLenFIX 4.450

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