Skip to content

FIX Configuration

FIX configuration is the most crucial task for controlling behavior of FIX sessions.

This section explains:

  • FIX sessions
  • Initiator and Acceptor applications
  • FIX configuration file
  • FAQs

FIX Sessions

A FIX session is a bidirectional exchange of sequential messages between two trading parties.

A session is established when:

  • Buy-side sends Logon
  • Sell-side validates
  • Counter Logon is sent

Each counterparty may have:

  • Different FIX versions
  • Custom rules
  • Different session attributes

Examples:

  • SenderCompID
  • TargetCompID
  • IP / Port
  • Message recovery rules

Initiator and Acceptor Applications

A FIX-based system must:

  • Manage connections
  • Handle multiple sessions
  • Persist messages
  • Process business logic
  • Support customization

QXFIX Engine provides APIs to build such systems.

Types:

  • Initiator (Buy-side → sends Logon)
  • Acceptor (Sell-side → receives Logon)

Applications can also be hybrid.


FIX Configuration File

  • XML-based configuration
  • No need to change code
  • Controls session behavior

Initiator Config Structure

View Code
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<Session>
----
<SessionActivationSchedule>
----
</SessionActivationSchedule>
<StandardHeaderFieldValue>
----
</StandardHeaderFieldValue>
<MessageRecoveryRule>
----
</MessageRecoveryRule>
</Session>

<Initiator>
----
<SessionLogic>
----
</SessionLogic>
</Initiator>

<Logger>
----
</Logger>

<CustomAttribute>
----
</CustomAttribute>
</configuration>

Acceptor Config Structure

View Code
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<Session>
----
<SessionActivationSchedule>
----
</SessionActivationSchedule>
<StandardHeaderFieldValue>
----
</StandardHeaderFieldValue>
<MessageRecoveryRule>
----
</MessageRecoveryRule>
</Session>

<Acceptor>
----
<SessionLogic>
----
</SessionLogic>
</Acceptor>

<Logger>
----
</Logger>

<CustomAttribute>
----
</CustomAttribute>
</configuration>

FAQs

  1. Initiator config structure
  2. Acceptor config structure
  3. Setting configuration file
  4. Common session attributes
  5. Preliminary validation
  6. Validation levels
  7. GapFill handling
  8. GapFill responses
  9. Engine GapFill behavior
  10. MessageRecoveryRule
  11. Header fields
  12. Session schedule
  13. Logging
  14. Custom attributes
  15. Initiator attributes
  16. SSL configuration
  17. Session logic
  18. Acceptor attributes
  19. Programmatic config

1. Which elements and attributes does a typical FIX configuration file for an Initiator application contain?

View Answer

A sample Initiator configuration file:

View Code
<?xml version="1.0" encoding="utf-8"?>

<configuration>

<Session>

<add key="ConnectionType" value="Initiator" />
<add key="MillisecondsInTimeStamp" value="Y" />
<add key="DataDictionary" value="InitiatorDataDictionary.xml" />
<add key="SocketBufferSize" value="1024" />
<add key="HeartBtInt" value="30" />
<add key="HeartBtIntDelta" value="20" />
<add key="PersistHeartBtInt" value="Y" />
<add key="MaxMessageSize" value="2048" />
<add key="InboundMessageValidationLevel" value="LOW" />
<add key="OutboundMessageValidationLevel" value="NO" />
<add key="MessageThrottleValue" value="200" />
<add key="ResetOnLogon" value="N" />
<add key="ResetOnLogout" value="N" />
<add key="ResetOnDisconnect" value="N" />

<SessionActivationSchedule value="Weekly">
    <add key="StartTime" value="05:30:00" />
    <add key="EndTime" value="21:30:00" />
    <add key="StartDay" value="Monday" />
    <add key="EndDay" value="Friday" />
</SessionActivationSchedule>

<StandardHeaderFieldValue>
    <add key="BeginString" value="FIX.4.2" />
    <add key="SenderCompID" value="ABC" />
    <add key="TargetCompID" value="FFAcceptor" />
</StandardHeaderFieldValue>

<MessageRecoveryRule>
    <add key="RuleType" value="AlwaysGapFillOverBusinessMessages" />
    <add key="MaximumMessageAllowedInResendRequest" value="*" />
    <add key="ApplicationMessageTypeNotToBeSendAsGapFill" value="D,F" />
    <add key="OrigSendingTimeInGapFillMessage" value="Y" />
</MessageRecoveryRule>

</Session>

<Initiator>

