Other Topics
Log files
File system is used to log messages for FIX Antenna recovery. Log files are created in the directory specified in configuration parameters (the “LogDirectory” property).
Files with the *.conf extension (configuration files) contain basic session information.
IncomingSeqNum MsgSeqNum of the last incoming message that was successfully processed
Acceptor or Initiator role
Sender SenderCompID
Target TargetCompID
CorrectlyTerminated ‘true’ if the session was terminated correctly, otherwise - ‘false’
FIX protocol version
Incoming messages are stored in files with the .in extension. Outgoing messages are stored in files with the .out extension.
Files related to the same session have the same base part of the name (the part before a dot)
The engine.log file, storing information about FE operation is also created in the log directory.
Log files are used during automatic session reestablishment. Thus, to ensure a “clean” run of FIX Antenna, it is necessary to remove all the files from the log directory (the “LogDirectory” property).
FAQ
Is it possible to create more than one instance of FIX Antenna Python?
How to extend FIX message with repeating group defined in FIX protocol?
Is it possible to use FixMessage and FixGroup after FixEngine destruction?
Is it possible to create more than one instance of FIX Antenna Python?
Yes, it is possible to create many instances of FIX Antenna Python as soon as they use different listening ports. However FIX engine is a singleton, which means that only one instance of engine can be created in one application.
Is it possible to create more than one instance of FIX Antenna Python using the same logging directory?
Yes. However it is recommended to set a different logging file. Otherwise different instances will put logging data to the same file and it will be difficult to distinguish records written by different instances.
How to create FIX50, FIX50SP1 or FIX50SP2 session?
According to FIX specification, sessions based on FIX50 works over FIXT11 session level protocol. So, to create such session, a FIXT11 parser should be configured in the engine.properties file and passed to the V12.FIXAntenna.FixEngine.create_session()
function. Eg.:
In engine.properties set:
AdditionalParsersList = FIX50FIXT11@FIXT11:FIX50
Then use the created parser name:
engine.create_session(v12.SessionId("TEST1", "TEST2"), "FIX50FIXT11", v12.FIXVersion.FIX50)
May I put session log files to the log directory and expect that FIX Antenna Python will analyze them when a new session with the same parameters is created?
Yes. FIX Antenna Python loads all session information on session creation time.
FIX Antenna Python was incorrectly terminated. I don’t want the session to be restored on next start. What should I do for a clean start?
Delete session log files from logs folder by mask:
<sender>-<target>*.*
How can I do the customization (add user-defined fields, messages or change field and message definitions)?
User Defined Fields (the tag numbers 5000 to 9999) are handled like ordinary fields. User-defined FIX messages (e.g. U1, U2) are also handled like ordinary messages. To do the customization, please see the description of the Validation.AdditionalFields configuration property.
How to fix the “Repeating group fields out of order” error?
Example: 8=FIX.4.3 | 9=285 | 35=X | 49=FIXERBRIDGETRD1 | 34=1 | 57=B2BTEST1 | 52=99990909-17:17:17 | 268=4 | 269=2 | 270=9539.500000 | 271=1 | 272=20041208 | 273=13:34:10.000 | 290=1 | 269=4 | 27 0 =9539.500000 | 271=4294967295 | 272=20041208 | 273=13:34:10.000 | 290=1 | 269=Z | 270=9528.000000 | 271=401 | 290=1 | 269=Y | 270=0.000000 | 271=0 | 290=1 | 10=019 | [ERROR] Repeating group fields out of order [RefSeqNum: 1, RefTagID: 269, RefMsgType: X]
Solution: The reason of this problem cannot be detected easily. The required fields of both FIX message itself and (AdditionalFields) group must be filled out with corresponding values and any gap or change in tag order leads to an error (it is true for both standard and custom messages). Therefore, both standard and additional group fields must be checked for validity and then processed again. Extra attention must be paid to the order of fields in the repeating FIX group. For this particular example: tag 290 is placed before tag 269 (wrong tag order).Place the 290 tag and its value after the tag 269 and process the message again to solve the problem.
How to remove a group from Repeating Groups?
Use the V12.FIXAntenna.FixGroupEntry.remove()
or V12.FIXAntenna.FixMessage.remove()
method, where tag is a Repeating Group Leading Tag. Setting the corresponding tag to zero is prohibited by FA Python (Parser Exception is thrown).
Is it possible to send messages in on_logon_event handler?
When session-acceptor receives a Logon message, the on_logon_event is fired. Sending messages in this event handler causes session none graceful termination. The reason is that the FIX protocol requires the first message to be Logon. It is prohibited to send messages in on_logon_event handler.
How to extend FIX message with repeating group defined in FIX protocol?
The AdditionalFields mechanism requires repeating the group specification fully. It is not enough to add a repeating group leading tag to add this group to the FIX message - all tags of this group have to be enumerated as well. For example the correct extension of the BF message is: Validation.AdditionalFields = FIX44:BF:386(336,625?)
Is it possible to use FixMessage and FixGroup after FixEngine destruction?
It is prohibited to continue using FIXMessage and FixGroup objects after FixEngine destruction, you may only destroy them.
What is format of FIX dictionary (fixdict.xml) file?
Format of the FIX dictionary file (a.k.a fixdict.xml) is defined by set of XSD files:
fixdic.xsd
fixdic_abstract.xsd
fixdics_operations.xsd
Format of the conditionally required expression is similar to Pascal syntax. Example:
T$1414 > 0 and existtags(T$1415) or T$1415 in ('A', 'B')
Set of available functions/operators:
existtags( T$<tag>, T$<tag>, … )
in
=, !=, <, >, >=, <=
and, or, not
T$<tag> - returns field value. Example: T$123.
Is there a way to enable “automatic reconnection” in the case that the FIX-sessions drops? I want to reconnect as soon as the server or the connection is available again.
You can set reconnect count to -1. This will force FIX Antenna to reconnect infinitely. To interrupt reconnection call V12.FIXAntenna.Session.disconnect_non_gracefully()
method.
How to create multiple sessions with same Sender/Target?
In version 2.10.15.5 of FIX Antenna and newer, you can first create V12.FIXAntenna.SessionId
structure by passing Sender, Target and unique Session Qualifier to its constructor. Then call one of overloaded methods V12.FIXAntenna.FixEngine.create_session()
which accepts V12.FIXAntenna.SessionId
structure as one of arguments. See section Session identifier of the documentation for more details.
What is Session Qualifier?
Session Qualifier is an extra identifier, which together with SenderCompID and TargetCompID uniquely identify session. In particular, this allow user creating several sessions with the same Sender/Target pair. See section Session identifier of the documentation for more details
Troubleshooting
I get “ERROR: Error: License is not valid - components will be stopped! Please contact us at sales@btobits.com for further assistance. “ error message right after start.
FIX Antenna cannot create listen port on start
Exception “Session could not be created - application fix protocol ‘FIX50’ is not available!” when creating FIX50 based session
I get “ERROR: Error: License is not valid - components will be stopped! Please contact us at sales@btobits.com for further assistance. “ error message right after start.
This error means that you have some problem with license file. Possible cases:
License is expired
License is invalid
License cannot be found
Make sure that your engine.license file is located according to the value of ‘LicenseFile’ property. Try to set the full path to engine.license in the ‘LicenseFile’ property. Send your logs and license file to sales@btobits.com.
FIX Antenna cannot create listen port on start
Make sure that this port is not in use by some other application. Try
netstat -a
to get a list of used ports.
Exception “Session could not be created - application fix protocol ‘FIX50’ is not available!” when creating FIX50 based session
Make sure that correct value of a parser name passed to V12.FIXAntenna.FixEngine.create_session()
function. FIX50 based session use FIXT11 session level protocol, instead of FIX. For additional information see How to create FIX50, FIX50SP1 or FIX50SP2 session? and FIX Session