FIX Doctorsupport@fixdoctor.tech
FIX Knowledge Base

FIX Protocol Guide

The Financial Information eXchange (FIX) protocol is a messaging standard used for real-time electronic trading. This guide provides a comprehensive overview of how FIX works, from session establishment to order execution.

FIX Protocol Layers

FIX operates in two main layers:

  • Session Layer: Handles connection management, message sequencing, and session-level messages (Logon, Logout, Heartbeat, TestRequest, Reject, SequenceReset, ResendRequest).
  • Application Layer: Contains business messages like orders (NewOrderSingle, OrderCancelRequest), executions (ExecutionReport), and market data.

FIX Message Flow Lifecycle

  1. Session Establishment: Client sends Logon (35=A) with credentials. Broker responds with Logon acknowledgment.
  2. Sequence Synchronization: Both parties exchange sequence numbers. If out of sync, ResendRequest or SequenceReset is used.
  3. Heartbeat Mechanism: Regular Heartbeat (35=0) messages keep the session alive. TestRequest (35=1) can be sent to request immediate heartbeat.
  4. Order Submission: Client sends NewOrderSingle (35=D) with order details. Broker validates and processes.
  5. Execution Reports: Broker sends ExecutionReport (35=8) for order status updates (New, PartiallyFilled, Filled, Canceled, Rejected).
  6. Order Modifications: Client can send OrderCancelReplaceRequest (35=G) to modify or OrderCancelRequest (35=F) to cancel.
  7. Session Termination: Either party sends Logout (35=5) to gracefully close the session.

Key FIX Concepts

Message Sequence Numbers

Each message has a MsgSeqNum (34) that increments by 1. Sequence numbers detect message loss and ensure ordering.

Tag=Value Format

FIX messages use tag=value pairs separated by SOH (ASCII 0x01) or other delimiters. Example: 35=D|11=ORDER123|55=AAPL

Message Types

MsgType (35) identifies the message: D=NewOrderSingle, 8=ExecutionReport, A=Logon, 0=Heartbeat, 3=Reject.

Analyze Your FIX Sessions

Upload or paste your FIX logs to see the complete message flow and diagnose any session or application layer issues.

Analyze FIX Logs

Related Resources