<add key="SocketInterfaceIP" value="10.145.24.107" />
<add key="SocketConnectHostPrimary" value="192.168.254.150" />
<add key="SocketConnectPortPrimary" value="60176" />
<add key="SocketConnectHostFailover" value="192.168.254.151" />
<add key="SocketConnectPortFailover" value="60176" />
<add key="ConnectionTimeOut" value="10" />
<add key="ReConnectAttempts" value="10" />
<add key="ReConnectInterval" value="5" />
<add key="LogonTimeOut" value="50" />
<add key="LogoutTimeOut" value="50" />
<add key="InBoundQueueSizeThreshold" value="50" />
<add key="CheckLatency" value="Y" />
<add key="MaxLatencyTimeInSeconds" value="10" />

<SessionLogic>
    <add key="MaxTestRequestGeneratedInRow" value="2" />
    <add key="SendTestRequestBeforeSendingLogonWithResetSeqNumFlag" value="N" />
</SessionLogic>

<SecureSSLProtocol UseSSLProtocol="N">
    <add key="CNName" value="Zax" />
    <add key="CertificateFile" value="abc.pem" />
</SecureSSLProtocol>

</Initiator>

<Logger>
    <add key="LoggerType" value="File" />
    <add key="LogAttributes" value="IM|OM|INFO|WARNING|ERROR" />
</Logger>

<CustomAttribute>
    <add key="MyName" value="Mark" />
</CustomAttribute>

</configuration>

2. Which elements and attributes does a typical FIX configuration file for an Acceptor application contain?

View Answer

A sample Acceptor configuration file:

View Code
<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<Session>
<add key="ConnectionType" value="Acceptor" />
<add key="MillisecondsInTimeStamp" value="Y" />
<add key="DataDictionary" value="AcceptorDataDictionary.xml" />
<add key="SocketBufferSize" value="1024" />
<add key="HeartBtInt" value="30" />
<add key="HeartBtIntDelta" value="20" />
<add key="MessageValidationLevel" value="LOW" />

<SessionActivationSchedule value="Weekly">
    <add key="StartTime" value="05:30:00" />
    <add key="EndTime" value="21:30:00" />
    <add key="StartDay" value="Monday" />
    <add key="EndDay" value="Friday" />
</SessionActivationSchedule>

<MessageRecoveryRule>
    <add key="RuleType" value="AlwaysGapFill" />
    <add key="MaximumMessageAllowedInResendRequest" value="*" />
    <add key="OrigSendingTimeInGapFillMessage" value="Y" />
</MessageRecoveryRule>

</Session>

<Acceptor>
<add key="SocketConnectPort" value="7001" />
<add key="LogonTimeOut" value="30" />
<add key="InBoundQueueSizeThreshold" value="50" />
<add key="CheckLatency" value="Y" />
<add key="MaxLatencyTime" value="5" />

<SessionLogic>
    <add key="MaxTestRequestGeneratedInRow" value="2" />
    <add key="SendTestRequestBeforeSendingLogonWithResetSeqNumFlag" value="N" />
</SessionLogic>

</Acceptor>

<Logger>
    <add key="LoggerType" value="File" />
    <add key="LogAttributes" value="IM|OM|INFO|WARNING|ERROR" />
</Logger>

<CustomAttribute>
    <add key="MyName" value="Rax" />
</CustomAttribute>

</configuration>

3. How do I specify the FIX configuration file while writing my Initiator or Acceptor application?

View Answer

The FIX configuration file is passed while initializing the Initiator or Acceptor.

View Code
string configPath = "config.xml";

FixConfig fixConfig = new FixConfig(configPath);

This FixConfig object is then used during Init().


4. What are the common session-level attributes used in FIX configuration?

View Answer

Common session attributes include:

  • ConnectionType (Initiator / Acceptor)
  • HeartBtInt
  • DataDictionary
  • SocketBufferSize
  • MessageValidationLevel
  • ResetOnLogon / Logout / Disconnect

These attributes control core session behavior.


5. What is preliminary validation in FIX configuration?

View Answer

Preliminary validation checks basic message correctness before processing.

It ensures:

  • Required fields are present
  • Data types are valid
  • Message structure is correct

Helps reject invalid messages early.


6. What are the different validation levels available in FIX configuration?

View Answer

FIX configuration supports different validation levels:

  • NO → No validation
  • LOW → Basic validation
  • HIGH → Strict validation

Key Points

  • LOW is commonly used
  • HIGH ensures strict compliance
  • NO is used for performance-critical systems

7. What is GapFill and how is it handled in FIX sessions?

View Answer

GapFill is used when messages are missing in a sequence.

Instead of resending actual messages, a GapFill message is sent to fill the gap.

It helps maintain sequence continuity without resending all data.


