Re: [Quickfix-developers] market data request message
Brought to you by:
orenmnero
From: choudhry a. <ch...@gm...> - 2009-11-04 20:05:59
|
Grant: Thanks for the reply. I have looked in to it, but unable to figure out where is the issue still toApp is getting invoked, instead of fromApp. Below is my code for market data request message and the config file. If you can please have a look in to it and suggest me where is the issue. code for market data request, toAPP, fromAPP and OnMessage : void Application::queryMarketDataRequest() { std::cout << "\nMarketDataRequest\n"; FIX::Message message; FIX::MDReqID mdReqID( "MARKETDATAID" ); FIX::SubscriptionRequestType subType( FIX::SubscriptionRequestType_SNAPSHOT_PLUS_UPDATES ); FIX::MarketDepth marketDepth( 1 ); FIX44::MarketDataRequest::NoMDEntryTypes marketDataEntryGroup; FIX::MDEntryType mdEntryType( FIX::MDEntryType_BID ); FIX44::MarketDataRequest message( mdReqID, subType, marketDepth ); marketDataEntryGroup.set( mdEntryType ); message.addGroup( marketDataEntryGroup ); FIX::MDEntryType mdEntryType1( FIX::MDEntryType_OFFER ); marketDataEntryGroup.set( mdEntryType1 ); message.addGroup( marketDataEntryGroup ); message.getHeader().setField(FIX::SenderCompID("TW")); message.getHeader().setField(FIX::TargetCompID("ISLD")); message.getHeader().setField(FIX::TargetSubID("qfstream")); message.getHeader().setField(FIX::SenderSubID("user3")); message.getHeader().setField(35, "V"); message.getHeader().setField(265, "0"); message.getHeader().setField(1, "ACCT1@TW"); message.getHeader().setField(146, "1"); message.getHeader().setField(55, "GBP/USD"); message.getHeader().setField(38, "10000"); message.getHeader().setField(15, "USD"); message.getHeader().setField(453, "1"); message.getHeader().setField(108, "10"); FIX::Session::sendToTarget( message,"FIXMDR" ); } void Application::fromApp( const FIX::Message& message, constFIX::SessionID& sessionID ) throw( FIX::FieldNotFound, FIX::IncorrectDataFormat, FIX::IncorrectTagValue, FIX::UnsupportedMessageType ) { crack( message, sessionID ); std::cout << std::endl << " formApp IN: " << message << std::endl; } void Application::toApp( FIX::Message& message, const FIX::SessionID& sessionID ) throw( FIX::DoNotSend ) { try { FIX::PossDupFlag possDupFlag; message.getHeader().getField( possDupFlag ); if ( possDupFlag ) throw FIX::DoNotSend(); } catch ( FIX::FieldNotFound& ) {} std::cout << std::endl << "toApp OUT: " << message << std::endl; } void Application::onMessage( const FIX44::MarketDataRequest& message, constFIX::SessionID& id ) { std::cout<<"\n in onMessage for marketdata "<<message<<std::endl<<message; } Here is the config file: # default settings for sessions [DEFAULT] ConnectionType=initiator ReconnectInterval=20 LogonTimeout=30 StartTime=00:00:00 EndTime=23:00:00 HeartBtInt=10 #SocketConnectHost=localhost SocketConnectHost=127.0.0.1 SocketConnectPort=9000 FileLogPath=c:\qfixlogs\ FileStorePath=c:\qfixstore\ [SESSION] BeginString=FIX.4.4 TargetCompID=ISLD SessionQualifier=FIXMDR TargetSubID=qfstream SenderCompID=TW SenderSubID=user3 RawData=1234567 HeartBtInt=10 FileLogPath=c:\qfixlogs\ FileStorePath=c:\qfixstore\ UseDataDictionary=N DataDictionary=C:\quickfix-1.12.4\quickfix\spec\FIX44.xml On Wed, Nov 4, 2009 at 8:31 PM, Grant Birchmeier <gbi...@co...>wrote: > It appears that app TW is sending out your MarketDataRequest just fine. > > It is rejecting the app ISLD's market data (35=X) response ("Tag > appears more than once"). > > Which app, TW or ISLD, are you asking about? When an app receives a > message, it triggers fromApp(), which should almost always call > crack(), which will call onMessage(<type>). > > When an app sends a message, the message goes through toApp(), to give > you a chance to intercept or abort the message. Myself, I rarely have > need to use this function. > > So, in your apps: > 1) TW will invoke toApp() when it sends the MarketDataRequest. > 2) When ISLD receives the MarketDataRequest, it will invoke fromApp(), > then crack(), then onMessage(MarketDataRequest). > > -Grant > > > On Wed, Nov 4, 2009 at 4:32 AM, ch...@gm... <ch...@gm...> > wrote: > > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > > QuickFIX Support: http://www.quickfixengine.org/services.html > > > > > > Hi I want to send a market data request message . > > > > i the Application My fromApp and OnMessage is not getting invoked in > > response to the message; instead ToApp is getting involed. > > Below are logs please have a look and suggest my how to fix this > > issue............. > > > > Thanks, > > Asad > > > > 8=FIX.4.4 9=80 35=4 49=ISLD 56=TW 34=129 52=20091102-19:48:21 43=Y > 57=user3 > > 123=Y 36=175 10=010 > > 8=FIX.4.4 9=203 35=V 1=ACCT1@TW 15=USD 34=108 38=10000 49=TW 50=user3 > > 52=20091102-19:48:32.589 55=GBP/USD 56=ISLD 57=qfstream 108=10 146=1 > 265=0 > > 448=BANK1 453=1 262=MARKETDATAID 263=1 264=1 267=2 269=0 269=1 10=152 > > 8=FIX.4.4 9=174 35=X 49=ISLD 56=TW 34=175 52=20091102-19:48:30 115=BANK1 > > 57=user3 262=MARKETDATAID 268=2 279=2 269=0 279=2 269=1 58=Provider > > withdrawing customer from a shared stream. 10=194 > > 8=FIX.4.4 9=134 35=3 34=109 49=TW 50=user3 52=20091102-19:48:33.051 > 56=ISLD > > 128=BANK1 45=175 58=Tag appears more than once 371=269 372=X 373=13 > 10=019 > > 8=FIX.4.4 9=237 35=X 49=ISLD 56=TW 34=176 52=20091102-19:48:30 115=BANK1 > > 57=user3 262=MARKETDATAID 268=2 279=0 269=1 55=GBP/USD 270=1.63935 15=USD > > 271=10000 299=S.7809825/1100 279=0 269=0 55=GBP/USD 270=1.63885 15=USD > > 271=10000 299=S.7809825/1100 10=173 > > 8=FIX.4.4 9=133 35=3 34=110 49=TW 50=user3 52=20091102-19:48:33.270 > 56=ISLD > > 128=BANK1 45=176 58=Tag appears more than once 371=15 372=X 373=13 10=211 > > 8=FIX.4.4 9=237 35=X 49=ISLD 56=TW 34=177 52=20091102-19:48:30 115=BANK1 > > 57=user3 262=MARKETDATAID 268=2 279=0 269=1 55=GBP/USD 270=1.63910 15=USD > > 271=10000 299=S.7809825/1101 279=0 269=0 55=GBP/USD 270=1.63890 15=USD > > 271=10000 299=S.7809825/1101 10=165 > > 8=FIX.4.4 9=133 35=3 34=111 49=TW 50=user3 52=20091102-19:48:33.414 > 56=ISLD > > 128=BANK1 45=177 58=Tag appears more than once 371=15 372=X 373=13 10=213 > > 8=FIX.4.4 9=75 35=1 34=112 49=TW 50=user3 52=20091102-19:48:36.283 > 56=ISLD > > 112=TEST 10=112 > > 8=FIX.4.4 9=71 35=0 49=ISLD 56=TW 34=178 52=20091102-19:48:33 57=user3 > > 112=TEST 10=176 > > 8=FIX.4.4 9=237 35=X 49=ISLD 56=TW 34=179 52=20091102-19:48:34 115=BANK1 > > 57=user3 262=MARKETDATAID 268=2 279=0 269=1 55=GBP/USD 270=1.63915 15=USD > > 271=10000 299=S.7809825/1102 279=0 269=0 55=GBP/USD 270=1.63885 15=USD > > 271=10000 299=S.7809825/1102 10=182 > > 8=FIX.4.4 9=133 35=3 34=113 49=TW 50=user3 52=20091102-19:48:37.339 > 56=ISLD > > 128=BANK1 45=179 58=Tag appears more than once 371=15 372=X 373=13 10=227 > > 8=FIX.4.4 9=237 35=X 49=ISLD 56=TW 34=180 52=20091102-19:48:37 115=BANK1 > > 57=user3 262=MARKETDATAID 268=2 279=0 269=1 55=GBP/USD 270=1.63905 15=USD > > 271=10000 299=S.7809825/1103 279=0 269=0 55=GBP/USD 270=1.63885 15=USD > > 271=10000 299=S.7809825/1103 10=178 > > 8=FIX.4.4 9=133 35=3 34=114 49=TW 50=user3 52=20091102-19:48:40.364 > 56=ISLD > > 128=BANK1 45=180 58=Tag appears more than once 371=15 372=X 373=13 10=212 > > -- > > View this message in context: > http://old.nabble.com/market-data-request-message-tp26193248p26193248.html > > Sent from the QuickFIX - Dev mailing list archive at Nabble.com. > > > > > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > > trial. Simplify your report design, integration and deployment - and > focus on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Quickfix-developers mailing list > > Qui...@li... > > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > > > |