Overview of the FIX messaging protocol

2021/09/27

FIX (Financial Information Exchange) is a protocol for securities-related communication. FIX specifies a presentation- and application-layer protocol: it dictates how messages can be encoded, and what their contents can be. In many use cases FIX is like the electronic version of the open outcry and post-it note passing of trading prior to electronification: it handles messaging between traders, exchanges, custodians, clearinghouses, and the other entities involved in securities markets.

Over 10TB of FIX data are generated daily, ranging from security definitions to orders to market data.

An example

Here’s an example of how people use FIX: you, a registered representative at $INVESTMENT_FIRM, want to place a trade in AAPL. You open a ticket in your trading platform; then you enter a quantity, side, a few other parameters, and hit SUBMIT.

Your trading platform sends a FIX message to $BROKERDEALER:

# TODO clean this up
8=FIX.4.4 | 9=148 | 35=D | 34=1080 | 49=TESTBUY1 | 52=20180920-18:14:19.508 | 56=TESTSELL1 | 11=63673064027889863415=USD21=2 | 38=7000 | 40=1 | 54=1 | 55=AAPL | 60=20180920-18:14:19.492 | 10=092 |

This is a plaintext ASCII message. Your trading platform sends it over TCP/IP to a FIX server in $BROKERDEALER’s server farm in New Jersey. The message encodes all the relevant information about this buy order in tag-value format: a tag is a specific field in the FIX schema, and a value is whatever value your trading platform assigned to that tag. For example,

This message format is sufficient for most use cases. Sometimes, ASCII-encoded and pipe-delimited messages (or XML for that matter) are too heavy. At the presentation-layer there are other ways to encode FIX messages (e.g. Simple Binary Encoding).

Regardless of encoding, the FIX protocol assumes ordered delivery of messages – that is, $BROKERDEALER’s FIX server assumes it will receive messages in the order that $INVESTMENT_FIRM’s trading platform sent them. Ordered delivery (or session failure) is guaranteed by a combination of sequence numbers and Ack/Response messages.

Establishing & maintaining a connection

Some things have to happen so that you, registered representative at $INVESTMENT_FIRM, can hit SUBMIT in trading platform and expect an order to be placed. Sometime early in the morning, your trading platform probably initiated a FIX session with $BROKERDEALER’s FIX server by sending a Logon(A) message:

8=FIX.4.2|9=76|35=A|49=BuySide|56=SellSide|34=1|52=20190605-11:27:06.897|98=0|108=30|141=Y|10=008|

Tag HeartBtInt(108) specifies the interval, in seconds, between heartbeat messages.

The full trade processing lifecycle

???