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
AllocationInstructionAlertBMOptionaldirectly on the message body
AllocationReportASConditionalOptionaldirectly on the message body
AllocationReportAckATConditionalOptionaldirectly on the message body
ApplicationMessageReportBYOptionaldirectly on the message body
ApplicationMessageRequestBWOptionaldirectly on the message body
ApplicationMessageRequestAckBXOptionaldirectly on the message body
AssignmentReportAWConditionalOptionaldirectly on the message body
BidRequestkConditionalOptionalOptionaldirectly on the message body
BidResponselConditionalOptionalOptionalinside the BidCompRspGrp component
BusinessMessageRejectjConditionalOptionalOptionaldirectly on the message body
CollateralAssignmentAYConditionalOptionaldirectly on the message body
CollateralInquiryBBConditionalOptionaldirectly on the message body
CollateralInquiryAckBGConditionalOptionaldirectly on the message body
CollateralReportBAConditionalOptionaldirectly on the message body
CollateralRequestAXConditionalOptionaldirectly on the message body
CollateralResponseAZConditionalOptionaldirectly on the message body
ConfirmationAKConditionalOptionaldirectly on the message body
ConfirmationAckAUConditionalOptionaldirectly on the message body
ConfirmationRequestBHConditionalOptionaldirectly on the message body
ContraryIntentionReportBOOptionaldirectly on the message body
CrossOrderCancelReplaceRequesttConditionalOptionalinside the SideCrossOrdModGrp component
CrossOrderCancelRequestuConditionalOptionalinside the SideCrossOrdCxlGrp component
DerivativeSecurityListAAConditionalOptionalinside the RelSymDerivSecGrp component
DerivativeSecurityListRequestzConditionalOptionaldirectly on the message body
DerivativeSecurityListUpdateReportBROptionalinside the RelSymDerivSecUpdGrp component
DontKnowTradeQConditionalOptionalOptionaldirectly on the message body
EmailCConditionalOptionalOptionalinside the LinesOfTextGrp component
ExecutionAcknowledgementBNOptionaldirectly 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
LogonAOptionaldirectly on the message body
Logout5ConditionalOptionalOptionaldirectly on the message body
MarketDataIncrementalRefreshXConditionalOptionalOptionalinside the MDIncGrp component
MarketDataRequestRejectYConditionalOptionalOptionaldirectly on the message body
MarketDataSnapshotFullRefreshWConditionalOptionalOptionalinside the MDFullGrp component
MarketDefinitionBUOptionaldirectly on the message body
MarketDefinitionUpdateReportBVOptionaldirectly on the message body
MassQuoteAcknowledgementbConditionalOptionaldirectly on the message body
MultilegOrderCancelReplaceACConditionalOptionaldirectly on the message body
NewOrderCrosssConditionalOptionalinside the SideCrossOrdModGrp component
NewOrderListEConditionalOptionalOptionalinside the ListOrdGrp component
NewOrderMultilegABConditionalOptionaldirectly 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
OrderMassActionReportBZOptionaldirectly on the message body
OrderMassActionRequestCAOptionaldirectly on the message body
OrderMassCancelReportrConditionalOptionaldirectly on the message body
OrderMassCancelRequestqConditionalOptionaldirectly on the message body
PositionMaintenanceReportAMConditionalOptionaldirectly on the message body
PositionMaintenanceRequestALConditionalOptionaldirectly on the message body
PositionReportAPConditionalOptionaldirectly on the message body
QuoteSConditionalOptionaldirectly on the message body
QuoteRequestRConditionalOptionaldirectly on the message body
QuoteRequestRejectAGConditionalOptionaldirectly on the message body
QuoteResponseAJConditionalOptionaldirectly on the message body
QuoteStatusReportAIConditionalOptionaldirectly on the message body
Reject3ConditionalOptionalOptionaldirectly on the message body
RequestForPositionsANConditionalOptionaldirectly on the message body
RequestForPositionsAckAOConditionalOptionaldirectly on the message body
SecurityDefinitiondConditionalOptionalOptionaldirectly on the message body
SecurityDefinitionRequestcConditionalOptionalOptionaldirectly on the message body
SecurityDefinitionUpdateReportBPOptionaldirectly on the message body
SecurityListyConditionalOptionalinside the SecListGrp component
SecurityListRequestxConditionalOptionaldirectly on the message body
SecurityListUpdateReportBKOptionalinside the SecLstUpdRelSymGrp component
SecurityStatusfConditionalOptionaldirectly on the message body
SecurityTypeRequestvConditionalOptionaldirectly on the message body
SecurityTypeswConditionalOptionaldirectly on the message body
SettlementInstructionsTConditionalOptionaldirectly on the message body
SettlementObligationReportBQOptionaldirectly on the message body
StreamAssignmentReportCDOptionalinside StrmAsgnRptGrp › StrmAsgnRptInstrmtGrp
StreamAssignmentReportACKCEOptionaldirectly on the message body
TradeCaptureReportAEConditionalOptionalinside the TrdCapRptSideGrp component
TradeCaptureReportAckARConditionalOptionaldirectly on the message body
TradeCaptureReportRequestADConditionalOptionaldirectly on the message body
TradeCaptureReportRequestAckAQConditionalOptionaldirectly on the message body
TradingSessionListBJOptionalinside the TrdSessLstGrp component
TradingSessionListUpdateReportBSOptionalinside the TrdSessLstGrp component
TradingSessionStatushConditionalOptionalOptionaldirectly on the message body
UserNotificationCBOptionaldirectly 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