FIX Protocol: The Communication Backbone of Trading Ecosystems

Understanding FIX (Financial Information Exchange) protocol - the industry standard for electronic communication in financial markets, order execution, and trading workflows.

  • FIX Protocol
  • Trading
  • Financial Systems
  • Communication
  • Order Execution
  • Market Data

The FIX (Financial Information Exchange) protocol is the de facto standard for electronic communication between financial institutions, brokers, traders, and exchanges. Nearly every trade executed in global financial markets involves FIX protocol communication at some point.


๐Ÿ“Š What is FIX Protocol?

FIX is a standardized messaging protocol designed to facilitate the exchange of information about securities transactions and market data between buyers and sellers in real-time.

Key Characteristics:

  • Open Standard - Maintained by the FIX Trading Community
  • Language-Agnostic - Works across all programming languages and platforms
  • Efficient - Text-based format with minimal overhead
  • Extensible - Supports custom fields and message types
  • Pervasive - Used in 90%+ of institutional trading infrastructure

๐Ÿ—๏ธ FIX Protocol Structure

Message Format

A FIX message consists of:

  • Begin String - Protocol version (e.g., FIX.4.4)
  • Body Length - Length of the message body
  • Message Type - Single character identifying the message (e.g., D = New Order, 0 = Heartbeat)
  • Fields - Key-value pairs separated by SOH (Start of Header) character
  • Checksum - Three-byte checksum for message validation

Example FIX Message

8=FIX.4.4|9=123|35=D|49=SENDER|56=TARGET|34=1|52=20260410-12:30:45|
11=ORDER123|55=AAPL|54=1|38=100|40=2|44=150.25|...

Where:

  • 8 = Begin String
  • 9 = Body Length
  • 35 = Message Type (D = New Order)
  • 49 = Sender ID
  • 56 = Target ID
  • 34 = Message Sequence Number
  • 52 = Send Time

๐Ÿ”‘ Common FIX Message Types

Msg TypeCodePurpose
Heartbeat0Keep connection alive
Test Request1Test connection
LogonAEstablish session
Logout5End session
New OrderDSubmit trading order
Order Cancel RequestFCancel existing order
Order Status RequestHQuery order status
Execution Report8Confirm trade execution
Market DataWQuote/price updates
Trade CaptureAEReport executed trades

๐Ÿ“จ Common FIX Fields

Session & Routing Fields

TagField NameDescription
8BeginStringProtocol version (e.g., FIX.4.4)
9BodyLengthLength of message body in bytes
34MsgSeqNumSequence number (incremental)
35MsgTypeType of message (A=Logon, D=New Order, etc.)
49SenderCompIDSender identifier
56TargetCompIDRecipient identifier
142SenderSubIDSender sub-identifier (optional)
143TargetSubIDTarget sub-identifier (optional)
108HeartBtIntHeartbeat interval (seconds)
98EncryptMethod0=None, 1=PKCS, 2=DES (encryption type)

Time & Date Fields

TagField NameDescriptionExample
52SendingTimeMessage send time (UTC)20260410-12:30:45.123
60TransactTimeTransaction execution time20260410-12:30:45
273ValidUntilTimeOrder valid until time20260410-17:00:00
108ExpireTimeSession expiration time20260410-16:30:00
225MaturityDateSecurity maturity date20360415
200MaturityMonthYearMaturity month/year202604

Account & Party Fields

TagField NameDescriptionExample
1AccountAccount identifierACC_12345
109ClientIDClient identifierCLIENT_001
110ClOrdLinkIDLink to related orderORDER_PARENT_1
453NoPartyIDsNumber of parties2
454PartyIDSourceIdentifier source (1=CUSIP, D=DUNS, B=Bloomberg)D
455PartyRoleRole of party (1=Exec, 2=Broker, 3=Client)2

Order Details Fields

TagField NameDescription
11ClOrdIDClient-assigned order ID
37OrderIDBroker-assigned order ID
55SymbolSecurity symbol (e.g., AAPL, EURUSD)
107SecurityDescText description of security
54Side1=Buy, 2=Sell, 3=Buy minus, 4=Sell plus
38OrderQtyOrder quantity (shares, contracts, lots)
40OrdType1=Market, 2=Limit, 3=Stop, 4=Stop Limit, 5=Trailing Stop
44PriceLimit order price
99StopPxStop price for stop orders
59TimeInForce0=Day, 1=GTC, 3=IOC, 4=FOK, 5=GTX, 6=GTD
18ExecInstExecution instructions (M=Manual, P=Do not initiate)
21HandlInstHandling instruction (1=Automated, 2=Manual)

Order Status & Rejection Fields

TagField NameDescription
39OrdStatus0=New, 1=Partial, 2=Filled, 4=Cancelled, 5=Replaced, 8=Rejected, A=Pending
103OrdRejReasonReason for order rejection (1=Bad price, 2=Bad quantity, 10=Unsupported order type)
58TextFree-format text explaining order status
150ExecType0=New, 1=Partial, 2=Fill, 3=DoneForDay, 4=Cancelled, 5=Replaced, 6=PendingCancel

Fill & Execution Details

