Length

base: intFIX 4.4FIX 4.2FIX 5.0 SP2

Length is a FIX datatype defined in FIX 4.4, FIX 4.2 and FIX 5.0 SP2, 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

FIX 4.4

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

FIX 5.0 SP2

Sequence of digits without commas or decimals. 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

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