EncodedTextLen (FIX tag 354)

LengthFIX 4.4FIX 4.2FIX 5.0 SP2

EncodedTextLen (tag 354) is a Length field defined in FIX 4.4, FIX 4.2 and FIX 5.0 SP2. It appears in 71 message types, always optionally.

At a glance

Tag
354
Name
EncodedTextLen
Datatype
Length (int)
Dialects
FIX 4.4, FIX 4.2 and FIX 5.0 SP2
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.

FIX 5.0 SP2

Length in octets of EncodedText(355).

Descriptions are quoted from the FIX Orchestra sources under the Apache 2.0 licence.

A real message using tag 354

NewOrderSingle · FIX 4.4
TagFieldWire valueMeaning
8BeginStringFIX.4.4
9BodyLength117
35MsgTypeDOrder – Single
49SenderCompIDBOARTEAM
56TargetCompIDCOUNTERPARTY
34MsgSeqNum2
52SendingTime20240101-12:00:00.000
11ClOrdIDORD-10042
54Side1Buy
60TransactTime20240101-12:00:00.000
40OrdType1Market
354EncodedTextLen7
10CheckSum007
Edit and decode it yourself

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.

Open in the full decoder →

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.

MessageMsgTypeFIX 4.4FIX 4.2FIX 5.0 SP2Where in the message
Advertisement7ConditionalOptionalOptionaldirectly on the message body
AllocationInstructionJConditionalOptionalOptionaldirectly on the message body
AllocationInstructionAckPConditionalOptionalOptionaldirectly on the message body
AllocationInstructionAlertBM——Optionaldirectly on the message body
AllocationReportASConditional—Optionaldirectly on the message body
AllocationReportAckATConditional—Optionaldirectly on the message body
ApplicationMessageReportBY——Optionaldirectly on the message body
ApplicationMessageRequestBW——Optionaldirectly on the message body
ApplicationMessageRequestAckBX——Optionaldirectly on the message body
AssignmentReportAWConditional—Optionaldirectly on the message body
BidRequestkConditionalOptionalOptionaldirectly on the message body
BidResponselConditionalOptionalOptionalinside the BidCompRspGrp component
BusinessMessageRejectjConditionalOptionalOptionaldirectly on the message body
CollateralAssignmentAYConditional—Optionaldirectly on the message body
CollateralInquiryBBConditional—Optionaldirectly on the message body
CollateralInquiryAckBGConditional—Optionaldirectly on the message body
CollateralReportBAConditional—Optionaldirectly on the message body
CollateralRequestAXConditional—Optionaldirectly on the message body
CollateralResponseAZConditional—Optionaldirectly on the message body
ConfirmationAKConditional—Optionaldirectly on the message body
ConfirmationAckAUConditional—Optionaldirectly on the message body
ConfirmationRequestBHConditional—Optionaldirectly on the message body
ContraryIntentionReportBO——Optionaldirectly on the message body
CrossOrderCancelReplaceRequesttConditional—Optionalinside the SideCrossOrdModGrp component
CrossOrderCancelRequestuConditional—Optionalinside the SideCrossOrdCxlGrp component
DerivativeSecurityListAAConditional—Optionalinside the RelSymDerivSecGrp component
DerivativeSecurityListRequestzConditional—Optionaldirectly on the message body
DerivativeSecurityListUpdateReportBR——Optionalinside the RelSymDerivSecUpdGrp component
DontKnowTradeQConditionalOptionalOptionaldirectly on the message body
EmailCConditionalOptionalOptionalinside the LinesOfTextGrp component
ExecutionAcknowledgementBN——Optionaldirectly on the message body
ExecutionReport8ConditionalOptionalOptionaldirectly on the message body
IOI6ConditionalOptionalOptionaldirectly on the message body
ListCancelRequestKConditionalOptionalOptionaldirectly on the message body
ListExecuteLConditionalOptionalOptionaldirectly on the message body
ListStatusNConditionalOptionalOptionalinside the OrdListStatGrp component
ListStatusRequestMConditionalOptionalOptionaldirectly on the message body
ListStrikePricemOptionalOptionalOptionalinside the UndInstrmtStrkPxGrp component
LogonA——Optionaldirectly on the message body
Logout5ConditionalOptionalOptionaldirectly on the message body
MarketDataIncrementalRefreshXConditionalOptionalOptionalinside the MDIncGrp component
MarketDataRequestRejectYConditionalOptionalOptionaldirectly on the message body
MarketDataSnapshotFullRefreshWConditionalOptionalOptionalinside the MDFullGrp component
MarketDefinitionBU——Optionaldirectly on the message body
MarketDefinitionUpdateReportBV——Optionaldirectly on the message body
MassQuoteAcknowledgementbConditional—Optionaldirectly on the message body
MultilegOrderCancelReplaceACConditional—Optionaldirectly on the message body
NewOrderCrosssConditional—Optionalinside the SideCrossOrdModGrp component
NewOrderListEConditionalOptionalOptionalinside the ListOrdGrp component
NewOrderMultilegABConditional—Optionaldirectly on the message body
NewOrderSingleDConditionalOptionalOptionaldirectly on the message body
NewsBConditionalOptionalOptionalinside the LinesOfTextGrp component
OrderCancelReject9ConditionalOptionalOptionaldirectly on the message body
OrderCancelReplaceRequestGConditionalOptionalOptionaldirectly on the message body
OrderCancelRequestFConditionalOptionalOptionaldirectly on the message body
OrderMassActionReportBZ——Optionaldirectly on the message body
OrderMassActionRequestCA——Optionaldirectly on the message body
OrderMassCancelReportrConditional—Optionaldirectly on the message body
OrderMassCancelRequestqConditional—Optionaldirectly on the message body
PositionMaintenanceReportAMConditional—Optionaldirectly on the message body
PositionMaintenanceRequestALConditional—Optionaldirectly on the message body
PositionReportAPConditional—Optionaldirectly on the message body
QuoteSConditional—Optionaldirectly on the message body
QuoteRequestRConditional—Optionaldirectly on the message body
QuoteRequestRejectAGConditional—Optionaldirectly on the message body
QuoteResponseAJConditional—Optionaldirectly on the message body
QuoteStatusReportAIConditional—Optionaldirectly on the message body
Reject3ConditionalOptionalOptionaldirectly on the message body
RequestForPositionsANConditional—Optionaldirectly on the message body
RequestForPositionsAckAOConditional—Optionaldirectly on the message body
SecurityDefinitiondConditionalOptionalOptionaldirectly on the message body
SecurityDefinitionRequestcConditionalOptionalOptionaldirectly on the message body
SecurityDefinitionUpdateReportBP——Optionaldirectly on the message body
SecurityListyConditional—Optionalinside the SecListGrp component
SecurityListRequestxConditional—Optionaldirectly on the message body
SecurityListUpdateReportBK——Optionalinside the SecLstUpdRelSymGrp component
SecurityStatusfConditional—Optionaldirectly on the message body
SecurityTypeRequestvConditional—Optionaldirectly on the message body
SecurityTypeswConditional—Optionaldirectly on the message body
SettlementInstructionsTConditional—Optionaldirectly on the message body
SettlementObligationReportBQ——Optionaldirectly on the message body
StreamAssignmentReportCD——Optionalinside StrmAsgnRptGrp › StrmAsgnRptInstrmtGrp
StreamAssignmentReportACKCE——Optionaldirectly on the message body
TradeCaptureReportAEConditional—Optionalinside the TrdCapRptSideGrp component
TradeCaptureReportAckARConditional—Optionaldirectly on the message body
TradeCaptureReportRequestADConditional—Optionaldirectly on the message body
TradeCaptureReportRequestAckAQConditional—Optionaldirectly on the message body
TradingSessionListBJ——Optionalinside the TrdSessLstGrp component
TradingSessionListUpdateReportBS——Optionalinside the TrdSessLstGrp component
TradingSessionStatushConditionalOptionalOptionaldirectly on the message body
UserNotificationCB——Optionaldirectly 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

decode.tsts
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 number

Other Length fields

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