Can't get market data request

ludinhquan since: 26 Oct 2019; 
 08 Nov 2019, 05:25
Can't get market data request

Hi team!

I am testing sample FIX API and I am unable to get market data although I logged 

My FIX Message is:

8=FIX.4.4|9=122|35=V|34=2|49=fxpro.8152236|50=QUOTE|52=20191108-02:28:24.000|56=CSERVER|57=QUOTE|55=2|146=0|262=1|263=1|264=0|267=2|269=1|10=138

The response I received: 

8=FIX.4.4|9=156|35=3|34=2|49=CSERVER|50=QUOTE|52=20191108-02:28:26.058|56=fxpro.8152236|57=QUOTE|45=2|58=Tag not defined for this message type, field=55|371=55|372=V|373=2|10=251

My code: 

def getMarketData(self):
        """get Market data"""
        message=fix44.Message()
        header=message.getHeader()

        header.setField(fix.MsgType(fix.MsgType_MarketDataRequest))
        header.setField(fix.TargetSubID("QUOTE"))
        header.setField(fix.SenderSubID("QUOTE"))
        
        message.setField(fix.MDReqID("1"))
        message.setField(fix.SubscriptionRequestType(ord("1")))
        message.setField(fix.MarketDepth(0))
        message.setField(fix.NoMDEntryTypes(2))
        message.setField(fix.MDEntryType(ord("1")))
        message.setField(fix.NoRelatedSym(0))
        message.setField(fix.Symbol("2"))
        fix.Session_sendToTarget(message, self.sessionID)

I found Symbol at

then I tried change Symbol to "EURUSD" but same result above.

Please help me!
Thanks team!

Panagiotis Charalampous's avatar
Panagiotis Charalampous since: 13 Jan 2017; 
 08 Nov 2019, 10:50

Hi ludinhquan,

Tag 146 is set to 0. It should be 1 since it represents the number of symbols requested.

Best Regards,

Panagiotis

Head of Community Management at cTrader -Join us on Telegram - https://t.me/cTrader_Official
ludinhquan since: 26 Oct 2019; 
 08 Nov 2019, 14:19

Thanks for your response but seem it not work for me.

Message:

8=FIX.4.4|9=122|35=V|34=2|49=fxpro.8152236|50=QUOTE|52=20191108-12:11:40.000|56=CSERVER|57=QUOTE|55=2|146=1|262=1|263=1|264=0|267=2|269=1|10=130

Response: 

8=FIX.4.4|9=156|35=3|34=2|49=CSERVER|50=QUOTE|52=20191108-12:11:40.634|56=fxpro.8152236|57=QUOTE|45=2|58=Tag not defined for this message type, field=55|371=55|372=V|373=2|10=240

Have you seen this problem before? 

ps: I use quickfix engine with python.

Panagiotis Charalampous's avatar
Panagiotis Charalampous since: 13 Jan 2017; 
 08 Nov 2019, 16:52

Hi ludinhquan,

Can you please also make sure you are using our dictionary with your quickfix engine?

Best Regards,

Panagiotis

Head of Community Management at cTrader -Join us on Telegram - https://t.me/cTrader_Official
ludinhquan since: 26 Oct 2019; 
 08 Nov 2019, 17:12

Are you confused? The document was mentioned is different from https://www.spotware.com/pdf/cTraderFixApi_v2.16.pdf ?

Panagiotis Charalampous's avatar
Panagiotis Charalampous since: 13 Jan 2017; 
 11 Nov 2019, 08:35
RE:

Hi ludinhquan,

Yes I have accidentally posted the wrong link. I have updated it, please check now.

Best Regards,

Panagiotis

Head of Community Management at cTrader -Join us on Telegram - https://t.me/cTrader_Official
ludinhquan since: 26 Oct 2019; 
 12 Nov 2019, 15:50

I sloved the problem. Thank you so much for your support!!!