[Quickfix-developers] application messages
Brought to you by:
orenmnero
From: Doug a. M. G. <dou...@gm...> - 2011-05-20 02:05:11
|
I'm still trying to learn FIX and quickfix. If my broker has custom application messages, do I subclass the Message class. I found this previous message * http://permalink.gmane.org/gmane.comp.finance.quickfix.devel/4467 I'm developing in C++ and what I have so far is throwing a validation error in Message::extractField looking for an = sign in the message. I'm trying to send this message, not receive it, and I was expecting the class to build the formatted message for me. I'm not sure what I'm missing. I've written this class: namespace FIXCQG { class AccountDataRequest : public FIX::Message { public: AccountDataRequest() : Message(MsgType()) {} AccountDataRequest(const FIX::Message& m) : Message(m) {} ~AccountDataRequest() {} static FIX::MsgType MsgType() { return FIX::MsgType("UAR"); } FIELD_SET(*this, FIX::Account); FIELD_SET(*this, FIX::SubscriptionRequestType); FIELD_SET(*this, FIX::AcctReqID); }; } I've changed the XML file as follows (psuedo diff syntax, I added the lines with +) <messages> + <message name='AccountDataRequest' msgcat='app' msgtype='uar'> + <field name='Account' required='N' /> + <field name='SubscriptionRequestType' required='N' /> + <field name='AcctReqID' required='Y' /> + </message> </messages> <fields> + <field number='20003' name='AcctReqID' type='STRING' /> </fields> Thanks, Doug |