8. How does the FIX Engine respond to GapFill scenarios?

View Answer

The FIX Engine can respond in different ways based on configuration:

  • Send GapFill messages
  • Resend actual messages
  • Skip specific message types

Behavior depends on MessageRecoveryRule.


9. How does QXFIX Engine handle GapFill internally?

View Answer

QXFIX Engine processes GapFill based on:

  • RuleType
  • Message type filtering
  • Sequence number handling

It ensures:

  • Correct sequencing
  • Efficient recovery
  • Minimal message overhead

10. What is MessageRecoveryRule in FIX configuration?

View Answer

MessageRecoveryRule defines how missing messages are handled.

It includes:

  • RuleType
  • MaximumMessageAllowedInResendRequest
  • Message filters
View Code
<MessageRecoveryRule>

    <add key="RuleType" value="AlwaysGapFillOverBusinessMessages" />
    <add key="MaximumMessageAllowedInResendRequest" value="*" />
    <add key="ApplicationMessageTypeNotToBeSendAsGapFill" value="D,F" />
    <add key="OrigSendingTimeInGapFillMessage" value="Y" />

</MessageRecoveryRule>

Key Points

  • Controls resend behavior
  • Improves performance
  • Helps avoid unnecessary message replay

11. How do I define standard header field values in FIX configuration?

View Answer

Standard header fields are defined under .

View Code
<StandardHeaderFieldValue>

    <add key="BeginString" value="FIX.4.2" />
    <add key="SenderCompID" value="ABC" />
    <add key="TargetCompID" value="FFAcceptor" />

</StandardHeaderFieldValue>

Key Points

  • These values are applied to all messages
  • Must match counterparty agreement

12. How do I configure session activation schedule?

View Answer

SessionActivationSchedule defines when a FIX session is active.

View Code
<SessionActivationSchedule value="Weekly">

    <add key="StartTime" value="05:30:00" />
    <add key="EndTime" value="21:30:00" />
    <add key="StartDay" value="Monday" />
    <add key="EndDay" value="Friday" />

</SessionActivationSchedule>

Key Points

  • Controls trading session timing
  • Supports daily/weekly schedules

13. How do I configure logging in FIX configuration?

View Answer

Logging is configured under .

View Code
<Logger>

    <add key="LoggerType" value="File" />
    <add key="LogAttributes" value="IM|OM|INFO|WARNING|ERROR" />

</Logger>

Key Points

  • IM = Inbound Message
  • OM = Outbound Message
  • Helps debugging and monitoring

14. How do I define custom attributes in FIX configuration?

View Answer

Custom attributes can be added under .

View Code
<CustomAttribute>

    <add key="MyName" value="Mark" />

</CustomAttribute>

Key Points

  • Used for application-specific settings
  • Not part of FIX standard

15. What are the important Initiator-specific attributes in FIX configuration?

View Answer

Important Initiator attributes include:

  • SocketConnectHostPrimary
  • SocketConnectPortPrimary
  • SocketConnectHostFailover
  • SocketConnectPortFailover
  • ReConnectAttempts
  • ReConnectInterval
  • LogonTimeOut
  • LogoutTimeOut

Key Points

  • Controls connection handling
  • Supports failover
  • Defines retry behavior

16. How do I configure SSL settings in FIX configuration?

View Answer

SSL settings are defined under .

View Code
<SecureSSLProtocol UseSSLProtocol="Y">

    <add key="CNName" value="Zax" />
    <add key="CertificateFile" value="abc.pem" />

</SecureSSLProtocol>

Key Points

  • Enables secure communication
  • Requires valid certificate

17. What is SessionLogic in FIX configuration?

View Answer

SessionLogic defines internal session behavior.

View Code
<SessionLogic>

    <add key="MaxTestRequestGeneratedInRow" value="2" />
    <add key="SendTestRequestBeforeSendingLogonWithResetSeqNumFlag" value="N" />

</SessionLogic>

Key Points

  • Controls heartbeat/test request logic
  • Improves session stability

18. What are the important Acceptor-specific attributes?

View Answer

Important Acceptor attributes include:

  • SocketConnectPort
  • LogonTimeOut
  • InBoundQueueSizeThreshold
  • CheckLatency
  • MaxLatencyTime

Key Points

  • Controls server-side behavior
  • Handles incoming connections

19. How do I configure FIX settings programmatically?

View Answer

FIX configuration can be loaded programmatically.

View Code
string configPath = "config.xml";

FixConfig fixConfig = new FixConfig(configPath);

Key Points

  • Enables dynamic configuration loading
  • Useful for runtime flexibility