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
- Session Establishment: Client sends Logon (35=A) with credentials. Broker responds with Logon acknowledgment.
- Sequence Synchronization: Both parties exchange sequence numbers. If out of sync, ResendRequest or SequenceReset is used.
- Heartbeat Mechanism: Regular Heartbeat (35=0) messages keep the session alive. TestRequest (35=1) can be sent to request immediate heartbeat.
- Order Submission: Client sends NewOrderSingle (35=D) with order details. Broker validates and processes.
- Execution Reports: Broker sends ExecutionReport (35=8) for order status updates (New, PartiallyFilled, Filled, Canceled, Rejected).
- Order Modifications: Client can send OrderCancelReplaceRequest (35=G) to modify or OrderCancelRequest (35=F) to cancel.
- 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 LogsRelated Resources
- FIX Protocol Overview – Detailed protocol explanation
- FIX Message Types – Complete MsgType reference
- FIX Tag Explorer – Explore FIX protocol tags
- FIX Troubleshooting Guide – Diagnostic procedures