Re: [Quickfix-users] Checking for tags in message.
Brought to you by:
orenmnero
From: Grant B. <gbi...@co...> - 2010-02-25 14:19:47
|
Use isSetField(): bool isSetField (const FieldBase &field) const Check to see if a field is set. See FieldMap: http://quickfixengine.org/quickfix/doc/html/class_f_i_x_1_1_field_map.html which is the superclass of Message. -Grant On Thu, Feb 25, 2010 at 8:09 AM, gtsafas <gt...@rb...> wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > I am currently catching execution reports using quickfix in c++. > > When I look for something like tag 60 (TransactTime) if a message doesnt > contain it it rejects it. NYSE for example will not put 60 on some of their > messages. > > How can I check if the tag exists before I set it. > > > > > FIX::TransactTime fTRANSACTTIME; > FIX::Symbol fSYMBOL; > FIX::Side fSIDE; > > FIX::OrderQty fORDERQTY; > FIX::LastShares fLASTSHARES; > > FIX::LastMkt fLASTMKT; > FIX::LastPx fLASTPX; > > FIX::ExecBroker fEXECBROKER; > > FIX::OrdStatus fORDSTATUS; > FIX::ClOrdID fCLORDID; > > > > > > std::cout << std::endl << "Execution Report: " << message << std::endl << > std::endl; > std::cout << "Transact Time(60): " << message.get(fTRANSACTTIME) << > std::endl; > std::cout << "Exec Broker(76): " << message.get(fEXECBROKER) << std::endl; > std::cout << "Symbol(55): " << message.get(fSYMBOL) << std::endl; > std::cout << "Side(54): " << message.get(fSIDE) << std::endl; > std::cout << "FULL Order Quantity(32): " << message.get(fORDERQTY) << > std::endl; > std::cout << "Order Quantity(32): " << message.get(fLASTSHARES) << > std::endl; > std::cout << "Price(31): " << message.get(fLASTPX) << std::endl; > std::cout << "Last Market of Execution(30): " << message.get(fLASTMKT) << > std::endl; > > > -- > View this message in context: http://old.nabble.com/Checking-for-tags-in-message.-tp27714438p27714438.html > Sent from the QuickFIX - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Quickfix-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-users > |