FIX Protocol
April 20th, 2007 byThere are a lot of jobs out there right now for programmers who know Fix, but what is it and how do you learn it? Fix is short for: Financial Information Exchange Protocol
Step one, get a fix engine and load it on your computer. I recommend the QuickFix engine because it’s free and open source. QuickFixEngine
Step two, download the fix protocol specifications. There are different versions of the specification.
Fix Protocol Specifications
Fix is broken up into two layers. First, there is the session layer. Session layer messages are going to handle things like Logon, Logout, Message Recovery, Heartbeats, Test Requests, Resend Requests, Rejects, Sequence Resets (Gap Fills), and more. Secondly, there is the Application layer. Since Fix deals with trade information for the stock market and futures market, the application layer messages will be along the lines of sending an order, getting a fill, changing an order, and more.
The fix messages themselves are broken up into Tags.
Tag = Value Delimiter
So, and example would look like this: 35=D |
35 is the Tag
D is the value
| is the delimiter
A fix messages is made up of many tags. Here is an example:
{code wrapped}
Send(12/06/2006-10:23:43.175)|8
=FIX.4.2|9=00060|35=0|49
=Alex|56=orders|34=99|52=20041206-10:23:43.175|10=080|
Understanding the tags is key. For example, Tag 34 is the sequence number. All Fix messages will have a sequence number. Sequence numbers ensure that the data is delivered in sequential order. If the sequence numbers fall out of sync with one another then your application must recover. In the message above, the sequence number is 99 because tag 34=99. Tag 34 is the sequence number and 99 is the value. All of the tags can be found documented in the fix specification document.
Tag 35 is the type of fix message being sent. 35=0 shows us that this message is a heartbeat message. Heartbeats will flow from fix machines every 30 seconds or so. This is configurable typically.
Here are some other important values for tag 35:
TAG 35 = A Log on
TAG 35 = 8 Execution Report
TAG 35 = 0 Heartbeat
TAG 35 = D New Order
TAG 35 = d Security Definition
The entire idea behind fix is that you send a fix message, say a 35=c which is a request for security definitions. Security definitions are the details on the contracts for sale or for purchase at an exchange. If you send a request for security definition then a fix machine that is setup to listen for these requests will start sending your all security definitions listed on the exchange it connects too. A security definition will have tag 35=d
As a FIX programmer, you will need to get the fix engine talking to your business logic application layer. You will use the Fix engine API to send your business messages to whatever other fix party you are talking to in the system architecture of your project. An example of a typical architecture would be creating a Fix Client Front End Trading System. So, you would download Quick Fix and use its API to send messages both for the Session Layer and the Application Layer to another fix machine that would talk to a Futures exchange or an Equities exchange to place orders and get fills.
All communication that I am aware of in FIX is TCP/IP. It is all about sending and receiving fix messages like the example above. If a programmer wants to learn fix to get a job programming a fix trading system then following these steps to learn more about fix makes them very marketable in the financial industry at this time.

