EncodedTextLen (FIX tag 354)
EncodedTextLen (tag 354) is a Length field defined in FIX 4.4 and FIX 4.2. It appears in 71 message types, always optionally.
At a glance
- Tag
- 354
- Name
- EncodedTextLen
- Datatype
- Length (int)
- Dialects
- FIX 4.4 and FIX 4.2
- Messages
- 71
What the specification says
FIX 4.4
Byte length of encoded (non-ASCII characters) EncodedText (355) field.
FIX 4.2
Byte length of encoded (non-ASCII characters) EncodedText field.
Descriptions are quoted from the FIX Orchestra sources under the Apache 2.0 licence.
A real message using tag 354
| Tag | Field | Wire value | Meaning |
|---|---|---|---|
| 8 | BeginString | FIX.4.4 | |
| 9 | BodyLength | 117 | |
| 35 | MsgType | D | Order – Single |
| 49 | SenderCompID | BOARTEAM | |
| 56 | TargetCompID | COUNTERPARTY | |
| 34 | MsgSeqNum | 2 | |
| 52 | SendingTime | 20240101-12:00:00.000 | |
| 11 | ClOrdID | ORD-10042 | |
| 54 | Side | 1 | Buy |
| 60 | TransactTime | 20240101-12:00:00.000 | |
| 40 | OrdType | 1 | Market |
| 354 | EncodedTextLen | 7 | |
| 10 | CheckSum | 007 |
Shown with | separators for readability. On the wire FIX uses SOH (0x01), an invisible control byte — and because BodyLength and CheckSum are computed over the actual bytes, the two forms have different checksums. Both are valid and both decode here.
Generated from the FIX 4.4 dictionary and verified at build time: it parses and validates with no issues. Open the decoder to try your own message.
Where tag 354 appears
Requiredness is a property of the message, not of the field: the same tag can be optional in one message and conditionally required in another.
| Message | MsgType | FIX 4.4 | FIX 4.2 | Where in the message |
|---|---|---|---|---|
| Advertisement | 7 | Conditional | Optional | directly on the message body |
| AllocationInstruction | J | Conditional | Optional | directly on the message body |
| AllocationInstructionAck | P | Conditional | Optional | directly on the message body |
| AllocationReport | AS | Conditional | — | directly on the message body |
| AllocationReportAck | AT | Conditional | — | directly on the message body |
| AssignmentReport | AW | Conditional | — | directly on the message body |
| BidRequest | k | Conditional | Optional | directly on the message body |
| BidResponse | l | Conditional | Optional | inside the BidCompRspGrp component |
| BusinessMessageReject | j | Conditional | Optional | directly on the message body |
| CollateralAssignment | AY | Conditional | — | directly on the message body |
| CollateralInquiry | BB | Conditional | — | directly on the message body |
| CollateralInquiryAck | BG | Conditional | — | directly on the message body |
| CollateralReport | BA | Conditional | — | directly on the message body |
| CollateralRequest | AX | Conditional | — | directly on the message body |
| CollateralResponse | AZ | Conditional | — | directly on the message body |
| Confirmation | AK | Conditional | — | directly on the message body |
| ConfirmationAck | AU | Conditional | — | directly on the message body |
| ConfirmationRequest | BH | Conditional | — | directly on the message body |
| CrossOrderCancelReplaceRequest | t | Conditional | — | inside the SideCrossOrdModGrp component |
| CrossOrderCancelRequest | u | Conditional | — | inside the SideCrossOrdCxlGrp component |
| DerivativeSecurityList | AA | Conditional | — | inside the RelSymDerivSecGrp component |
| DerivativeSecurityListRequest | z | Conditional | — | directly on the message body |
| DontKnowTrade | Q | Conditional | Optional | directly on the message body |
| C | Conditional | Optional | inside the LinesOfTextGrp component | |
| ExecutionReport | 8 | Conditional | Optional | directly on the message body |
| IOI | 6 | Conditional | Optional | directly on the message body |
| ListCancelRequest | K | Conditional | Optional | directly on the message body |
| ListExecute | L | Conditional | Optional | directly on the message body |
| ListStatus | N | Conditional | Optional | inside the OrdListStatGrp component |
| ListStatusRequest | M | Conditional | Optional | directly on the message body |
| ListStrikePrice | m | Optional | Optional | inside the UndInstrmtStrkPxGrp component |
| Logout | 5 | Conditional | Optional | directly on the message body |
| MarketDataIncrementalRefresh | X | Conditional | Optional | inside the MDIncGrp component |
| MarketDataRequestReject | Y | Conditional | Optional | directly on the message body |
| MarketDataSnapshotFullRefresh | W | Conditional | Optional | inside the MDFullGrp component |
| MassQuoteAcknowledgement | b | Conditional | — | directly on the message body |
| MultilegOrderCancelReplace | AC | Conditional | — | directly on the message body |
| NewOrderCross | s | Conditional | — | inside the SideCrossOrdModGrp component |
| NewOrderList | E | Conditional | Optional | inside the ListOrdGrp component |
| NewOrderMultileg | AB | Conditional | — | directly on the message body |
| NewOrderSingle | D | Conditional | Optional | directly on the message body |
| News | B | Conditional | Optional | inside the LinesOfTextGrp component |
| OrderCancelReject | 9 | Conditional | Optional | directly on the message body |
| OrderCancelReplaceRequest | G | Conditional | Optional | directly on the message body |
| OrderCancelRequest | F | Conditional | Optional | directly on the message body |
| OrderMassCancelReport | r | Conditional | — | directly on the message body |
| OrderMassCancelRequest | q | Conditional | — | directly on the message body |
| PositionMaintenanceReport | AM | Conditional | — | directly on the message body |
| PositionMaintenanceRequest | AL | Conditional | — | directly on the message body |
| PositionReport | AP | Conditional | — | directly on the message body |
| Quote | S | Conditional | — | directly on the message body |
| QuoteRequest | R | Conditional | — | directly on the message body |
| QuoteRequestReject | AG | Conditional | — | directly on the message body |
| QuoteResponse | AJ | Conditional | — | directly on the message body |
| QuoteStatusReport | AI | Conditional | — | directly on the message body |
| Reject | 3 | Conditional | Optional | directly on the message body |
| RequestForPositions | AN | Conditional | — | directly on the message body |
| RequestForPositionsAck | AO | Conditional | — | directly on the message body |
| SecurityDefinition | d | Conditional | Optional | directly on the message body |
| SecurityDefinitionRequest | c | Conditional | Optional | directly on the message body |
| SecurityList | y | Conditional | — | inside the SecListGrp component |
| SecurityListRequest | x | Conditional | — | directly on the message body |
| SecurityStatus | f | Conditional | — | directly on the message body |
| SecurityTypeRequest | v | Conditional | — | directly on the message body |
| SecurityTypes | w | Conditional | — | directly on the message body |
| SettlementInstructions | T | Conditional | — | directly on the message body |
| TradeCaptureReport | AE | Conditional | — | inside the TrdCapRptSideGrp component |
| TradeCaptureReportAck | AR | Conditional | — | directly on the message body |
| TradeCaptureReportRequest | AD | Conditional | — | directly on the message body |
| TradeCaptureReportRequestAck | AQ | Conditional | — | directly on the message body |
| TradingSessionStatus | h | Conditional | Optional | directly on the message body |
Wire format
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. @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.
Read tag 354 in TypeScript
import { createFixEngine } from "@boarteam/fix";import { dictionary } from "@boarteam/fix-dict-fix44";const fix = createFixEngine(dictionary);const { message, issues } = fix.parse(raw);const field = message.fields[354];field?.name; // "EncodedTextLen"field?.raw; // the verbatim wire stringfield?.value; // coerced to a numberOther Length fields
- 352EncodedListExecInstLen
- 356EncodedSubjectLen
- 350EncodedSecurityDescLen
- 358EncodedHeadlineLen
- 348EncodedIssuerLen
- 360EncodedAllocTextLen
- 362EncodedUnderlyingIssuerLen
- 364EncodedUnderlyingSecurityDescLen
- 383MaxMessageSize
- 445EncodedListStatusTextLen
- 212XmlDataLen
- 95RawDataLength
- 93SignatureLength
- 90SecureDataLen
- 618EncodedLegIssuerLen
- 621EncodedLegSecurityDescLen
- 9BodyLength
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