TagField NameDescription
32LastQtyQuantity filled in this execution
31LastPxPrice of last fill
151LeavesQtyRemaining quantity to be filled
14CumQtyTotal cumulative quantity filled
6AvgPxAverage price of fills
17ExecIDExecution identifier
20ExecTransType0=New, 1=Cancel, 2=Correct, 3=Status

Fees & Commission Fields

TagField NameDescriptionExample
12CommissionCommission amount50.00
13CommType1=Percent, 2=Absolute, 3=Per unit2
479OrderCapacityCapacity (A=Agency, P=Principal, R=Riskless)A
378ExecRestatementReasonReason for restatement0

Risk & Limit Fields

TagField NameDescriptionExample
277TradeStatusTrade status (0=Accepted, 7=Rejected)0
378ExecRestatementReasonReason for restatement/rejectionAccount limit exceeded
208ApplVerIDApplication version IDFIX.4.4

๏ฟฝ Quick Reference: Tags by Product Type

Equity & Futures Tags

TagField NameUsageExample
55SymbolStock/Futures symbolAAPL, ESZ26 (E-mini S&P 500 Dec 2026)
107SecurityDescSecurity descriptionApple Inc., S&P 500 Dec Futures
54Side1=Buy, 2=Sell1 (Buy)
38OrderQtyOrder quantity100 shares or contracts
40OrdType1=Market, 2=Limit, 3=Stop2 (Limit Order)
44PriceLimit order price150.25
99StopPxStop price for stop orders145.00
59TimeInForce0=Day, 1=GTC, 3=IOC, 4=FOK0 (End of Day)
18ExecInstExecution instructionsM=Manual execution, P=Participate do not initiate

Options-Specific Tags

TagField NameUsageExample
55SymbolOption underlying symbolAAPL
200MaturityMonthYearOption expiration202604 (April 2026)
202StrikePriceStrike price of option155.00
207SecurityTypeUnderlying security typeOPT (Option)
461CFICodeISO classification of securityOCAXPS = Call Option
462OptPayAmountOption payout amount-
201PutOrCall0=Put, 1=Call1 (Call Option)
37OrderIDBroker-assigned order IDOPT_ORDER_001
38OrderQtyNumber of contracts10 (10 option contracts = 1000 shares)
40OrdType1=Market, 2=Limit2 (Limit)
44PricePremium per contract3.50

Strategy/Multi-Leg Tags

TagField NameUsageExample
453NoPartyIDsNumber of parties in message2
454PartyIDSourceIdentifier sourceD=DUNS, 1=CUSIP, B=Bloomberg
385ListIDList identifier for multi-leg ordersSTRAT_001
386ListExecTypeExecution type of list0=Immediate, 1=Wait for Execution
394EncodedListExecInstEncoded execution instruction-
555NoLegsNumber of legs in multileg security2 (Spread: Long Call + Short Call)
600LegSymbolSymbol of leg securityAAPL (leg 1), SPY (leg 2)
601LegSymbolSfxLeg security suffixCD (when issued)
602LegSecurityIDSecurity ID of leg-
608LegPriceTypePrice type of leg1=Percentage, 2=Per unit
609LegQtyQuantity for this leg100 (buy), -100 (sell for spread)
611LegSideSide of leg1=Buy leg, 2=Sell leg
624LegRefIDReference ID of leg-

Interest Rate & Fixed Income Tags

TagField NameUsageExample
107SecurityDescBond descriptionUS Treasury 10Y
207SecurityTypeBOND, FUT (Bond Futures)BOND
56TargetCompIDYield to maturity4.25
108CouponRateCoupon rate of bond3.50
225MaturityDateMaturity date20360415 (April 15, 2036)
212XmlDataLenXML data length for complex bonds-
213XmlDataXML formatted data-

Repo & Financing Tags

TagField NameUsageExample
55SymbolUnderlying security symbolUST 10Y
54Side1=Buy/Borrow, 2=Sell/Lend1 (Repo): Borrow cash, lend security
38OrderQtyAmount in basis quantity1000000 (par value)
44PriceRepo rate4.75
108TermTerm of repo in days30
196ContAmtTypeContract amount type-

FX (Forex) Tags

TagField NameUsageExample
55SymbolCurrency pairEUR/USD or EURUSD
54Side1=Buy base, 2=Sell base1 (Buy EUR, Sell USD)
38OrderQtyAmount in base currency1000000 (1M EUR)
40OrdType1=Market, 2=Limit, 3=Stop2 (Limit)
44PriceExchange rate1.0950
273ValidUntilTimeTime order is valid until20260410-17:00:00

Product-Type Indicators

TagField NameValuesUsage
207SecurityTypeEQUITY, FUT, OPT, BOND, CORP, FOREX, MMNOTESIdentifies instrument type
461CFICodeFirst character identifies category, rest for detailsStandardized classification
555NoLegsIntegerPresent only in multi-leg strategies

๏ฟฝ๐Ÿ”„ Typical FIX Communication Flow

