QuickFIX Session Settings Explained: Configuration Reference
Written and maintained by ZagTrader. Last reviewed . How this page is sourced and checked
Every QuickFIX engine starts from a settings file: a [DEFAULT] section with values every session shares, and one [SESSION] section per session. This page explains the settings people use most, which engines support each one, and the default when it is left out. Defaults were read from each engine's source code and its manual at the releases named in Sources, since the two do not always agree.
How the file works
- A [SESSION] section inherits everything from [DEFAULT] and can override any of it.
- BeginString, SenderCompID and TargetCompID, plus SessionQualifier when used, identify the session. Two sections with the same three values are the same session.
- Names are written exactly as shown here. Values Y and N are used for on and off.
- Missing required settings stop the engine at start with a configuration error that names the setting. Read that error first; it is usually precise.
[DEFAULT]
ConnectionType=initiator
ReconnectInterval=30
FileStorePath=store
FileLogPath=log
StartTime=00:00:00
EndTime=00:00:00
UseDataDictionary=Y
[SESSION]
BeginString=FIX.4.4
SenderCompID=BUYSIDE
TargetCompID=SELLSIDE
SocketConnectHost=fix.example.com
SocketConnectPort=9876
HeartBtInt=30
DataDictionary=FIX44.xmlSession identity
Which session a section of the file defines. BeginString, SenderCompID and TargetCompID (plus SessionQualifier) form the session ID.
| Setting | Engines | Default | What it does |
|---|---|---|---|
| BeginString FIX.4.0 to FIX.4.4, FIXT.1.1 | All three | required | The FIX version, sent in BeginString (8) on every message. FIX 5.0, 5.0 SP1 and 5.0 SP2 sessions use FIXT.1.1 and name the application version in DefaultApplVerID. FIX.5.0SP2 is not a valid BeginString. |
| SenderCompID text, case sensitive | All three | required | Your CompID, sent in SenderCompID (49). It must match what the counterparty has configured for you, character for character. |
| TargetCompID text, case sensitive | All three | required | The counterparty's CompID, sent in TargetCompID (56). An acceptor uses the incoming Logon's CompIDs, reversed, to find the session; a mismatch means the session is not found. |
| SessionQualifier text | All three | none | Tells two initiator sessions apart when they share BeginString and CompIDs. All three engines refuse it on an acceptor. |
| ConnectionType initiator, acceptor | All three | required | Initiator connects out and sends the first Logon; acceptor listens. Usually set once in [DEFAULT]. |
| DefaultApplVerID ApplVerID code (9) or name (FIX.5.0SP2) | All three | required for FIXT.1.1 | The application version for a FIXT.1.1 session, sent in DefaultApplVerID (1137) on the Logon. Ignored on FIX 4.x sessions. All three engines refuse to start a FIXT.1.1 session without it. |
Connection and heartbeats
Who connects to whom, where, and how the session keeps itself alive.
| Setting | Engines | Default | What it does |
|---|---|---|---|
| SocketConnectHost host name or IP address | All three | initiator: required | Where the initiator connects. Add SocketConnectHost1, SocketConnectHost2 and so on (with matching ports) for backup addresses tried in turn. |
| SocketConnectPort port number | All three | initiator: required | The counterparty's port. Backup ports are SocketConnectPort1, SocketConnectPort2, numbered like the hosts. |
| SocketAcceptPort port number | All three | acceptor: required | The port an acceptor listens on. QuickFIX C++ expects it in [DEFAULT]. |
| HeartBtInt seconds | All three | initiator: required | Heartbeat interval, sent in HeartBtInt (108) on the Logon. Only the initiator sets it; an acceptor takes the value from the Logon it receives. Agree the number with the counterparty: some acceptors refuse other values. |
| ReconnectInterval seconds | All three | J: 5 (in code), N and C: 30 | Pause between connection attempts of an initiator. QuickFIX/J's code uses 5 seconds when the setting is absent although its manual lists 30, so set it explicitly. QuickFIX/J also accepts a schedule such as 3x5;30: three tries 5 seconds apart, then every 30 seconds. |
| LogonTimeout seconds | All three | 10 | How long the initiator waits for the Logon answer before it drops the connection. |
| LogoutTimeout seconds | All three | 2 | How long a session waits for the Logout answer before it drops the connection. |
| CheckLatency Y, N | All three | Y | Rejects messages whose SendingTime (SendingTime (52)) is further from the local clock than MaxLatency. A wrong clock on either side, or local time instead of UTC, fails this check. |
| MaxLatency seconds | All three | 120 | The allowed difference for CheckLatency. A breach is a Reject with 373=10, followed by a Logout. |
| LogonTag tag=value | QuickFIX/J | none | Adds fields to the Logon from the settings file, for example LogonTag=553=user and LogonTag1=554=secret. QuickFIX/n and QuickFIX C++ add credentials in the toAdmin callback instead. |
Schedule
When the session is allowed to be logged on, and when a new session period starts. A new period resets sequence numbers.
| Setting | Engines | Default | What it does |
|---|---|---|---|
| StartTime HH:MM:SS | All three | required unless NonStopSession=Y | Start of the session period, in UTC unless a time zone is configured. QuickFIX/J also accepts a zone after the time, such as 07:00:00 Asia/Riyadh. |
| EndTime HH:MM:SS | All three | required unless NonStopSession=Y | End of the session period. Outside StartTime to EndTime the session logs out and refuses to log on. With the same value for both, the period lasts 24 hours and a new one starts at that time each day. |
| StartDay day name | All three | none | First day of a weekly session, used with StartTime. Must come with EndDay. |
| EndDay day name | All three | none | Last day of a weekly session, used with EndTime. A weekly session keeps its sequence numbers from StartDay to EndDay. |
| Weekdays list of days, e.g. Sun,Mon,Tue,Wed,Thu | QuickFIX/J, QuickFIX/n | none | A daily session that only runs on the listed days. Cannot be combined with StartDay or EndDay. QuickFIX/J reads the day names in the JVM's default locale, so English names fail on a server with another locale. |
| NonStopSession Y, N | All three | N | The session never ends on a schedule, so sequence numbers never reset by time. QuickFIX/n and QuickFIX C++ refuse StartTime, EndTime, StartDay or EndDay next to it. |
| TimeZone time zone ID | QuickFIX/J, QuickFIX/n | UTC | Time zone for StartTime and EndTime. QuickFIX/J uses Java zone IDs such as Asia/Dubai and stops with an error on an ID it does not know. QuickFIX/n passes the ID to the operating system, so check it resolves on the host. |
| UseLocalTime Y, N | QuickFIX/n, QuickFIX C++ | N | Reads StartTime and EndTime in the host's local time. Messages still carry UTC. QuickFIX/n refuses it together with TimeZone. |
For Sunday to Thursday markets and time zones, see session schedules and time zones.
Sequence numbers and recovery
When sequence numbers go back to 1, and how resends are handled.
| Setting | Engines | Default | What it does |
|---|---|---|---|
| ResetOnLogon Y, N | All three | N | An initiator resets both sequence numbers to 1 before each Logon and sends 141=Y; an acceptor resets when a Logon arrives. Use it only when the counterparty expects a reset at every logon. |
| ResetOnLogout Y, N | All three | N | Resets both numbers to 1 after a normal Logout exchange. |
| ResetOnDisconnect Y, N | All three | N | Resets both numbers to 1 whenever the connection drops, even without a Logout. Messages not yet delivered are not recovered. |
| RefreshOnLogon Y, N | All three | N | Reloads sequence numbers and messages from the store at logon. Used for a standby engine that shares the store with the primary. |
| PersistMessages Y, N | All three | Y | With N, sent messages are not kept and every ResendRequest is answered with a gap fill. Fine for market data, wrong for orders. |
| SendRedundantResendRequests Y, N | All three | N | Sends a ResendRequest for every gap even when one is already outstanding. Some certification scripts require Y. |
| EnableNextExpectedMsgSeqNum Y, N | QuickFIX/J | N | Sends NextExpectedMsgSeqNum (789) on the Logon and uses the counterparty's value to resynchronise. QuickFIX C++ calls the setting SendNextExpectedMsgSeqNum. FIX 4.4 and later only. |
Resetting at the wrong moment is the main cause of "MsgSeqNum too low". See resetting sequence numbers safely.
Dictionaries and validation
Which data dictionary checks incoming messages, and how strict the checks are.
| Setting | Engines | Default | What it does |
|---|---|---|---|
| UseDataDictionary Y, N | All three | Y | Checks incoming messages against a data dictionary. With N there is no field validation and repeating groups are not parsed into groups. |
| DataDictionary path to XML | All three | J and N: FIX44.xml style name | The dictionary for a FIX 4.x session. When it is absent, QuickFIX/J and QuickFIX/n look for a file named after the BeginString without dots, for example FIX44.xml. Not used on FIXT.1.1 sessions. |
| TransportDataDictionary path to XML | All three | J and N: FIXT11.xml | FIXT.1.1 only: the dictionary for the header, trailer and session messages, normally the FIXT11.xml that ships with the engine. |
| AppDataDictionary path to XML | All three | none | FIXT.1.1 only: the dictionary for application messages of the DefaultApplVerID version. Add AppDataDictionary.FIX.4.4=FIX44.xml style lines for other versions on the same session. |
| ValidateUserDefinedFields Y, N | All three | Y | With N, user-defined fields (tag 5000 and above) that the dictionary does not define, or does not allow in that message, are accepted. |
| AllowUnknownMsgFields Y, N | All three | N | With Y, standard fields (below tag 5000) that the dictionary does not allow in that message are accepted. QuickFIX/n notes that fields inside repeating groups are still checked. |
| ValidateFieldsOutOfOrder Y, N | All three | Y | With N, header fields found in the body (or body fields in the header) are not rejected. |
| ValidateFieldsHaveValues Y, N | All three | Y | With N, empty fields such as 58= are not rejected with 373=4. |
| ValidateLengthAndChecksum Y, N | QuickFIX/n, QuickFIX C++ | Y | With N, messages with a wrong BodyLength or CheckSum are processed. QuickFIX/J has ValidateChecksum for the checksum. |
| AllowUnknownEnumValues Y, N | QuickFIX/J, QuickFIX/n | N | With Y, values outside a field's enumeration are accepted instead of rejected with 373=5. In QuickFIX/J from 3.0; not in the 2.3 line (checked in 2.3.2). |
| ValidateUnorderedGroupFields Y, N | QuickFIX/J | Y | Checks the order of fields inside repeating groups. With N, QuickFIX/J accepts group members in any order after the first. |
| FirstFieldInGroupIsDelimiter Y, N | QuickFIX/J | N | QuickFIX/J 3.0 and later: takes the first field received in a group as its delimiter instead of the dictionary's first field. Needs ValidateUnorderedGroupFields=N. |
| CheckCompID Y, N | All three | Y | Rejects messages whose CompIDs do not match the session with 373=9 and logs out. Turn off only when the counterparty sends other CompIDs by design. |
Store and logs
Where sequence numbers, sent messages and logs are kept.
| Setting | Engines | Default | What it does |
|---|---|---|---|
| FileStorePath directory | All three | none | Where the file store keeps sequence numbers and sent messages. Must be writable, persistent and used by one process at a time. |
| FileLogPath directory | All three | none | Where the file log writes the messages log and the event log of each session. |
| FileIncludeTimeStampForMessages Y, N | QuickFIX/J | N | QuickFIX/J writes messages without a timestamp unless this is Y. Set it, with FileIncludeMilliseconds=Y, so the log shows when each message went in or out. |
| FileLogBackupPath directory | QuickFIX C++ | FileLogPath | Where QuickFIX C++ writes backup copies of its session logs. Defaults to the FileLogPath directory. |
| TimeStampPrecision SECONDS, MILLIS, MICROS, NANOS | QuickFIX/J | MILLIS | Precision of SendingTime on messages QuickFIX/J sends. QuickFIX/n and QuickFIX C++ spell it TimestampPrecision (QuickFIX/n: Seconds to Nanoseconds; QuickFIX C++: 0 to 9 digits). Agree it with the counterparty: some accept milliseconds only. |
SSL and TLS
Each engine names its TLS settings differently. See the SSL guide for a working setup per engine.
| Setting | Engines | Default | What it does |
|---|---|---|---|
| SocketUseSSL Y, N | QuickFIX/J | N | Turns on TLS for a QuickFIX/J initiator or acceptor. The key store comes from SocketKeyStore and the trust store from SocketTrustStore. |
| SSLEnable Y, N | QuickFIX/n | Y if SSLCertificate is set | Turns on TLS for QuickFIX/n. With it come SSLServerName, SSLCertificate, SSLCACertificate and SSLValidateCertificates. |
| SSLProtocol e.g. all -SSLv2 -SSLv3 | QuickFIX C++ | all -SSLv2 | TLS versions QuickFIX C++ allows, used with its SSL initiator and acceptor classes. The SSL settings must sit in [DEFAULT]. |
The full set per engine, with the usual handshake errors, is in QuickFIX SSL and TLS setup.
Questions
- What does ResetOnLogon do in QuickFIX?
- An initiator with ResetOnLogon=Y sets both sequence numbers to 1 and sends its Logon with ResetSeqNumFlag (141) = Y. An acceptor with it resets when a Logon arrives. The default is N.
- Does an acceptor need HeartBtInt?
- No. The initiator sets the interval in HeartBtInt (108) on its Logon, and the acceptor uses that value.
- Are StartTime and EndTime in local time?
- No, in UTC, unless you set TimeZone (QuickFIX/J, QuickFIX/n), add a zone after the time (QuickFIX/J) or set UseLocalTime=Y (QuickFIX/n, QuickFIX C++).
- Why does my session reset every day although I never set a reset?
- Each new schedule period starts with sequence numbers at 1. With StartTime and EndTime only, the period is one day. Use StartDay and EndDay for a weekly session, or NonStopSession=Y.
The FIX side of the problem
What the error means on any FIX engine, with example messages you can open in the parser:
Reference
Sources
- QuickFIX/J user manual: Configuration
- QuickFIX/J source: Session.java (setting names, defaults, logout and reject texts)
- QuickFIX/J source: DefaultSessionFactory.java (required settings and defaults)
- QuickFIX/J source: DefaultSessionSchedule.java (StartTime, Weekdays, TimeZone)
- QuickFIX/J source: ValidationSettings.java (validation defaults)
- QuickFIX/J source: FileLogFactory.java (log settings and defaults)
- QuickFIX/J source: SSLSupport.java (SSL settings and defaults)
- QuickFIX/n documentation: Configuration
- QuickFIX/n source: SessionFactory.cs (required settings, dictionaries)
- QuickFIX/n source: SessionSchedule.cs (Weekdays, TimeZone, UseLocalTime)
- QuickFIX C++ documentation: Configuration
- QuickFIX C++ source: SessionSettings.h (setting names)
Setting names, defaults and message texts were checked against the projects' source code and documentation on the review date shown at the top of the page. Behaviour can change between releases; check the version you run. This guide is independent and not affiliated with the QuickFIX projects.
See also
More QuickFIX guides
- QuickFIX/J vs QuickFIX/n vs QuickFIX C++: Which One to Use
- QuickFIX with FIX 5.0 SP2: FIXT.1.1, Transport and Application Dictionaries
- Custom Fields and a Custom Data Dictionary in QuickFIX
- Repeating Groups in QuickFIX: Reading, Writing and Validation Errors
- QuickFIX Session Schedules: Daily vs Weekly Sessions, Time Zones and Sunday to Thursday Markets
- QuickFIX "Tag not defined for this message type": Causes and Fixes
- QuickFIX "Conditionally Required Field Missing": Why Your Handler Caused It
- QuickFIX "Incorrect data format for value": Field Types and Fixes
- QuickFIX "MsgSeqNum too low": Reset Sequence Numbers Safely and Fix the File Store
- QuickFIX Logon Problems: Session Not Found, CompID Mismatch and Rejected Logons
- QuickFIX SSL and TLS: Setup per Engine and Handshake Failures
- QuickFIX onMessage Not Called: Message Cracking Problems
- Reading and Analyzing QuickFIX Logs: messages.log and event.log