Wapiti Wapiti - 1 year ago 145
Python Question

Getting fields from quickfix message

I am using quickfix with python. Looking at the doc page here tells us how to get fields. Say a

message = fix.message
quickfix as fix
) comes in from the counterparty. I can get the 35 (MsgType) field by calling


which returns, for example,

My question is: is there any method which just returns
? Or do I have to slice everything (like
, which returns
) and know the length of all the strings therefore?

Answer Source

The answer is to get the field by first calling message.getHeader().getField(fix.MsgType()) then get the value by calling fix.MsgType().getValue().