快速修复-未在分组中为此消息类型定义标签

时间:2019-02-20 18:04:01

标签: python quickfix fix-protocol

我遇到一个Quickfix问题,其中Quickfix引擎参考标签22(SecuritySourceID)发送回一条拒绝消息“该消息类型未定义标签”

在入站修复消息中,这是示例消息:

8=FIXT.1.1|9=9215|35=y|49=TULLETT|56=ZTEST1|34=12|52=20190220-10:44:17.588|320=ROGERSLReq1288|322=FIXT.1.1:TULLETT->ZTEST1ROGERSLReq1288|560=0|393=16489|893=N|146=50|55=LLOYDS 7.754 21/49 CSH|48=XS0109139344CB|22=8|454=1|455=XS0109139344|456=4|167=CORP|762=NONE|223=7.754000187|947=GBP|541=20210531-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=LLOYDS 7.375 23/49 CSH|48=XS0083932144CB|22=8|454=1|455=XS0083932144|456=4|167=CORP|762=NONE|223=7.375|947=GBP|541=20230210-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=LLOYDS 8 09/23  CSH|48=XS0079927850CB|22=8|454=1|455=XS0079927850|456=4|167=CORP|762=NONE|223=8|947=GBP|541=20230929-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=LLOYDS 7.881 12/31 CSH|48=GB0058327924CB|22=8|454=1|455=GB0058327924|456=4|167=CORP|762=NONE|223=7.881000042|947=GBP|541=20311209-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=LLOYDS 13 29/49 CSH|48=XS0408620721CSH|22=8|454=1|455=XS0408620721|456=4|167=CORP|762=NONE|223=13|947=GBP|541=20490122-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=LLOYDS 7.834 12/15 CSH|48=XS0107228024CB|22=8|454=1|455=XS0107228024|456=4|167=CORP|762=NONE|223=7.834000111|947=GBP|541=20491229-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=LLYDIN 6.875 15/25  CSH|48=XS0205875049CB|22=8|454=1|455=XS0205875049|456=4|167=CORP|762=NONE|223=6.875|947=GBP|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=MATURED  LLYDIN 7.421 06/17 CSH|48=XXXEG5690920CB|22=8|454=1|455=XS0307055995|456=4|167=CORP|762=NONE|223=7.421|947=GBP|541=20170621-00:00:00|1173=2|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=MET 5.375 12/09/24 CSH|48=XS0207636712CB|22=8|454=1|455=XS0207636712|456=4|167=CORP|762=NONE|223=5.375|947=GBP|470=US|541=20241209-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=MATURED - MONTE 5.75 09/16  CSH|48=XS0255817685CB|22=8|454=1|455=XS0255817685|456=4|167=CORP|762=NONE|223=5.75|947=GBP|470=IT|541=20160930-00:00:00|1173=2|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=MQB 6.177 04/20 CSH|48=XS0201559811CB|22=8|454=1|455=XS0201559811|456=4|167=CORP|762=NONE|223=6.177000046|947=GBP|470=AU|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=MATURED  MUFG 6.299 01/17 CSH|48=XS0282533115CB|22=8|454=1|455=XS0282533115|456=4|167=CORP|762=NONE|223=6.298999786|947=GBP|470=KY|541=20170125-00:00:00|1173=2|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=NAB 5.62 09/18 CSH|48=XS0177395901CB|22=8|454=1|455=XS0177395901|456=4|167=CORP|762=NONE|223=5.619999886|947=GBP|470=US|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=NDASS 6.25 07/14  CSH|48=XS0151270310CB|22=8|454=1|455=XS0151270310|456=4|167=CORP|762=NONE|223=6.25|947=GBP|470=FI|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=MATURED - NRKLN 5.75 12-17 CSH|48=XS0143152337CB|22=8|454=1|455=XS0143152337|456=4|167=CORP|762=NONE|223=5.75|947=GBP|541=20120227-00:00:00|1173=2|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=NRKLN 9.375 10/21 CSH|48=XS0070077010CB|22=8|454=1|455=XS0070077010|456=4|167=CORP|762=NONE|223=9.375|947=GBP|541=20211017-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=NRKLN 6.75 24/49  CSH|48=XS0098556961CB|22=8|454=1|455=XS0098556961|456=4|167=CORP|762=NONE|223=6.75|947=GBP|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=NRKLN 8.399 09/15 CSH|48=XS0117031194CB|22=8|454=1|455=XS0117031194|456=4|167=CORP|762=NONE|223=8.399000168|947=GBP|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=NRKLN 7.053 09/27 CSH|48=XS0152710439CB|22=8|454=1|455=XS0152710439|456=4|167=CORP|762=NONE|223=7.052999973|947=GBP|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=MATURED  NRKLN 6.8509 07/16 CSH|48=XS0259175536CB|22=8|454=1|455=XS0259175536|456=4|167=CORP|762=NONE|223=6.850900173|947=GBP|470=LU|541=20160704-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=NWIDE 7.859 30/49 CSH|48=GB0001777886CB|22=8|454=1|455=GB0001777886|456=4|167=CORP|762=NONE|223=7.859000206|947=GBP|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=NWIDE 5.769 02/26 CSH|48=XS0184519139CB|22=8|454=1|455=XS0184519139|456=4|167=CORP|762=NONE|223=5.769000053|947=GBP|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=NWIDE 7.971 15/49 CSH|48=GB0001777449CB|22=8|454=1|455=GB0001777449|456=4|167=CORP|762=NONE|223=7.971|947=GBP|541=20490929-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=OLDMUT 6.376 03/20 CSH|48=XS0215556142CB|22=8|454=1|455=XS0215556142|456=4|167=CORP|762=NONE|223=6.375999928|947=GBP|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=PEALLN 7.25 21/49 CSH|48=XS0133173137CB|22=8|454=1|455=XS0133173137|456=4|167=CORP|762=NONE|223=7.25|947=GBP|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=PEALLN 6.5864 04/16 CSH|48=XS0235245205CB|22=8|454=1|455=XS0235245205|456=4|167=CORP|762=NONE|223=6.586400032|947=GBP|541=20160411-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=PRUFIN 6.875 01/23 CSH|48=XS0083544212CB|22=8|454=1|455=XS0083544212|456=4|167=CORP|762=NONE|223=6.875|947=GBP|541=20230120-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=PRUFIN 5.875 05/29 CSH|48=XS0096874671CB|22=8|454=1|455=XS0096874671|456=4|167=CORP|762=NONE|223=5.875|947=GBP|541=20290511-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=PRUFIN 6.125 12/31 CSH|48=XS0140198044CB|22=8|454=1|455=XS0140198044|456=4|167=CORP|762=NONE|223=6.125|947=GBP|541=20311219-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=MATURED - QBEAU 6.125 09/15 CSH|48=NEWISSUEQBE|22=8|454=1|455=XS0454936013|456=4|167=CORP|762=NONE|223=6.125|947=GBP|470=AU|541=20150928-00:00:00|1173=2|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=QBEAU 6.857 07/16 CSH|48=XS0261573587CB|22=8|454=1|455=XS0261573587|456=4|167=CORP|762=NONE|223=6.856999874|947=GBP|541=20160718-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RABOBK 5.556 19/49 CSH|48=XS0203782551CB|22=8|454=1|455=XS0203782551|456=4|167=CORP|762=NONE|223=5.556000233|947=GBP|470=US|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 7.387 10/49 CSH|48=XS0121856859CB|22=8|454=1|455=XS0121856859|456=4|167=CORP|762=NONE|223=7.387000084|947=GBP|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 7.375 10/49  CSH|48=XS0116447599CB|22=8|454=1|455=XS0116447599|456=4|167=CORP|762=NONE|223=7.375|947=GBP|541=20100831-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 8.162 10/12 CSH|48=XS0323839042CB|22=8|454=1|455=XS0323839042|456=4|167=CORP|762=NONE|223=8.162|947=GBP|541=20121005-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 6.25 12/12  CSH|48=XS0137784426CB|22=8|454=1|455=XS0137784426|456=4|167=CORP|762=NONE|223=6.25|947=GBP|541=20121217-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 6 14/49  CSH|48=XS0193721544CB|22=8|454=1|455=XS0193721544|456=4|167=CORP|762=NONE|223=6|947=GBP|541=20140901-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 7.625 10/49  CSH|48=XS0102493508CB|22=8|454=1|455=XS0102493508|456=4|167=CORP|762=NONE|223=7.625|947=GBP|541=20150121-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 5.125 16/49  CSH|48=XS0164828385CB|22=8|454=1|455=XS0164828385|456=4|167=CORP|762=NONE|223=5.125|947=GBP|541=20160314-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=MATURED - RBS 5.6457 06/17 CSH|48=XS0277453774CB|22=8|454=1|455=XS0277453774|456=4|167=CORP|762=NONE|223=5.645699978|947=GBP|541=20170608-00:00:00|1173=2|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 9.5 18/49 CSH|48=XS0045071932CB|22=8|454=1|455=XS0045071932|456=4|167=CORP|762=NONE|223=9.5|947=GBP|541=20180812-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 5.5 12/19  CSH|48=XS0206633082CB|22=8|454=1|455=XS0206633082|456=4|167=CORP|762=NONE|223=5.5|947=GBP|470=DE|541=20191203-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 6.2 03/22  CSH|48=XS0144810529CB|22=8|454=1|455=XS0144810529|456=4|167=CORP|762=NONE|223=6.199999809|947=GBP|541=20220322-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 7.125 10/22  CSH|48=XS0102493680CB|22=8|454=1|455=XS0102493680|456=4|167=CORP|762=NONE|223=7.125|947=GBP|541=20221005-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 5.625 09/26  CSH|48=XS0154144132CB|22=8|454=1|455=XS0154144132|456=4|167=CORP|762=NONE|223=5.625|947=GBP|541=20260916-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RBS 5.625 32/49  CSH|48=XS0138939854CB|22=8|454=1|455=XS0138939854|456=4|167=CORP|762=NONE|223=5.625|947=GBP|541=20320607-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=MATURED  RLMI 6.125 12/15 CSH|48=XS0236968946CSH|22=8|454=1|455=XS0236968946|456=4|167=CORP|762=NONE|223=6.125|947=GBP|541=20151215-00:00:00|1173=2|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RSA 8.5 12/14 CSH|48=XS0197028714CB|22=8|454=1|455=XS0197028714|456=4|167=CORP|762=NONE|223=8.5|947=GBP|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RSA 6.701 12/17 CSH|48=XS0254219735CB|22=8|454=1|455=XS0254219735|456=4|167=CORP|762=NONE|223=6.701000214|947=GBP|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|55=RSA 9.375 05/19 CSH|48=XS0429467961CB|22=8|454=1|455=XS0429467961|456=4|167=CORP|762=NONE|223=9.375|947=GBP|541=20390520-00:00:00|1173=11|423=1|562=0.5|20539=TSFI|20537=0|20538=0|10=192|

