The Problem
The Financial Information Exchange protocol (https://www.fixtrading.org/) is a communication format that defines how financial institutions communicate transactions to one another. It is a text-based format where each message consists of a bunch of numbered tags as keys and their corresponding values. An equal sign separates tags and values. The 0x01 (SOH) character separates the tag/value pairs.
For example, the simplest message that you will send or receive is a heart-beat message. The HeartBeat is a periodic message that each side sends to let the other side know that your application is still around and in a good state.
Here is an example Heart Beat:
8=FIX.4.2|9=74|35=0|34=4846459|49=MySystem|52=20200325-15:00:16.455|56=TargetSystem|10=195|%
I've replaced the SOH characters with pipes so you can see them.
As you can see, this format was created to be compact over the wire, but not necessarily easy to interpret by people. Programs use a Data Dictionary that defines what the tags mean. When troubleshooting FIX connectors, you are often having to look at large files containing thousands of these messages, against data dictionaries which have hundreds of tags defined.
The Solution
While troubleshooting why my application failed to process some messages, I thought there has to be a better way to look at these FIX logs. I was thinking of writing a VSCode plug-in to parse these types of log files and print them in a human-readable format. It turns out that a man named Gary Huges beat me to the punch. This VSCode plug-in already exists, and it is called FIX master.
You can find it here: https://marketplace.visualstudio.com/items?itemName=geh-fixmaster.fixmaster or by searching for "FIX Master" in the Visual Studio Code Extension Marketplace.
This plug-in will pretty print your FIX messages and do the required dictionary lookup. For example, the plug-in will turn the example heart-beat above to this:
Heart-beat
{
BeginString (8) FIX.4.2
BodyLength (9) 74
MsgType (35) 0 - Heartbeat
MsgSeqNum (34) 4846459
SenderCompID (49) MySystem
SendingTime (52) 20200325-15:00:16.455
TargetCompID (56) TargetSystem
CheckSum (10) 195
}
If you do any work with FIX Protocol messages, I encourage you to check out this excellent plug-in. If you like it be sure to leave a review in the Marketplace and Star the project on Github.
Top comments (0)