Re: [Quickfix-developers] Followed up question about market data request
Brought to you by:
orenmnero
From: Grant B. <gbi...@co...> - 2019-11-05 17:14:17
|
Don't just blindly copy from the examples. Have you looked at your counterparty's documentation? You need to understand the meaning of every value of every field in the messages that you're sending out, according to what their docs say. 2 issues: 1) They are rejecting your MD Request. This is an application-level reject, which means the basic FIX is valid, but your counterparty has decided that the logic of your request is invalid. Are you specifying an invalid or expired instrument? An unsupported depth? Is there a typo in your symbol? 2) You aren't handling message type Y (MarketDataRequestReject). They are sending you a reject, and your app actually rejecting that reject, because you didn't implement a handler for it. -Grant On Sat, Oct 19, 2019 at 12:22 PM Cheng Shanbao <che...@gm...> wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/ > > Dear All, > > Hello again, > > I was modifying my codes, but still get the error of" Invalid > NoMDEntryTypes ",as shown below. > 58=Invalid NoMDEntryTypes262=MARKETDATAID281=810=168 > > It looks like I can log on successfully, and sent out the message to the > server. But the message format may be wrong. I checked my code of > "NOMDEntryTypes", but don't find any problems, since I was using the sample > code of tradeclient from quickfix, and looks like a lot of other people > used the same codes as well. > > Can somebody take a quick look at my corresponding source code below? > Thanks! > > Shanbao > > The below is the market data request code inside my onlogon Function: > > void Application::onLogon( const FIX::SessionID& sessionID ) > { > std::cout << std::endl << "Logon - " << sessionID << std::endl; > > std::cout << "Market Data Request Test" << std::endl; > FIX::MDReqID mdReqID("MARKETDATAID"); > FIX::SubscriptionRequestType > subType(FIX::SubscriptionRequestType_SNAPSHOT); > FIX::MarketDepth marketDepth(1); > > FIX44::MarketDataRequest::NoMDEntryTypes marketDataEntryGroup; > FIX::MDEntryType mdEntryType(FIX::MDEntryType_BID); > marketDataEntryGroup.set(mdEntryType); > > //marketDataEntryGroup.set(FIX::MDEntryType('1')); > FIX44::MarketDataRequest::NoRelatedSym symbolGroup; > FIX::Symbol symbol("EURUSD.spa"); > symbolGroup.set(symbol); > > FIX44::MarketDataRequest message(mdReqID, subType, marketDepth); > message.addGroup(marketDataEntryGroup); > message.addGroup(symbolGroup); > > message.getHeader().setField(35, "V"); > message.getHeader().setField(265, "0"); > > std::cout << "before sending" << std::endl; > FIX::Session::sendToTarget(message, sessionID); > std::cout << "market data request sent out" << std::endl; > } > > The complete cmd log is as follows: > > <20191019-16:57:55.313000000, FIX.4.4:107225->QUOTES, event> > > (Created session) > > <20191019-16:57:55.523000000, FIX.4.4:107225->QUOTES, event> > > (Connecting to 208.68.172.83 on port 7549 (Source :0)) > > toAdmin called > > <20191019-16:57:55.620000000, FIX.4.4:107225->QUOTES, outgoing> > > > (8=FIX.4.49=9735=A34=149=10722552=20191019-16:57:55.61856=QUOTES553=107225554=yf3y2i4s98=0108=30141=Y10=013) > > <20191019-16:57:55.621000000, FIX.4.4:107225->QUOTES, event> > > (Initiated logon request) > > <20191019-16:57:55.708000000, FIX.4.4:107225->QUOTES, incoming> > > > (8=FIX.4.49=6735=A34=149=QUOTES52=20191019-16:57:54.02756=10722598=0108=3010=033) > > <20191019-16:57:55.709000000, FIX.4.4:107225->QUOTES, event> > > (Received logon response) > > > > Logon - FIX.4.4:107225->QUOTES > > Market Data Request Test > > before sending > > > > OUT: > 8=FIX.4.49=12235=V34=249=10722552=20191019-16:57:55.71056=QUOTES265=0146=155=EURUSD.spa262=MARKETDATAID263=0264=1267=1269=010=193 > > <20191019-16:57:55.710000000, FIX.4.4:107225->QUOTES, outgoing> > > > (8=FIX.4.49=12235=V34=249=10722552=20191019-16:57:55.71056=QUOTES265=0146=155=EURUSD.spa262=MARKETDATAID263=0264=1267=1269=010=193) > > market data request sent out > > <20191019-16:57:56.893000000, FIX.4.4:107225->QUOTES, incoming> > > > (8=FIX.4.49=10435=Y34=249=QUOTES52=20191019-16:57:54.56256=10722558=Invalid > NoMDEntryTypes262=MARKETDATAID281=810=168) > > <20191019-16:57:56.894000000, FIX.4.4:107225->QUOTES, event> > > (Message 2 Rejected: Unsupported Message Type) > > > > OUT: > 8=FIX.4.49=10035=j34=349=10722552=20191019-16:57:56.89456=QUOTES45=258=Unsupported > Message Type372=Y380=310=120 > > <20191019-16:57:56.895000000, FIX.4.4:107225->QUOTES, outgoing> > > > (8=FIX.4.49=10035=j34=349=10722552=20191019-16:57:56.89456=QUOTES45=258=Unsupported > Message Type372=Y380=310=120) > > <20191019-16:58:26.702000000, FIX.4.4:107225->QUOTES, outgoing> > > (8=FIX.4.49=5535=034=449=10722552=20191019-16:58:26.70256=QUOTES10=247) > > -- > Best regards > > Cheng Shanbao > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers -- Grant Birchmeier *Connamara Systems, LLC* *Made-To-Measure Trading Solutions.* Exactly what you need. No more. No less. http://connamara.com |