在我的词典中,我为消息创建了以下内容

消息:

<message name="SecurityList" msgtype="y" msgcat="app">
<component name="ApplicationSequenceControl" required="N"/>
<field name="SecurityReqID" required="N"/>
<field name="SecurityRequestResult" required="N"/>
<field name="SecurityResponseID" required="N"/>
<field name="TotNoRelatedSym" required="N"/>
<field name="LastFragment" required="N"/>
<component name="NoRelatedSym" required="N"/>
</message>

组件:

<component name="NoRelatedSym">
<group name="NoRelatedSym" required="N">
    <field name="Symbol" required="N"/>
    <field name="SecurityID" required="N"/>
    <field name="SecurityIDSource" required="N"/>
    <component name="NoSecurityAltID" required="N"/>
    <field name="SecurityType" required="N"/>
    <field name="SecuritySubType" required="N"/>
    <field name="PeriodCode" required="N"/>
    <field name="Seniority" required="N"/>
    <field name="Issuer" required="N"/>
    <field name="SecurityDesc" required="N"/>
    <field name="ISDADefinition" required="N"/>
    <field name="MarketSegmentID" required="N"/>
    <field name="ExternalLineRef" required="N"/>
    <field name="GTNID" required="N"/>
    <field name="GTNSubID" required="N"/>
    <field name="Ref Ob ISIN" required="N"/>
    <field name="PriceType" required="N"/>
    <field name="CFICode" required="N"/>
    <field name="CouponRate" required="N"/>
    <field name="StrikeCurrency" required="N"/>
    <field name="CountryOfIssue" required="N"/>
    <field name="MDSubBookType" required="N"/>
    <field name="MinTradeVol" required="N"/>
    <field name="MaturityDate" required="N"/>
    <component name="NoUnderlyings" required="N"/>
