The anatomy of a FIX message
In my current role I've spend some time working with the FIX protocol, which is:
an electronic communications protocol initiated in 1992 for international real-time exchange of information related to securities transactions and markets.
I'm pretty lucky in that there's an awesome library called QuickFix/n that takes care of doing the grunt work for me, but it's never a bad idea to have some understanding of what's happening "on the wire". To that end I took time to pick apart a FIX message using this awesome repository of information at onixs.biz to do so.
The message in question was a request for a quote for a foreign exchange transaction for the EUR/GBP pair, which looks like this:
8=FIX.4.29=17135=R34=325749=COMP-PRICES52=20180508-09:02:43.96856=BANK-PRICES
131=Q-EURGBP-BUY-3357-636613669639680362146=155=EUR/GBP15=EUR38=335740=C
54=164=20180508167=FOR10=150
The message is constructed as follows:
Field |
Value |
What it is |
8 “BeginString” |
FIX.4.2 |
Identifies the start of a message and specifies the protocol version being used |
9 “BodyLength” |
171 |
The length (bytes) of everything up until the field “CheckSum” |
35 “MsgType” |
R |
The type of message: Quote Request |
34 “MsgSeqNum” |
3257 |
The message sequence number. This increments as each message goes back and forth |
49 “SenderCompId” |
COMP-PRICES |
The identity of the sender of the message |
52 “SendingTime” |
20180508-09:02:43.968 |
The time we sent the message |
56 “TargetCompId” |
BANK-PRICES |
The identity of the recipient of the message |
131 “QuoteReqID” |
Q-EURGBP-BUY-3357-636613669639680362 |
Unique identifier for the quote |
146 “NoRelatedSym” |
1 |
The number of repeating symbols specified |
55 “Symbol” |
EUR/GBP |
The currency pair we’re asking for a quote in |
15 “Currency” |
EUR |
The currency used for price |
38 “OrderQty” |
3357 |
The quantity to be used (the amount of money) |
40 “OrdType” |
C |
The type of order. C = “Forex – Market” |
54 “Side” |
1 |
2 = “Buy” |
64 “FutSettDate” |
20180508 |
The settlement date |
167 “SecurityType” |
FOR |
FOR = “Foreign Exchange Contract” |
10 “CheckSum” |
150 |
A calculated three byte checksum based on a calculation referenced in the linked doc |
Hopefully this will be useful to someone (other than me)!