[Quickfix-developers] Simple beginner questions
Brought to you by:
orenmnero
From: <ja...@sk...> - 2015-06-11 20:18:01
|
Hi, Currently I'm trying to obtain the market value of a symbol from a reply message from a server, however, I'm not sure on how to obtain the value in field 270(MDEntryPx). void Application::onMessage (const FIX42::MarketDataSnapshotFullRefresh& message, const FIX::SessionID&) { FIX::NoMDEntries noMDEntries; message.get(noMDEntries); // incomplete type is not allowed } when I typed in the above code in my application.cpp, I could not compile due to the error commented. void Application::fromApp(const FIX::Message& message, const FIX::SessionID& sessionID) throw(FIX::FieldNotFound, FIX::IncorrectDataFormat, FIX::IncorrectTagValue, FIX::UnsupportedMessageType) { crack(message, sessionID); std::cout << std::endl << "IN: " << message << std::endl; FIX::MsgType msgType; message.getHeader().getField(msgType); if (msgType.getValue() == "W"){ std::string value = message.getHeader().getField(270); //MDEntryPx mkval = std::stod(value); //mkval is a double } } when I used the above code, I could compile and run, but when it reached the line std::string value = message.getHeader().getField(270); I received an toApp message with 58=Conditionally Required Field Missing <270> May I know what I can change in order to be able to store the symbol price into a double object? |