Quickfixn-FIXT1.1 和 FIX5.0 版本 MarketDataSnapshotFullRefresh 360T “标签出现不止一次”

Quickfixn-FIXT1.1 And FIX5.0 Version MarketDataSnapshotFullRefresh 360T “Tag appears more than once”

我使用带有 FIXT1.1 的 Quickfixn 作为 TradeClient 从 360T 获取外汇市场数据。

我收到此错误“标签出现不止一次” 8=FIXT.1.19=14835=334=1249=XXXXXXX50=XXXXXXX.EDF.API52=20200804-16:22:11.47156=360T_SEP142=QUOTE145=1258=标签出现不止一次371=423372=373= 1310=117

我正在为 AppDataDictionary 使用附加的 FIX50.xml 文件。 我正在 github/Quickfixn 上使用 FIX50.xml 和 FIXT11.xml 数据字典文件。 我已经在 Stack Overflow 中尝试了针对此错误的所有解决方案。它没有成功。 任何帮助将不胜感激。

tradeclient.cfg

[DEFAULT] 
PersistMessages=Y 
ConnectionType=initiator 
UseDataDictionary=Y
FileStorePath=store 
FileLogPath=log 

[SESSION] 
ConnectionType=initiator 
BeginString=FIXT.1.1 
DefaultApplVerID=FIX.5.0
TransportDataDictionary= C:\Projects\FixApi\QuickFIXn\spec\fix\FIXT11.xml 
AppDataDictionary= C:\Projects\FixApi\QuickFIXn\spec\fix\FIX50.xml 
SenderCompID=XXXXXXX
SenderSubID=XXXXXXX.EDF.API
TargetCompID=360T_SEP
SenderLocationID=QUOTE1
SocketConnectHost= XXX.XXX.XX.XX
SocketConnectPort= XXXXX
StartTime=00:01:00
EndTime=23:59:00
HeartBtInt=20
ReconnectInterval=30 
ResetOnLogon=Y 
ResetOnLogout=Y 
ResetOnDisconnect=Y

TradeClientApp.cs

  private QuickFix.FIX50.MarketDataRequest QueryMarketDataRequest(string reqId)
    {
        MDReqID mdReqID = new MDReqID(reqId);
        SubscriptionRequestType subType = new SubscriptionRequestType(SubscriptionRequestType.SNAPSHOT_PLUS_UPDATES);
        
        MarketDepth marketDepth = new MarketDepth(0);
        QuickFix.FIX50.MarketDataRequest.NoMDEntryTypesGroup marketDataEntryGroup = new QuickFix.FIX50.MarketDataRequest.NoMDEntryTypesGroup();
        marketDataEntryGroup.Set(new MDEntryType(MDEntryType.MID_PRICE));

        QuickFix.FIX50.MarketDataRequest.NoRelatedSymGroup symbolGroup = new QuickFix.FIX50.MarketDataRequest.NoRelatedSymGroup();
        symbolGroup.Set(new Symbol(reqId));


        QuickFix.FIX50.MarketDataRequest message = new QuickFix.FIX50.MarketDataRequest(mdReqID, subType, marketDepth);
        message.AddGroup(marketDataEntryGroup);
        message.AddGroup(symbolGroup);

        return message;
    }

是的,我在 FIX50.xml DataDictionary 文件中的字段标记和 MarketDataSnapshotFullRefresh 消息标记上添加了 CustomFieldTimeSlots 字段。

<field number='7080' name='CustomFieldTimeSlots' type='STRING' />
<message name='MarketDataSnapshotFullRefresh' msgcat='app' msgtype='W'>
       <field name='MDReqID' required='N' />
       <field name='CustomFieldTimeSlots' required='N' />
       <component name='Instrument' required='Y' />
       <component name='UndInstrmtGrp' required='N' />
       <component name='InstrmtLegGrp' required='N' />
       <field name='FinancialStatus' required='N' />
       <field name='CorporateAction' required='N' />
       <field name='NetChgPrevDay' required='N' />
       <component name='MDFullGrp' required='Y' />
       <field name='ApplQueueDepth' required='N' />
       <field name='ApplQueueResolution' required='N' />
       <field name='MDReportID' required='N' />
       <field name='ClearingBusinessDate' required='N' />
       <field name='MDBookType' required='N' />
       <field name='MDFeedType' required='N' />
       <field name='TradeDate' required='N' />
       <component name='RoutingGrp' required='N' />
      </message>

我在 FIX50.xml DataDictionary 文件的 MDFullGrp 组件的 NoMDEntries 组上添加了 PriceType,我解决了这个问题。

<component name='MDFullGrp'>
   <group name='NoMDEntries' required='Y'>
    <field name='MDEntryType' required='Y' />
    <field name='MDEntryPx' required='N' />
    <field name='Currency' required='N' />
    <field name='MDEntrySize' required='N' />
    <field name='MDEntryDate' required='N' />
    <field name='MDEntryTime' required='N' />
    <field name='PriceType' required='N' />
    <field name='TickDirection' required='N' />
    <field name='MDMkt' required='N' />
    <field name='TradingSessionID' required='N' />
    <field name='TradingSessionSubID' 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='OpenCloseSettlFlag' 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='Scope' required='N' />
    <field name='PriceDelta' required='N' />
    <field name='Text' required='N' />
    <field name='EncodedTextLen' required='N' />
    <field name='EncodedText' required='N' />
    <field name='MDPriceLevel' required='N' />
    <field name='OrderCapacity' required='N' />
    <field name='MDOriginType' required='N' />
    <field name='HighPx' required='N' />
    <field name='LowPx' required='N' />
    <field name='TradeVolume' required='N' />
    <field name='SettlType' required='N' />
    <field name='SettlDate' required='N' />
    <field name='MDQuoteType' required='N' />
    <field name='RptSeq' required='N' />
    <field name='DealingCapacity' required='N' />
    <field name='MDEntrySpotRate' required='N' />
    <field name='MDEntryForwardPoints' required='N' />
    <field name='MDEntryID' required='N' />
    <component name='Parties' required='N' />
    <field name='SecondaryOrderID' required='N' />
    <field name='OrdType' required='N' />
   </group>
  </component>