重复群组消息中的QuickFix C ++(Repeating Group Messages in

2019-09-24 05:18发布

我们似乎无法处理与QuickFix的一些组的消息。

我试图建立与使用QuickFix(C ++)的ICE交易所的连接。 我创建了一个自定义的数据字典来处理ICE的非标准消息。 来处理第一消息是SecurityDefinition。 该消息包含有关13000条目分成的100块我附下面的信息(前两个条目与CR / LF添加为了清楚)。

我的问题是在数据字典中,我定义了一个组,与他们的组中指定的所有字段的条目的一部分。 然而它获取到裂化为具有一个无效的标签(标签= 305)之前被拒绝的消息。

消息2拒绝:该消息类型没有定义标签:305

这是否字典项看起来是正确的? 是否有任何文件如何处理群消息的任何地方?

字典条目:

<message name='SecurityDefinition' msgcat='app' msgtype='d'>
    <field name='SecurityResponseID' required='Y' />
    <field name='SecurityResponseType' required='Y' />
    <field name='SecurityReqID' required='Y' />
    <field name='TotNoRelatedSym' required='N' />
    <field name='NoRpts' required='N' />
    <field name='ListSeqNo' required='N' />
    <group name='NoUnderlyings' required='N'>
        <field name='UnderlyingSymbol' required='N' />
        <field name='UnderlyingSecurityID' required='N' />
        <field name='UnderlyingSecurityIDSource' required='N' />
        <field name='UnderlyingCFICode' required='N' />
        <field name='UnderlyingSecurityDesc' required='N' />
        <field name='UnderlyingMaturityDate' required='N' />
        <field name='UnderlyingContractMultiplier' required='N' />
        <field name='IncrementPrice' required='N' />
        <field name='IncrementQty' required='N' />
        <field name='LotSize' required='N' />
        <field name='NumofCycles' required='N' />
        <field name='LotSizeMultiplier' required='N' />
        <field name='Clearable' required='N' />
        <field name='StripId' required='N' />
        <field name='StripType' required='N' />
        <field name='StripName' required='N' />
        <field name='HubId' required='N' />
        <field name='HubName' required='N' />
        <field name='HubAlias' required='N' />
        <field name='UnderlyingUnitOfMeasure' required='N' />
        <field name='PriceDenomination' required='N' />
        <field name='PriceUnit' required='N' />
        <field name='Granularity' required='N' />
        <field name='NumOfDecimalPrice' required='N' />
        <field name='NumOfDecimalQty' required='N' />
        <field name='ProductId' required='N' />
        <field name='ProductName' required='N' />
        <field name='ProductDescription' required='N' />
        <field name='TickValue' required='N' />
        <field name='ImpliedType' required='N' />
        <field name='PrimaryLegSymbol' required='N' />
        <field name='SecondaryLegSymbol' required='N' />
        <field name='IncrementStrike' required='N' />
        <field name='MinStrike' required='N' />
        <field name='MaxStrike' required='N' />
    </group>
</message>

实际的消息:

8 = FIX.4.49 = 5004335 = D49 = ICE34 = 252 = 20121017-00:39:41.38556 = 600357 = 23322 = 3924323 = 4320 = 1393 = 1310382 = 13267 = 1711 = 100 311 = 1705282309 = TEB SMG0013-TFL SMG0013305 = 8463 = FXXXXX307 = NG基础期货SPR - TETCO-ELA / TGP-500L - Feb13542 = 20130131436 = 1.09013 = 0.00059014 = 2500.09017 = 25009022 = 289024 = 19025 = Y916 = 20130201917 = 201302289201 = 11969200 = 129202 = Feb139300 = 60589301 =德州东方传输公司 - 东路易斯安那区/田纳西州燃气管道有限公司 - 区L,500腿Pool9302 = TETCO-ELA / TGP-500L998 = MMBtus9100 = USD9101 = USD / MMBtu9085 = daily9083 = 49084 = 09061 = 4909062 = NG基础期货Spr9063 =天然气基础期货Spread9032 = 1.259004 = 17051939005 = 1353778 311 = 1714677309 = PGE SQF0014.H0014-SCB SQF0014.H0014305 = 8463 = FXXXXX307 = NG基础期货SPR - PG&E-荟城/ SOCAL-东荟 - Q1 14542 = 20131231436 = 1.09013 = 0.00059014 = 2500.09017 = 25009022 = 909024 = 19025 = Y916 = 20140101917 = 201403319201 = 12339200 = 159202 = Q1 149300 = 59979301 = PG&E - 东荟/ SOCAL - Citygate9302 = PG&E-荟城/ SOCAL-Citygate998 = MMBtus9100 = USD9101 = USD / MMBtu908 5 = daily9083 = 49084 = 09061 = 4909062 = NG基础期货Spr9063 =天然气基础期货Spread9032 = 1.259004 = 13430529005 = 1344660

Answer 1:

我们得到了解决此通过创建名为SecDefICE自定义组件与所有的自定义字段和自定义数据字典重新定义SecurityDefinition消息。

我们现在能够读取组信息。 唯一的缺点一直是我们不得不用数字来使用通用组和抢领域,而不是一个类型安全的方式这样做。 当我有时间,我会创建一个新的命名空间(FIXICE等),将有正确的头文件(邮件,字段,自定义饼干等)

下面列出的是从我们的字典定义。

新组件

  <component name='SecDefICE' required='N'>
   <field name='UnderlyingSymbol' required='N' />
   <field name='UnderlyingSecurityID' required='N' />
   <field name='UnderlyingSecurityIDSource' required='N' />
   <field name='UnderlyingCFICode' required='N' />
   <field name='UnderlyingSecurityDesc' required='N' />
   <field name='UnderlyingMaturityDate' required='N' />
   <field name='UnderlyingContractMultiplier' required='N' />
   <field name='IncrementPrice' required='N' />
   <field name='IncrementQty' required='N' />
   <field name='LotSize' required='N' />
   <field name='NumofCycles' required='N' />
   <field name='LotSizeMultiplier' required='N' />
   <field name='Clearable' required='N' />
   <field name='StartDate' required='N' />
   <field name='EndDate' required='N' />
   <field name='StripId' required='N' />
   <field name='StripType' required='N' />
   <field name='StripName' required='N' />
   <field name='HubId' required='N' />
   <field name='HubName' required='N' />
   <field name='HubAlias' required='N' />
   <field name='UnderlyingUnitOfMeasure' required='N' />
   <field name='PriceDenomination' required='N' />
   <field name='PriceUnit' required='N' />
   <field name='Granularity' required='N' />
   <field name='NumOfDecimalPrice' required='N' />
   <field name='NumOfDecimalQty' required='N' />
   <field name='ProductId' required='N' />
   <field name='ProductName' required='N' />
   <field name='ProductDescription' required='N' />
   <field name='TickValue' required='N' />
   <field name='ImpliedType' required='N' />
   <field name='PrimaryLegSymbol' required='N' />
   <field name='SecondaryLegSymbol' required='N' />
   <field name='IncrementStrike' required='N' />
   <field name='MinStrike' required='N' />
   <field name='MaxStrike' required='N' />
  </component> 

新的消息定义

  <message name='SecurityDefinition' msgcat='app' msgtype='d'>
   <field name='SecurityResponseID' required='Y' />
   <field name='SecurityResponseType' required='Y' />
   <field name='SecurityReqID' required='Y' />
   <field name='TotNoRelatedSym' required='N' />
   <field name='NoRpts' required='N' />
   <field name='ListSeqNo' required ='N' />
   <group name='NoUnderlyings' required='N'>
    <component name='SecDefICE' required='N' />
   </group>
   <field name='Text' required='N' />
    <!-- these are the original fields in 4.4 spec -->
    <!-- group name='NoUnderlyings' required='N' -->
    <!-- component name='UnderlyingInst' required='N' -->
    <!-- /group -->
    <!-- component name='Instrument' required='N' -->
    <!-- component name='InstrumentExtension' required='N' -->
    <!-- field name='Currency' required='N' -->
    <!-- field name='TradingSessionID' required='N' -->
    <!-- field name='TradingSessionSubID' required='N' -->
    <!-- field name='EncodedTextLen' required='N' -->
    <!-- field name='EncodedText' required='N' -->
    <!-- group name='NoLegs' required='N' -->
    <!-- component name='InstrumentLeg' required='N' -->
    <!-- /group -->
    <!-- field name='ExpirationCycle' required='N' -->
    <!-- field name='RoundLot' required='N' -->
    <!-- field name='MinTradeVol' required='N' -->
  </message>


Answer 2:

如果这些标签是不是在你的配置文件,将它们添加到它。 我假设你的数据字典中没有被读取。

UseDataDictionary=Y

ValidateFieldsOutOfOrder=N   /* This caused a lot of grief for me, 
because of the underlying data structure used in QuickFix, 
hence I always put it to N to save me the pain */

但是我检查了规格为FIX4.4,这个消息确实的版本存在,那么,为什么要补充吗? 这应该是在有可用的QuickFix默认XML配置文件。

你的第一组被正确读取看来,但第二组(二305标签)导致错误。 的QuickFix想不通组多少和什么有。 而你不必要的复制信息。 您可以使用一组这样的,在您的消息。 而QuickFix的是不能正确解析您的消息定义。 这是QuickFix的是如何工作的,所以你不能做任何事情。

 <group name="NoUnderlyings" required="N">
   <component name="UnderlyingInstrument" required="N" /> 
 </group>

否则,你就需要在多个地方复制UnderlyingInstrument,如果在多个消息中使用,它会增加你的XML大小没有任何好处。 这是它是如何在默认的quickfix配置文件完成 ,尽量跟随它,它会为你节省很多的悲伤。



文章来源: Repeating Group Messages in Quickfix C++
标签: quickfix