Quickfixn-FIXT1.1 и FIX5.0 версии MarketDataSnapshotFullRefre sh 360T «Тег появляется более одного раза» - PullRequest
0 голосов
/ 07 августа 2020

Я использую Quickfixn с FIXT1.1 в качестве 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

Я использую прикрепленный FIX50. xml файл для AppDataDictionary. Я использую файлы словаря данных FIX50. xml и FIXT11. xml на github / Quickfixn. Я перепробовал все решения этой ошибки в 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;
    }

1 Ответ

1 голос
/ 07 августа 2020

Да, я добавил поле CustomFieldTimeSlots в тег полей и MarketDataSnapshotFullRefre sh тег сообщения в FIX50. xml файл DataDictionary.

<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>

Я добавил PriceType в группу NoMDEntries в компоненте MDFullGrp в FIX50. xml файл DataDictionary, и я преодолеваю эту проблему.

<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>
...