</group>
</component>

<component name="NoSecurityAltID">
        <group name="NoSecurityAltID" required="N">
        <field name="SecurityAltID" required="N"/>
        <field name="SecurityAltIDSource" required="N"/>
        </group>
</component>

<component name="NoUnderlyings">
        <group name="NoUnderlyings" required="N">
        <field name="UnderlyingSymbol" required="N"/>
        <field name="UnderlyingSecurityType" required="N"/>
        <field name="UnderlyingSecurityID" required="N"/>
        <field name="UnderlyingSecurityIDSource" required="N"/>
        <component name="NoSecurityAltID" required="N"/>
        <field name="UnderlyingCFICode" required="N"/>
        <field name="UnderlyingCreditRating" required="N"/>
        <field name="UnderlyingCountryOfIssue" required="N"/>
        <field name="UnderlyingStrikeCurrency" required="N"/>
        <field name="UnderlyingCouponRate" required="N"/>
        <field name="UnderlyingIssuer" required="N"/>
        <field name="UnderlyingSecurityDesc" required="N"/>
        <field name="UnderlyingSeniority" required="N"/>
        <field name="UnderlyingMaturityDate" required="N"/>
        <field name="UnderlyingPriceType" required="N"/>
        <field name="UnderlyingPeriodCode" required="N"/>
        <field name="UnderlyingISDADefinition" required="N"/>
        </group>
