Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QuickFix error: Tag appears more than once in 'W' message

I receive from the FIX server the following 'W' message:

8=FIX.4.2|9=141|35=W|34=98|49=CX|52=20150401-09:12:30.247|56=CACIB_MD2|55=608230|262=48|9883=IDB|268=2|269=0|58=No Bid Available|269=1|58=No Offer Available|10=249

which has tag 58 twice

and my QuickFix application automatically sends the reject message to the server:

8=FIX.4.2|9=104|35=3|34=91|49=CACIB_MD2|52=20150401-09:12:29.661|56=CX|45=90|58=Tag appears more than once|371=58|372=W|10=008

From reading in the internet I understood that there is a problem with the dictionary.

I don't have any dictionary configuration in my QuickFix config file. I am not exactly sure where the default dictionary resides, but one I found (FIX42.xml) defines that tag 58 is a part of group for 'W' message:

  <message name='MarketDataSnapshotFullRefresh' msgcat='app' msgtype='W'>
   <field name='MDReqID' required='N' />
   <field name='Symbol' required='Y' />
   <field name='SymbolSfx' required='N' />
   <field name='SecurityID' required='N' />
   <field name='IDSource' required='N' />
   <field name='SecurityType' required='N' />
   <field name='MaturityMonthYear' required='N' />
   <field name='MaturityDay' required='N' />
   <field name='PutOrCall' required='N' />
   <field name='StrikePrice' required='N' />
   <field name='OptAttribute' required='N' />
   <field name='ContractMultiplier' required='N' />
   <field name='CouponRate' required='N' />
   <field name='SecurityExchange' required='N' />
   <field name='Issuer' required='N' />
   <field name='EncodedIssuerLen' required='N' />
   <field name='EncodedIssuer' required='N' />
   <field name='SecurityDesc' required='N' />
   <field name='EncodedSecurityDescLen' required='N' />
   <field name='EncodedSecurityDesc' required='N' />
   <field name='FinancialStatus' required='N' />
   <field name='CorporateAction' required='N' />
   <field name='TotalVolumeTraded' required='N' />
   <group name='NoMDEntries' required='Y'>
    <field name='MDEntryType' required='Y' />
    <field name='MDEntryPx' required='Y' />
    <field name='Currency' required='N' />
    <field name='MDEntrySize' required='N' />
    <field name='MDEntryDate' required='N' />
    <field name='MDEntryTime' required='N' />
    <field name='TickDirection' required='N' />
    <field name='MDMkt' required='N' />
    <field name='TradingSessionID' required='N' />
    <field name='QuoteCondition' required='N' />
    <field name='TradeCondition' required='N' />
    <field name='MDEntryOriginator' required='N' />
    <field name='LocationID' required='N' />
    <field name='DeskID' required='N' />
    <field name='OpenCloseSettleFlag' required='N' />
    <field name='TimeInForce' required='N' />
    <field name='ExpireDate' required='N' />
    <field name='ExpireTime' required='N' />
    <field name='MinQty' required='N' />
    <field name='ExecInst' required='N' />
    <field name='SellerDays' required='N' />
    <field name='OrderID' required='N' />
    <field name='QuoteEntryID' required='N' />
    <field name='MDEntryBuyer' required='N' />
    <field name='MDEntrySeller' required='N' />
    <field name='NumberOfOrders' required='N' />
    <field name='MDEntryPositionNo' required='N' />
    <field name='Text' required='N' />
    <field name='EncodedTextLen' required='N' />
    <field name='EncodedText' required='N' />
   </group>
  </message>

Similar thing happens when 'W' message arrives not with two 58 tags, but with two 269 (MDEntryType) tags:

8=FIX.4.2|9=217|35=W|34=110|49=CX|52=20150401-09:23:19.787|56=CACIB_MD2|55=561832|262=26|9883=IDB|268=2|269=0|58=No Bid Available|269=1|270=123|271=1|272=20150401|273=09:23:19.551|59=0|126=20150401-19:23:19.551|290=1|9139=cacib_uat2|10=016

again QuickFix automatically sends reject:

8=FIX.4.2|9=107|35=3|34=111|49=CACIB_MD2|52=20150401-09:23:19.848|56=CX|45=110|58=Tag appears more than once|371=269|372=W|10=153

So what can be done here?

like image 907
Andrey Rubliov Avatar asked Apr 01 '15 09:04

Andrey Rubliov


1 Answers

Use the following flag in your configuration file.It is Y by default, but check to be sure.

ValidateFieldsOutOfOrder=N

Confirm if the following is there in your configuration, default is Y anyway.You should always use a DataDictionary if you are using repeating groups, mentioned in the Quickfix configuration page.

UseDataDictionary=Y

And this has the path where your data dictionary is present.

DataDictionary=/path_to_data_dictionary_file

like image 70
DumbCoder Avatar answered Sep 29 '22 13:09

DumbCoder