A quickfix acceptor or initiator can maintain multiple FIX sessions. A FIX session is defined in QuickFIX as a unique combination of a BeginString (the FIX version number), a SenderCompID (your ID), and a TargetCompID (the ID of your counterparty). A SessionQualifier can also be use to disambiguate otherwise identical sessions.
The SessionSettings class has the ability to pull settings out of any c++ stream such as a file stream. You can also pass it a filename. If you decide to write your own components, (storage for a particular database, a new kind of connector etc...), you can also use this pass in settings.
A settings file is set up with two types of headings, a [DEFAULT] and a [SESSION] heading. [SESSION] tells QuickFIX that a new Session is being defined. [DEFAULT] is a where you can define settings that all sessions use by default. If you do not provide a setting that QuickFIX needs, it will throw a ConfigError telling you what setting is missing or improperly formatted.
# default settings for sessions [DEFAULT] ConnectionType=initiator ReconnectInterval=60 SenderCompID=TW # session definition [SESSION] # inherit ConnectionType, ReconnectInterval and SenderCompID from default BeginString=FIX.4.1 TargetCompID=ARCA StartTime=12:30:00 EndTime=23:30:00 HeartBtInt=20 SocketConnectPort=9823 SocketConnectHost=123.123.123.123 DataDictionary=somewhere/FIX41.xml [SESSION] BeginString=FIX.4.0 TargetCompID=ISLD StartTime=12:00:00 EndTime=23:00:00 HeartBtInt=30 SocketConnectPort=8323 SocketConnectHost=23.23.23.23 DataDictionary=somewhere/FIX40.xml [SESSION] BeginString=FIX.4.2 TargetCompID=INCA StartTime=12:30:00 EndTime=21:30:00 # overide default setting for RecconnectInterval ReconnectInterval=30 HeartBtInt=30 SocketConnectPort=6523 SocketConnectHost=3.3.3.3 # (optional) alternate connection ports and hosts to cycle through on failover SocketConnectPort1=8392 SocketConnectHost1=8.8.8.8 SocketConnectPort2=2932 SocketConnectHost2=12.12.12.12 DataDictionary=somewhere/FIX42.xml
Session |
|||
ID | Description | Valid Values | Default |
---|---|---|---|
BeginString | Version of FIX this session should use | FIXT.1.1 FIX.4.4 FIX.4.3 FIX.4.2 FIX.4.1 FIX.4.0 |
|
SenderCompID | Your ID as associated with this FIX session | case-sensitive alpha-numeric string | |
TargetCompID | Counter parties ID as associated with this FIX session | case-sensitive alpha-numeric string | |
SessionQualifier | Additional qualifier to disambiguate otherwise identical sessions | case-sensitive alpha-numeric string | |
DefaultApplVerID | Required only for FIXT 1.1 (and newer). Ignored for earlier transport versions. Specifies the default application version ID for the session. This can either be the ApplVerID enum (see the ApplVerID field) or the BeginString for the default version. | FIX.5.0SP2 FIX.5.0SP1 FIX.5.0 FIX.4.4 FIX.4.3 FIX.4.2 FIX.4.1 FIX.4.0 9 8 7 6 5 4 3 2 |
|
ConnectionType | Defines if session will act as an acceptor or an initiator | initiator acceptor |
|
StartTime | Time of day that this FIX session becomes activated | time in the format of HH:MM:SS, time is represented in UTC | |
EndTime | Time of day that this FIX session becomes deactivated | time in the format of HH:MM:SS, time is represented in UTC | |
StartDay | For week long sessions, the starting day of week for the session. Use in combination with StartTime. | Day of week in English using any abbreviation (i.e. mo, mon, mond, monda, monday are all valid) | |
EndDay | For week long sessions, the ending day of week for the session. Use in combination with EndTime. | Day of week in English using any abbreviation (i.e. mo, mon, mond, monda, monday are all valid) | |
LogonTime | Time of day that this session logs on | time in the format of HH:MM:SS, time is represented in UTC | SessionTime value |
LogoutTime | Time of day that this session logs out | time in the format of HH:MM:SS, time is represented in UTC | EndTime value |
LogonDay | For week long sessions, the day of week the session logs on. Use in combination with LogonTime. | Day of week in English using any abbreviation (i.e. mo, mon, mond, monda, monday are all valid) | StartDay value |
LogoutDay | For week long sessions, the day of week the session logs out. Use in combination with LogoutTime. | Day of week in English using any abbreviation (i.e. mo, mon, mond, monda, monday are all valid) | EndDay value |
UseLocalTime | Indicates StartTime and EndTime are expressed in localtime instead of UTC. Times in messages will still be set to UTC as this is required by the FIX specifications. | Y N |
N |
MillisecondsInTimeStamp | Determines if milliseconds should be added to timestamps. Only available for FIX.4.2 and greater. | Y N |
Y |
TimestampPrecision | Used to set the fractional part of timestamp. Allowable values are 0 to 9. If set, overrrides MillisecondsInTimeStamp. | 0-9 | |
SendRedundantResendRequests | If set to Y, QuickFIX will send all necessary resend requests, even if they appear redundant. Some systems will not certify the engine unless it does this. When set to N, QuickFIX will attempt to minimize resend requests. This is particularly useful on high volume systems. | Y N |
N |
ResetOnLogon | Determines if sequence numbers should be reset when recieving a logon request. Acceptors only. | Y N |
N |
ResetOnLogout | Determines if sequence numbers should be reset to 1 after a normal logout termination. | Y N |
N |
ResetOnDisconnect | Determines if sequence numbers should be reset to 1 after an abnormal termination. | Y N |
N |
RefreshOnLogon | Determines if session state should be restored from persistence layer when logging on. Useful for creating hot failover sessions. | Y N |
N |
Validation |
|||
ID | Description | Valid Values | Default |
UseDataDictionary | Tell session whether or not to expect a data dictionary. You should always use a DataDictionary if you are using repeating groups. | Y N |
Y |
DataDictionary | XML definition file for validating incoming FIX
messages. If no DataDictionary is supplied, only basic
message validation will be done This setting should only be used with FIX transport versions older than FIXT.1.1. See TransportDataDictionary and AppDataDictionary for FIXT.1.1 settings. |
valid XML data dictionary file, QuickFIX comes with
the following defaults in the spec directory FIX44.xml FIX43.xml FIX42.xml FIX41.xml FIX40.xml |
|
TransportDataDictionary | XML definition file for validating admin (transport)
messages. This setting is only valid for FIXT.1.1 (or
newer) sessions. See DataDictionary for older transport versions (FIX.4.0 - FIX.4.4) for additional information. |
valid XML data dictionary file, QuickFIX comes with
the following defaults in the spec directory FIXT1.1.xml |
|
AppDataDictionary |
XML definition file for validating application
messages. This setting is only valid for FIXT.1.1 (or
newer) sessions. See DataDictionary for older transport versions (FIX.4.0 - FIX.4.4) for additional information. This setting supports the possibility of a custom application data dictionary for each session. This setting would only be used with FIXT 1.1 and new transport protocols. This setting can be used as a prefix to specify multiple application dictionaries for the FIXT transport. For example: DefaultApplVerID=FIX.4.2 # For default application version ID AppDataDictionary=FIX42.xml # For nondefault application version ID # Use BeginString suffix for app version AppDataDictionary.FIX.4.4=FIX44.xml |
valid XML data dictionary file, QuickFIX comes with
the following defaults in the spec directory FIX50SP2.xml FIX50SP1.xml FIX50.xml FIX44.xml FIX43.xml FIX42.xml FIX41.xml FIX40.xml |
|
ValidateLengthAndChecksum | If set to N, messages with incorrect length or checksum fields will not be rejected. You can also use this to force acceptance of repeating groups without a data dictionary. In this scenario you will not be able to access all repeating groups. | Y N |
Y |
ValidateFieldsOutOfOrder | If set to N, fields that are out of order (i.e. body fields in the header, or header fields in the body) will not be rejected. Useful for connecting to systems which do not properly order fields. | Y N |
Y |
ValidateFieldsHaveValues | If set to N, fields without values (empty) will not be rejected. Useful for connecting to systems which improperly send empty tags. | Y N |
Y |
ValidateUserDefinedFields | If set to N, user defined fields will not be rejected if they are not defined in the data dictionary, or are present in messages they do not belong to. | Y N |
Y |
PreserveMessageFieldsOrder | Should the order of fields in the main outgoing message body be preserved or not (as defined in the configuration file). Default: only groups specified order is preserved. | Y N |
N |
CheckCompID | If set to Y, messages must be received from the counterparty with the correct SenderCompID and TargetCompID. Some systems will send you different CompIDs by design, so you must set this to N. | Y N |
Y |
CheckLatency | If set to Y, messages must be received from the counterparty within a defined number of seconds (see MaxLatency). It is useful to turn this off if a system uses localtime for it's timestamps instead of GMT. | Y N |
Y |
MaxLatency | If CheckLatency is set to Y, this defines the number of seconds latency allowed for a message to be processed. Default is 120. | positive integer | 120 |
Miscellaneous |
|||
ID | Description | Valid Values | Default |
HttpAcceptPort | Port to listen to HTTP requests. Pointing a browser to this port will bring up a control panel. Must be in DEFAULT section. | positive integer | |
Initiator |
|||
ID | Description | Valid Values | Default |
ReconnectInterval | Time between reconnection attempts in seconds. Only used for initiators | positive integer | 30 |
HeartBtInt | Heartbeat interval in seconds. Only used for initiators. | positive integer | |
LogonTimeout | Number of seconds to wait for a logon response before disconnecting. | positive integer | 10 |
LogoutTimeout | Number of seconds to wait for a logout response before disconnecting. | positive integer | 2 |
SocketConnectPort | Socket port for connecting to a session. Only used with a SocketInitiator | positive integer | |
SocketConnectHost | Host to connect to. Only used with a SocketInitiator | valid IP address in the format of x.x.x.x or a domain name | |
SocketConnectPort<n> | Alternate socket ports for connecting to a session for failover, where n is a positive integer. (i.e.) SocketConnectPort1, SocketConnectPort2... must be consecutive and have a matching SocketConnectHost[n] | positive integer | |
SocketConnectHost<n> | Alternate socket hosts for connecting to a session for failover, where n is a positive integer. (i.e.) SocketConnectHost1, SocketConnectHost2... must be consecutive and have a matching SocketConnectPort[n] | valid IP address in the format of x.x.x.x or a domain name | |
SocketNodelay | Indicates a socket should be created with TCP_NODELAY. Currently, this must be defined in the [DEFAULT] section. | Y N |
N |
SocketSendBufferSize | Indicates the size of SO_SNDBUF. Currently, this must be defined in the [DEFAULT] section. | positive integer | 0 |
SocketReceiveBufferSize | Indicates the size of SO_RCVBUF. Currently, this must be defined in the [DEFAULT] section. | positive integer | 0 |
Acceptor |
|||
ID | Description | Valid Values | Default |
SocketAcceptPort | Socket port for listening to incoming connections, Only used with a SocketAcceptor | positive integer, valid open socket port. Currently, this must be defined in the [DEFAULT] section. | |
SocketReuseAddress | Indicates a socket should be created with SO_REUSADDR, Only used with a SocketAcceptor | Y N |
Y |
SocketNodelay | Indicates a socket should be created with TCP_NODELAY. Currently, this must be defined in the [DEFAULT] section. | Y N |
N |
Storage |
|||
ID | Description | Valid Values | Default |
PersistMessages | If set to N, no messages will be persisted. This will force QuickFIX to always send GapFills instead of resending messages. Use this if you know you never want to resend a message. Useful for market data streams. | Y Y |
N |
FILE |
|||
FileStorePath | Directory to store sequence number and message files. | valid directory for storing files, must have write access | |
MYSQL |
|||
MySQLStoreDatabase | Name of MySQL database to access for storing messages and session state. | valid database for storing files, must have write access and correct DB shema | quickfix |
MySQLStoreUser | User name logging in to MySQL database. | valid user with read/write access to appropriate tables in database | root |
MySQLStorePassword | Users password. | correct MySQL password for user | empty password |
MySQLStoreHost | Address of MySQL database. | valid IP address in the format of x.x.x.x or a domain name | localhost |
MySQLStorePort | Port of MySQL database. | positive integer | standard MySQL port |
MySQLStoreUseConnectionPool | Use database connection pools. When possible, sessions will share a single database connection. Otherwise each session gets its own connection. | Y N |
N |
POSTGRESQL |
|||
PostgreSQLStoreDatabase | Name of PostgreSQL database to access for storing messages and session state. | valid database for storing files, must have write access and correct DB shema | quickfix |
PostgreSQLStoreUser | User name logging in to PostgreSQL database. | valid user with read/write access to appropriate tables in database | postgres |
PostgreSQLStorePassword | Users password. | correct PostgreSQL password for user | empty password |
PostgreSQLStoreHost | Address of MySQL database. | valid IP address in the format of x.x.x.x or a domain name | localhost |
PostgreSQLStorePort | Port of PostgreSQL database. | positive integer | standard PostgreSQL port |
PostgreSQLStoreUseConnectionPool | Use database connection pools. When possible, sessions will share a single database connection. Otherwise each session gets its own connection. | Y N |
N |
ODBC |
|||
OdbcStoreUser | User name logging in to ODBC database. | valid user with read/write access to appropriate tables in database. Ignored if UID is in the OdbcStoreConnectionString. | sa |
OdbcStorePassword | Users password. | correct ODBC password for user. Ignored if PWD is in the OdbcStoreConnectionString. | empty password |
OdbcStoreConnectionString | ODBC connection string for database | Valid ODBC connection string | DATABASE=quickfix;DRIVER={SQL Server};SERVER=(local); |
Logging |
|||
ID | Description | Valid Values | Default |
FILE |
|||
FileLogPath | Directory to store logs. | valid directory for storing files, must have write access | |
FileLogBackupPath | Directory to store backup logs. | valid directory for storing backup files, must have write access | |
SCREEN |
|||
ScreenLogShowIncoming | Print incoming messages to standard out. | Y N |
Y |
ScreenLogShowOutgoing | Print outgoing messages to standard out. | Y N |
Y |
ScreenLogShowEvents | Print events to standard out. | Y N |
Y |
MYSQL |
|||
MySQLLogDatabase | Name of MySQL database to access for logging. | valid database for storing files, must have write access and correct DB shema | quickfix |
MySQLLogUser | User name logging in to MySQL database. | valid user with read/write access to appropriate tables in database | root |
MySQLLogPassword | Users password. | correct MySQL password for user | empty password |
MySQLLogHost | Address of MySQL database. | valid IP address in the format of x.x.x.x or a domain name | localhost |
MySQLLogPort | Port of MySQL database. | positive integer | standard MySQL port |
MySQLLogUseConnectionPool | Use database connection pools. When possible, sessions will share a single database connection. Otherwise each session gets its own connection. | Y N |
N |
MySQLLogIncomingTable | Name of table where incoming messages will be logged. | Valid table with correct schema. | messages_log |
MySQLLogOutgoingTable | Name of table where outgoing messages will be logged. | Valid table with correct schema. | messages_log |
MySQLLogEventTable | Name of table where events will be logged. | Valid table with correct schema. | event_log |
POSTGRESQL |
|||
PostgreSQLLogDatabase | Name of PostgreSQL database to access for logging. | valid database for storing files, must have write access and correct DB shema | quickfix |
PostgreSQLLogUser | User name logging in to PostgreSQL database. | valid user with read/write access to appropriate tables in database | postgres |
PostgreSQLLogPassword | Users password. | correct PostgreSQL password for user | empty password |
PostgreSQLLogHost | Address of PostgreSQL database. | valid IP address in the format of x.x.x.x or a domain name | localhost |
PostgreSQLLogPort | Port of PostgreSQL database. | positive integer | standard PostgreSQL port |
PostgreSQLLogUseConnectionPool | Use database connection pools. When possible, sessions will share a single database connection. Otherwise each session gets its own connection. | Y N |
N |
PostgresSQLLogIncomingTable | Name of table where incoming messages will be logged. | Valid table with correct schema. | messages_log |
PostgresSQLLogOutgoingTable | Name of table where outgoing messages will be logged. | Valid table with correct schema. | messages_log |
PostgresSQLLogEventTable | Name of table where events will be logged. | Valid table with correct schema. | event_log |
ODBC |
|||
OdbcLogUser | User name logging in to ODBC database. | valid user with read/write access to appropriate tables in database | sa |
OdbcLogPassword | Users password. | correct ODBC password for user. Ignored if UID is in the OdbcLogConnectionString. | empty password |
OdbcLogConnectionString | ODBC connection string for database | Valid ODBC connection string. Ignored if PWD is in the OdbcStoreConnectionString. | DATABASE=quickfix;DRIVER={SQL Server};SERVER=(local); |
OdbcLogIncomingTable | Name of table where incoming messages will be logged. | Valid table with correct schema. | messages_log |
OdbcLogOutgoingTable | Name of table where outgoing messages will be logged. | Valid table with correct schema. | messages_log |
OdbcLogEventTable | Name of table where events will be logged. | Valid table with correct schema. | event_log |
SSL |
|||
ID | Description | Valid Values | Default |
Parameters have to be defined in the DEFAULT section. | |||
SSLProtocol | This directive can be used to control the SSL protocol flavors the application
should use when establishing its environment. The available (case-insensitive) protocols are: SSLv2 This is the Secure Sockets Layer (SSL) protocol, version 2.0. It is the original SSL protocol as designed by Netscape Corporation. SSLv3 This is the Secure Sockets Layer (SSL) protocol, version 3.0. It is the successor to SSLv2 and the currently (as of February 1999) de-facto standardized SSL protocol from Netscape Corporation. It's supported by almost all popular browsers. TLSv1 This is the Transport Layer Security (TLS) protocol, version 1.0. TLSv1_1 This is the Transport Layer Security (TLS) protocol, version 1.1. TLSv1_2 This is the Transport Layer Security (TLS) protocol, version 1.2. all This is a shortcut for +SSLv2 +SSLv3 +TLSv1 +TLSv1_1 +TLSv1_2 and a convenient way for enabling all protocols except one when used in combination with the minus sign on a protocol as the example above shows. Example: enable all but not SSLv2 SSL_PROTOCOL = all -SSLv2 |
all -SSLv2 | |
SSLCipherSuite | This complex directive uses a colon-separated cipher-spec string consisting
of OpenSSL cipher specifications to configure the Cipher Suite the client is
permitted to negotiate in the SSL handshake phase. Notice that this directive
can be used both in per-server and per-directory context. In per-server
context it applies to the standard SSL handshake when a connection is
established. In per-directory context it forces a SSL renegotation with the
reconfigured Cipher Suite after the HTTP request was read but before the HTTP
response is sent. An SSL cipher specification in cipher-spec is composed of 4 major attributes plus a few extra minor ones. Key Exchange Algorithm: RSA or Diffie-Hellman variants. Authentication Algorithm: RSA, Diffie-Hellman, DSS or none. Cipher/Encryption Algorithm: DES, Triple-DES, RC4, RC2, IDEA or none. MAC Digest Algorithm: MD5, SHA or SHA1. For more details refer to mod_ssl documentation. Example: RC4+RSA:+HIGH: |
HIGH:!RC4 | |
CertificationAuthoritiesFile | This directive sets the all-in-one file where you can assemble the Certificates of Certification Authorities (CA) whose clients you deal with. | ||
CertificationAuthoritiesDirectory | This directive sets the directory where you keep the Certificates of Certification Authorities (CAs) whose clients you deal with. | ||
ACCEPTOR |
|||
ServerCertificateFile | This directive points to the PEM-encoded Certificate file and optionally also to the corresponding RSA or DSA Private Key file for it (contained in the same file). | ||
ServerCertificateKeyFile | This directive points to the PEM-encoded Private Key file. If the Private Key is not combined with the Certificate in the server certificate file, use this additional directive to point to the file with the stand-alone Private Key. | ||
CertificateVerifyLevel | This directive sets the Certificate verification level. It applies to the authentication process used in the standard SSL handshake when a connection is established. 0 implies do not verify. 1 implies verify. | ||
CertificateRevocationListFile | This directive sets the all-in-one file where you can assemble the Certificate Revocation Lists (CRL) of Certification Authorities (CA) whose clients you deal with. | ||
CertificateRevocationListDirectory | This directive sets the directory where you keep the Certificate Revocation Lists (CRL) of Certification Authorities (CAs) whose clients you deal with. | ||
INITIATOR |
|||
ClientCertificateFile | This directive points to the PEM-encoded Certificate file and optionally also to the corresponding RSA or DSA Private Key file for it (contained in the same file). | ||
ClientCertificateKeyFile | This directive points to the PEM-encoded Private Key file. If the Private Key is not combined with the Certificate in the server certificate file, use this additional directive to point to the file with the stand-alone Private Key. |