[Quickfix-users] question handling Quote message
Brought to you by:
orenmnero
From: Doug M. <dou...@gm...> - 2009-07-27 19:52:49
|
I am having trouble parsing a Quote message using a c# version of QuickFix. An example message I have received is: 8=FIX.4.4 9=207 35=S 49=JTEST1 56=J_UAT_1 34=23 52=20090727-18:58:58 131=0 5271=InstrumentValuationResponse 555=1 600=NG 611=20091200 608=OCXXXX 1188=0.5775604818 7966=0.7208459105 612=4.9 681=1.098108096 1=dm1 10=021 I have the following method for reading the message: public override void onMessage(QuickFix44.Quote message, SessionID session) { int numLegs = message.getNoLegs().getValue(); for (uint n = 1; n<=numLegs; n++) { QuickFix44.Quote.NoLegs group = new QuickFix44.Quote.NoLegs(); message.getGroup(n, group); I correctly determine that the numLegs = 1. However, when I call message.getGroup, I get a FieldNotFound exception. If I am not using a data dictionary, I see the following in my event log: 20090727-18:59:05 : Message 23 Rejected: Conditionally Required Field Missing:555 Though, the 555 field is in the message. I suspect the problem has to do with the user defined fields, 1188 and/or 7966. I tried using a data dictionary, I modified the supplied fix44.xml dictionary to add fields for 1188 and 7966 and included them in the InsturmentLeg component. I also added the 5271 user defined field to the Quote message in the dictionary. After those changes, when using the data dictionary, the Quote message is rejected and I see the following in the event log: 20090727-18:48:53 : Message 3 Rejected: Tag not defined for this message type:612 612 is the LegStrikePrice, which should be supported on an InsturmentLeg, so I'm not sure why that is occuring? Is there anything else I need to do to handle these user defined fields? Am I doing something wrong in the onMessage method? Or is the message I am receiving badly formed? Is there anything else I should try to debug this? Thanks |