</component>

<component name="NoUnderlyingSecurityAltID">
        <group name="NoUnderlyingSecurityAltID" required="N">

            <field name="UnderlyingSecurityAltID" required="N"/>
            <field name="UnderlyingSecurityAltIDSource" required="N"/>
            </group>
</component>
<component name="NoSecurityAltID">
        <group name="NoSecurityAltID" required="N">
        <field name="NoSecurityAltID" required="N"/>
        <field name="SecurityAltID" required="N"/>
        <field name="SecurityAltIDSource" required="N"/>
        </group>
</component>

与启用数据字典的会话并指向FIX50SP2

[DEFAULT]
ConnectionType=initiator
LogonTimeout=30
ReconnectInterval=30
ResetOnLogon=Y
FileLogPath=./logs
BeginString=FIXT.1.1
StartTime=00:00:00
EndTime=00:00:00
HeartBtInt=30
CheckLatency=N
MaxLatency=240

[SESSION]
FileStorePath=./sessions
ValidateFieldsOutOfOrder=N
UseDataDictionary=Y
DefaultApplVerID=9
TransportDataDictionary=./data/FIXT11.xml
AppDataDictionary=./data/FIX50SP2.xml

我的词典或设置是否有任何问题可以消除此拒绝消息?还是python quickfix端口用于分组有问题?

修改 当我更改NoRelatedSym组件并删除这样的外部组

<component name="NoRelatedSym">
    <field name="Symbol" required="N"/>
    <field name="SecurityID" required="N"/>
    <field name="SecurityIDSource" required="N"/>
    <component name="NoSecurityAltID" required="N"/>
</component>

然后quickfix引擎将生成

  

标签多次出现

1 个答案:

答案 0 :(得分:1)

这是由于标记更改为MarketSegmentID,FIX5.0SP2中此标记的标准标记值为1300,但是提供商将其更改为自定义标记20539,这打破了嵌套组。奇怪的是,quickfix不会将错误定位到该标签,而是将其默认为顶级SecurityIDSource标签