Saturday, April 2, 2016

Fix Protocol Braindump


Spec PDF
http://cdn.batstrading.com/resources/membership/BATS_US_EQUITIES_FIX_SPECIFICATION.pdf

http://www.fixtradingcommunity.org/FIXimate/FIXimate3.0/
http://fixparser.com/
ef311b37

Commonly used Tags
58 -- Free form text, error message
44- limit price
8 --begin
35 msgtype (0=heartbeat 1=test 5/A=logout/logon 2=resent/request D=new order single
   9=ordcxlrequest 8=execrpt(F,PF,ZF) 4=seg# resend 3=reject)

Example of Tag 35
35-3+ tag45 =>reject with tag 45 Seq #
35-2+tag7(20) and Tag16(30) =>Resend with begin 20, end 30
35-2, only see 12,14 missing 13
35-4 => user did not logout, next day see high Seq#

49/5-- sender/tgt compId=Routing Tag
34 --Seq #, connection troubleshooting
50/59 --Sender/Tgt subid, which trader on both side
43/97--PossDup/Resend--possible resend, new seq #
52/122-- sending/original timestamp
372/373 ---refmsgtype/reason for 35/3 reject
123 --GapFillFlag ----Do not resend expired order 35/4 Y=> req-sequencing

Order Entry Message
1-Acct 11-CientOrderID 60--Transaction Timestamp (Latency Complaints
55--Symbol 65--sufix FB.TO .PK (Toronto, pinksheet) .SS China 54-side
38-Tot Qty 111-Max Floor, Display Qty, on exch floor
40--ordertype 2=limit p=Pegged 59 --Time In Force 0-day 6=GTC good tc 
IOC=Imm or cxl, FOK fill or kill
126--Expire time
32=100 38=100 => 39=4  LastShr/OrdQty=> filled=2
110=110 38=210 32=10 minQty=> wrong data
38=100 110=200 wrong setup 
18 --execinst --- R=primary Peg P=mkt peg M=Mid Pt Peg
Peg=Limit order matching bets=Mkt ord
110--MinQty 31/32=Last Px/Share
39-- Order Status(New=0,PF,ZF 2=Filled, Done for day, Expired)

filter using bash
$ cat log.txt | grep '52=' |grep -v 'Note' | awk '{gsub(/52=/,"____SendTime____");print}' | awk '{gsub(/54=2/,"____SELL____");print}'
must have tag 52 but does not have 'Note' replace 52 as SendTS 54=2 as SELL order
cat *.log | grep | awk combined log
 

No comments:

Post a Comment