的QuickFix不验证重复组(QuickFIX doesn't validate the

2019-10-22 16:23发布

我执行基于QuickFix的客户机 - 服务器组。 当我尝试发送包含缔约方重复组的消息,我得到了以下描述的拒绝:“该消息类型没有定义58 =标签| 371 = 447 |”

消息类型泰德我尝试发送是OrderCancelReplaceRequest。

该代码示例是:

FIX44::OrderCancelReplaceRequest order(FIX::MsgType("G"));

FIX44::OrderCancelReplaceRequest::NoPartyIDs party;
// 448-PartyID
party.set(FIX::PartyID("PartyId"));
// 447-PartyIDSource
party.set(FIX::PartyIDSource('B'));    
// 452-PartyRole
party.set(FIX::PartyRole(1));    
// 802-NoPartySubIDs
party.set(FIX::NoPartySubIDs(0));

order.addGroup(party);

...

如果消息不包含任何缔约方组,它是由服务器成功验证。

此外,它的成功验证,即使它包含了FIX44 :: OrderCancelReplaceRequest :: NoAllocs组:

 FIX44::OrderCancelReplaceRequest::NoAllocs alloc;
 // 79-AllocAccount
 alloc.set(FIX::AllocAccount("Alloc Account"));
 // 80-AllocQty
 alloc.set(FIX::AllocQty(4.2));
 order.addGroup(alloc);

所以,我认为这个问题只有当我尝试使用缔约方组。

服务器的配置文件是:

[DEFAULT]
ConnectionType=acceptor
SocketAcceptPort=28663
SocketReuseAddress=Y
StartTime=00:00:00
EndTime=00:00:00
UseDataDictionary=Y
DataDictionary=<some path here>/FIX44.xml
FileLogPath=QuickFixServerLog
ValidateUserDefinedFields=N

[SESSION]
BeginString=FIX.4.4
SenderCompID=EXECUTOR
TargetCompID=CLIENT1
FileStorePath=store

客户端的配置文件是:

[DEFAULT]
ConnectionType=initiator
ReconnectInterval=1
FileStorePath=store
StartTime=00:00:00
EndTime=00:00:00
UseDataDictionary=Y
DataDictionary=<some path here>/FIX44.xml
HttpAcceptPort=9911
ValidateUserDefinedFields=N
ResetOnLogout=Y
ResetOnLogon=Y

[SESSION]
BeginString=FIX.4.4
SenderCompID=CLIENT1
TargetCompID=EXECUTOR
SocketConnectHost=127.0.0.1
SocketConnectPort=28663
HeartBtInt=15

UPD。

由服务器(它是从服务器日志)是reseived请求的例子:

8=FIX.4.4|9=234|35=G|34=2|49=CLIENT1|52=20150417-10:49:07.715|56=EXECUTOR|1=Account|11=Id123|38=11.11|40=1|41=OrigId321|44=4.2|54=2|55=Symbol|60=20150417-10:49:07|78=2|79=AllocAccount1|79=AllocAccount2|80=10|80=20|447=B|448=PartyId|452=1|453=1|802=0|10=185|

该请求的响应是:

8=FIX.4.4|9=124|35=3|34=2|49=EXECUTOR|52=20150417-10:49:07.719|56=CLIENT1|45=2|58=Tag not defined for this message type|371=447|372=G|373=2|10=060|

Answer 1:

正如你我们在评论部分的谈话后指出,在该字段的顺序<Parties> component block组是不正确的。 在重复组的场顺序(或分量块在时<Parties> )应该被保留。 您可以在这里关于这个问题的解释在重复组现场秩序的重要性博客文章。

在您的情况下,该消息的客户端修改拧出的场次序<Parties>这导致一组Reject来自服务器的消息。



Answer 2:

@TT我的10美分。 Fiximate是你的朋友。

在我FIX4.4数据字典中我可以看到,对于消息类型OrderCancelReplaceRequest没有定义的标签447 PartyIDSource。 附上我的数据字典消息。

如果您需要定义PartyIDSource然后将其添加到您的数据字典。

<message name="OrderCancelReplaceRequest" msgtype="G" msgcat="app">
    <field name="OrderID" required="N" />
    <component name="Parties" required="N" />
    <field name="TradeOriginationDate" required="N" />
    <field name="TradeDate" required="N" />
    <field name="OrigClOrdID" required="Y" />
    <field name="ClOrdID" required="Y" />
    <field name="SecondaryClOrdID" required="N" />
    <field name="ClOrdLinkID" required="N" />
    <field name="ListID" required="N" />
    <field name="OrigOrdModTime" required="N" />
    <field name="Account" required="N" />
    <field name="AcctIDSource" required="N" />
    <field name="AccountType" required="N" />
    <field name="DayBookingInst" required="N" />
    <field name="BookingUnit" required="N" />
    <field name="PreallocMethod" required="N" />
    <field name="AllocID" required="N" />
    <group name="NoAllocs" required="N">
      <field name="AllocAccount" required="N" />
      <field name="AllocAcctIDSource" required="N" />
      <field name="AllocSettlCurrency" required="N" />
      <field name="IndividualAllocID" required="N" />
      <component name="NestedParties" required="N" />
      <field name="AllocQty" required="N" />
    </group>
    <field name="SettlType" required="N" />
    <field name="SettlDate" required="N" />
    <field name="CashMargin" required="N" />
    <field name="ClearingFeeIndicator" required="N" />
    <field name="HandlInst" required="N" />
    <field name="ExecInst" required="N" />
    <field name="MinQty" required="N" />
    <field name="MaxFloor" required="N" />
    <field name="ExDestination" required="N" />
    <group name="NoTradingSessions" required="N">
      <field name="TradingSessionID" required="N" />
      <field name="TradingSessionSubID" required="N" />
    </group>
    <component name="Instrument" required="Y" />
    <component name="FinancingDetails" required="N" />
    <group name="NoUnderlyings" required="N">
      <component name="UnderlyingInstrument" required="N" />
    </group>
    <field name="Side" required="Y" />
    <field name="TransactTime" required="Y" />
    <field name="QtyType" required="N" />
    <component name="OrderQtyData" required="Y" />
    <field name="OrdType" required="Y" />
    <field name="PriceType" required="N" />
    <field name="Price" required="N" />
    <field name="StopPx" required="N" />
    <component name="SpreadOrBenchmarkCurveData" required="N" />
    <component name="YieldData" required="N" />
    <component name="PegInstructions" required="N" />
    <component name="DiscretionInstructions" required="N" />
    <field name="TargetStrategy" required="N" />
    <field name="TargetStrategyParameters" required="N" />
    <field name="ParticipationRate" required="N" />
    <field name="ComplianceID" required="N" />
    <field name="SolicitedFlag" required="N" />
    <field name="Currency" required="N" />
    <field name="TimeInForce" required="N" />
    <field name="EffectiveTime" required="N" />
    <field name="ExpireDate" required="N" />
    <field name="ExpireTime" required="N" />
    <field name="GTBookingInst" required="N" />
    <component name="CommissionData" required="N" />
    <field name="OrderCapacity" required="N" />
    <field name="OrderRestrictions" required="N" />
    <field name="CustOrderCapacity" required="N" />
    <field name="ForexReq" required="N" />
    <field name="SettlCurrency" required="N" />
    <field name="BookingType" required="N" />
    <field name="Text" required="N" />
    <field name="EncodedTextLen" required="N" />
    <field name="EncodedText" required="N" />
    <field name="SettlDate2" required="N" />
    <field name="OrderQty2" required="N" />
    <field name="Price2" required="N" />
    <field name="PositionEffect" required="N" />
    <field name="CoveredOrUncovered" required="N" />
    <field name="MaxShow" required="N" />
    <field name="LocateReqd" required="N" />
    <field name="CancellationRights" required="N" />
    <field name="MoneyLaunderingStatus" required="N" />
    <field name="RegistID" required="N" />
    <field name="Designation" required="N" />
  </message>


文章来源: QuickFIX doesn't validate the repeating group
标签: c++ quickfix