FIX 4.4 Protocol Reference
Welcome to the FIX 4.4 Protocol Reference. This documentation provides a comprehensive guide to the FIX 4.4 (Financial Information eXchange) protocol, the industry standard for electronic trading communication.
Note: Madeo applications implement the standard FIX 4.4 protocol described in this reference for high-frequency trading operations. This allows users to connect to our platform using industry-standard specifications and practices.
Information: This documentation assumes a basic understanding of the FIX Protocol. For a complete reference of FIX 4.4, please refer to the FIX Trading Community website.
Introduction to FIX Protocol
The Financial Information eXchange (FIX) Protocol is a series of messaging specifications for the electronic communication of trade-related messages. It has become the standard electronic protocol for pre-trade communications and trade execution in the global equity markets and is expanding into the post-trade space.
Key Features of FIX 4.4
- Industry standard for electronic trading communication
- Support for multi-asset class trading
- Enhanced order management capabilities
- Robust transaction processing
- Real-time market data access
- Comprehensive post-trade processing
Connection Settings
Standard connection parameters for FIX 4.4 protocol:
Parameter | Standard Value | Notes |
---|---|---|
FIX Version | 4.4 | Standard version identifier |
Transport Protocol | TCP/IP | Standard transport layer |
SenderCompID | Client identifier | Unique identifier for sending party |
TargetCompID | Server identifier | Unique identifier for receiving party |
HeartBeat Interval | 30 seconds | Standard timeout interval |
Reset Sequence Number | Y (daily) | Common practice for session management |
Session Establishment
To establish a standard FIX 4.4 session:
- Initiate a TCP/IP connection to the appropriate host and port
- Send a Logon message (35=A) with authentication credentials
- Wait for a Logon response from the server
- Begin exchanging application messages
Sample Logon Message:
8=FIX.4.4|9=120|35=A|49=CLIENT123|56=SERVER456|34=1|52=20210315-12:30:45.123|98=0|108=30|141=Y|553=USERNAME|554=PASSWORD|10=248|
Message Types
The FIX 4.4 protocol supports various message types for different trading operations. Here are the primary standard message types:
Session Level Messages
Message Type (35=) | Name | Description |
---|---|---|
A | Logon | Initiates a FIX session |
5 | Logout | Terminates a FIX session |
0 | Heartbeat | Keeps the session alive |
1 | Test Request | Tests the connection |
2 | Resend Request | Requests message retransmission |
3 | Reject | Rejects an invalid message |
4 | Sequence Reset | Resets sequence numbers |
Application Level Messages
Message Type (35=) | Name | Description |
---|---|---|
D | New Order - Single | Submits a new order |
G | Order Cancel/Replace Request | Modifies an existing order |
F | Order Cancel Request | Cancels an existing order |
8 | Execution Report | Reports order status or execution |
9 | Order Cancel Reject | Rejects an order cancellation |
V | Market Data Request | Requests market data |
W | Market Data Snapshot Full Refresh | Provides complete market data |
X | Market Data Incremental Refresh | Provides market data updates |
Y | Market Data Request Reject | Rejects a market data request |
Order Entry
Order entry is one of the primary functions of the FIX protocol. The protocol supports various order types and parameters for trading needs.
New Order Single (35=D)
Use this message to submit a new order to the market.
Required Fields:
Tag | Field Name | Description |
---|---|---|
11 | ClOrdID | Unique identifier for the order |
21 | HandlInst | Handling instructions (1=Automated execution) |
55 | Symbol | Instrument identifier |
54 | Side | Order side (1=Buy, 2=Sell) |
60 | TransactTime | Time of transaction/order creation |
38 | OrderQty | Order quantity |
40 | OrdType | Order type (1=Market, 2=Limit, 3=Stop, etc.) |
44 | Price | Order price (required for limit orders) |
59 | TimeInForce | Time qualifier (0=Day, 1=GTC, 3=IOC, etc.) |
Sample New Order Single Message (Limit Order):
8=FIX.4.4|9=218|35=D|49=CLIENT123|56=SERVER456|34=2|52=20210315-12:31:45.123|11=ORD123456|21=1|55=BTCUSD|54=1|60=20210315-12:31:45.000|38=1.5|40=2|44=50000.00|59=0|10=202|
Order Cancel Request (35=F)
Use this message to request cancellation of an existing order.
Required Fields:
Tag | Field Name | Description |
---|---|---|
11 | ClOrdID | New unique identifier for this cancel request |
41 | OrigClOrdID | ClOrdID of the order being canceled |
55 | Symbol | Instrument identifier |
54 | Side | Order side (1=Buy, 2=Sell) |
60 | TransactTime | Time of transaction/order creation |
Sample Order Cancel Request Message:
8=FIX.4.4|9=156|35=F|49=CLIENT123|56=SERVER456|34=3|52=20210315-12:32:45.123|11=CANCELORD123|41=ORD123456|55=BTCUSD|54=1|60=20210315-12:32:45.000|10=240|
Market Data
FIX 4.4 protocol provides mechanisms for real-time market data, allowing you to receive updates on instrument prices, depths, and trades.
Market Data Request (35=V)
Use this message to request market data for specific instruments.
Required Fields:
Tag | Field Name | Description |
---|---|---|
262 | MDReqID | Unique identifier for the market data request |
263 | SubscriptionRequestType | Type of request (1=Snapshot, 2=Snapshot+Updates, 3=Disable previous snapshot+update) |
264 | MarketDepth | Depth of market data (0=Full Book, 1=Top of Book) |
265 | MDUpdateType | Type of updates (0=Full refresh, 1=Incremental refresh) |
267 | NoMDEntryTypes | Number of market data entry types |
269 | MDEntryType | Type of market data entry (0=Bid, 1=Offer, 2=Trade) |
146 | NoRelatedSym | Number of instruments in request |
55 | Symbol | Instrument identifier |
Sample Market Data Request Message:
8=FIX.4.4|9=182|35=V|49=CLIENT123|56=SERVER456|34=4|52=20210315-12:33:45.123|262=MDREQ123|263=1|264=5|265=0|267=2|269=0|269=1|146=1|55=BTCUSD|10=181|
Standard Extensions for Cryptocurrency Trading
The standard FIX 4.4 protocol can be extended to better support cryptocurrency trading. The financial industry has adopted certain extensions to allow for more precise control over cryptocurrency-specific trading parameters.
Common Extension Tags
Tag Range | Usage | Description |
---|---|---|
5000-9999 | User-defined Fields | Range reserved for user-defined fields in FIX protocol |
10000+ | Private User-defined Fields | Range for private use between counterparties |
Implementation Note: Madeo applications utilize standard FIX 4.4 protocol with appropriate extensions for cryptocurrency trading, providing a robust framework for high-frequency arbitrage operations.
Error Handling
Understanding error messages and handling them appropriately is crucial for maintaining a robust trading system.
Common Error Codes
Error Code | Description | Resolution |
---|---|---|
1 | Invalid tag number | Check the message structure and remove or correct the invalid tag |
2 | Required tag missing | Add the required tag to the message |
3 | Undefined tag | Remove the undefined tag from the message |
4 | Tag specified without a value | Provide a value for the tag |
5 | Value is incorrect for this tag | Correct the value for the specified tag |
6 | Incorrect data format for value | Format the value according to the FIX specification |
8 | Price exceeds limits | Adjust the price to be within acceptable limits |
11 | Invalid or unknown instrument | Check the instrument identifier |
13 | Order rejected | Review the order details and reason for rejection |
Important: Always implement proper error handling in your trading systems. Unhandled errors can lead to unexpected behavior and potential financial loss.
Best Practices
Follow these best practices to ensure reliable and efficient FIX connectivity:
- Sequence Number Management: Properly handle sequence numbers and implement resend request functionality
- Heartbeat Monitoring: Regularly send and monitor heartbeats to detect connection issues
- Graceful Disconnect: Always send a Logout message before disconnecting
- Error Recovery: Implement robust error handling and recovery mechanisms
- Order State Tracking: Maintain a local cache of order states to reconcile with server updates
- Rate Limiting: Respect API rate limits to avoid being throttled
- Unique Order IDs: Ensure order IDs are unique across sessions
- Testing: Thoroughly test your implementation in a test environment before moving to production
Implementation with Madeo Applications
Madeo applications leverage the standard FIX 4.4 protocol described in this reference to provide high-performance trading capabilities. When connecting to Madeo services:
- Follow the standard FIX 4.4 protocol specifications
- Implement proper session management and heartbeat handling
- Use the appropriate message types for order entry and market data
- Contact Madeo support for specific connection details and credentials
Implementation Support: For specific questions about implementing FIX 4.4 with Madeo applications, please contact our technical support team.