Trader/Application          FIX Session           Broker/Exchange
        |                       |                        |
        |--- Logon (A) -------->|                        |
        |<--- Logon Response ---|                        |
        |                       |--- Logon (A) -------->|
        |                       |<--- Logon Response ---|
        |                       |                        |
        |--- New Order (D) ---->|                        |
        |                       |--- New Order (D) ----->|
        |                       |<--- Execution Rpt (8) -|
        |<--- Execution Rpt (8) |                        |
        |                       |                        |
        |--- Logout (5) ------->|                        |
        |<--- Logout Response --|                        |
        |                       |--- Logout (5) ------->|
        |                       |<--- Logout Response --|

๐Ÿ’ป FIX Session Management

Session Establishment (Logon)

A client initiates a session with authentication credentials:

35=A (Message Type: Logon)
49=TRADER_APP (Sender)
56=BROKER (Target)
34=1 (Sequence Number)
108=30 (Heartbeat Interval - every 30 seconds)
98=0 (No encryption)
141=Y (Reset sequence numbers)

Heartbeat

To keep the connection alive, heartbeats are sent at regular intervals (typically 30 seconds):

35=0 (Heartbeat)
49=TRADER_APP
56=BROKER
34=2

Session Termination (Logout)

35=5 (Logout)
49=TRADER_APP
56=BROKER
34=100
58=End of trading day

๐Ÿ›’ Order Workflow Example

Step 1: Submit Order

35=D (New Order)
11=ORDER_20260410_001 (Client Order ID)
55=AAPL (Symbol)
54=1 (Side: Buy)
38=100 (Quantity)
40=2 (Order Type: Limit)
44=150.25 (Price)

Step 2: Broker Acknowledges

35=8 (Execution Report)
37=BROKER_ORDER_123 (Order ID)
39=0 (Order Status: New)
150=0 (Exec Type: New)
151=100 (Leaves Qty)

Step 3: Partial Fill

35=8 (Execution Report)
37=BROKER_ORDER_123
39=1 (Order Status: Partially Filled)
150=F (Exec Type: Partial Fill)
32=50 (Last Qty Filled)
31=150.25 (Last Price)
151=50 (Leaves Qty)

Step 4: Full Fill

35=8 (Execution Report)
37=BROKER_ORDER_123
39=2 (Order Status: Filled)
150=2 (Exec Type: Filled)
32=50 (Last Qty Filled)
151=0 (Leaves Qty)

๐Ÿ” Security Considerations

Authentication

  • Username/password in Logon message
  • TLS/SSL encryption for transport
  • Message sequencing to prevent replay attacks

Message Integrity

  • Checksum validation
  • Sequence number tracking
  • Duplicate detection

Compliance

  • Audit trail of all messages
  • Immutable order records
  • Regulatory reporting (MiFID II, Dodd-Frank, etc.)

๐Ÿš€ FIX Protocol in Production

Common Use Cases

  1. Equity Trading - Buy/sell stocks, ETFs
  2. Options Trading - Complex derivatives
  3. Fixed Income - Bond trading
  4. Forex - Currency trading
  5. Market Data Distribution - Real-time quotes and analytics

Key Players Using FIX

  • Investment Banks (JPMorgan, Goldman Sachs, Deutsche Bank)
  • Brokerages (Interactive Brokers, Charles Schwab)
  • Exchanges (NYSE, NASDAQ, London Stock Exchange)
  • Market Data Providers (Bloomberg, Reuters)
  • Trading Platforms (TD Ameritrade, Interactive Brokers API)

๐Ÿ“š FIX Protocol Versions

  • FIX 4.0 - Original version (1992)
  • FIX 4.2 - Standard for derivatives
  • FIX 4.4 - Most widely used (2006)
  • FIX 5.0 - Latest major version (2009)
  • FIXT 1.1 - Transport layer protocol

The version used depends on exchange requirements and trading workflows.


๐Ÿ› ๏ธ Implementing FIX

quickfixj (Java)

SocketAcceptor acceptor = new SocketAcceptor(
    application, 
    messageStoreFactory, 
    settings);
acceptor.start();

QuickFIX (C++)

FIX::SessionSettings settings("session_config.cfg");
FIX::SocketAcceptor acceptor(application, storeFactory, settings);
acceptor.start();

python-quickfix (Python)

import quickfix as fix
settings = fix.SessionSettings("config.cfg")
store = fix.FileStoreFactory(settings)
log = fix.FileLogFactory(settings)
initiator = fix.SocketInitiator(application, store, settings, log)
initiator.start()

โš™๏ธ Protocol Customization

Custom Fields

Exchanges and brokers often define field ranges for custom data:

  • User-Defined Fields: 5000-9999
  • Exchange-specific fields extend base FIX functionality

Message Extensions

  • Trade capture reports with additional data
  • Risk parameters and position limits
  • Custom matching rules

๐ŸŽฏ Advantages of FIX Protocol

โœ… Standardization - Industry-wide adoption
โœ… Efficiency - Minimal latency and overhead
โœ… Reliability - Robust error handling and sequencing
โœ… Flexibility - Extensible with custom fields
โœ… Security - Built-in authentication and checksums
โœ… Interoperability - Works across all systems and languages


๐Ÿ“– Resources