[Quickfix-developers] Urgent question about substribe to server and marketDataRequest
Brought to you by:
orenmnero
From: Cheng S. <che...@gm...> - 2019-10-18 07:09:59
|
Dear All, Firstly, thanks Grant for helping me on the logging on issue and now I can successfully logged onto the server. But now I am stuck with the marketDataRequest. I try to subscribe the EURUSD price from the server, but the sendToTarge(message) function has no response at all. I called MarketDataRequest function inside the LogOn() function. Inside my MarketDataRequest function, I am supposed to see "market data request sent out" from my std:cout, but I don't see it. Also I don't see any market data information coming from the server. Can somebody please take a look at my source code and let me know where I did wrong? Thanks with appreciation. *The below shows the command window text:* D:\Personal\Forex\QuickFix\quickfix\examples\tradeclient\bin\release\tradeclient>tradeclient.exe Initiator.cfg <20191018-06:56:29.258000000, FIX.4.4:107225->QUOTES, event> (Created session) <20191018-06:56:29.464000000, FIX.4.4:107225->QUOTES, event> (Connecting to 208.68.172.83 on port 7549 (Source :0)) toAdmin called <20191018-06:56:29.584000000, FIX.4.4:107225->QUOTES, outgoing> (8=FIX.4.4 9=97 35=A 34=1 49=107225 52=20191018-06:56:29.582 56=QUOTES 553=107225 554=yf3y2i4s 98=0 108=30 141=Y 10=011 ) <20191018-06:56:29.613000000, FIX.4.4:107225->QUOTES, event> (Initiated logon request) <20191018-06:56:29.741000000, FIX.4.4:107225->QUOTES, incoming> (8=FIX.4.4 9=67 35=A 34=1 49=QUOTES 52=20191018-06:56:28.990 56=107225 98=0 108=30 10=040 ) <20191018-06:56:29.742000000, FIX.4.4:107225->QUOTES, event> (Received logon response) Logon - FIX.4.4:107225->QUOTES MarketDataRequest Market Data Request Test before sending *The below is my source code in Application.cpp:* void Application::onLogon( const FIX::SessionID& sessionID ) { std::cout << std::endl << "Logon - " << sessionID << std::endl; queryMarketDataRequest(); } FIX44::MarketDataRequest Application::queryMarketDataRequest44() { 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 ); FIX44::MarketDataRequest::NoRelatedSym symbolGroup; FIX::Symbol symbol( "EURUSD.spa" ); symbolGroup.set( symbol ); FIX44::MarketDataRequest message( mdReqID, subType, marketDepth ); message.addGroup( marketDataEntryGroup ); message.addGroup( symbolGroup ); std::cout << "before sending" << std::endl; FIX::Session::sendToTarget(message); //std::cout << message.toXML() << std::endl; //std::cout << message.toString() << std::endl; std::cout << "market data request sent out" << std::endl; return message; } -- Best regards Cheng Shanbao |