Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Python Script to Prettify FIX Protocol Message Logs

0.00/5 (No votes)
28 Jan 2017 1  
Python Script to fill FIX Protocol Message Logs with information

The Financial Information eXchange (FIX) protocol is an electronic communications protocol initiated in 1992 for international real-time exchange of information related to the securities transactions and markets. The message fields are delimited using the ASCII 01 <start of header> character. They are composed of a header, a body, and a trailer. Example of a FIX message: (Pipe character is used to represent SOH character.)

8=FIX.4.2|9=178|35=8|<snipped>

The key in the key/value pair (separated by =) is represented by a number which can be decoded using dictionary XML for easier reading. This Python 2.7 script can replace the numeric key with the actual field name and also replace the numeric enum value with actual enum description. It is tested with FIX Protocol 5.0 SP2. The script requires at least 3 parameters.

python prettify_fix_log.py [-h][-e] <src log file> <output prettified log file> 
<path to FIX50SP2.xml> <path to FIXT11.xml>
Option -h: display usage
Option -e: convert enum to description

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here