简体   繁体   English

FIX 4.2标签未定义

[英]FIX 4.2 Tag Not Defined

20180216-17:21:04.640 : 8=FIX.4.2;9=115;35=V;34=3;49=SNDJ;52=20180216-17:21:04.640;56=BROKER;55=EUR/USD;146=1;262=676;263=1;264=1;265=1;266=Y;267=1;269=0;10=061;
20180216-17:21:04.641 : 8=FIX.4.2;9=119;35=3;34=3;49=BROKER;52=20180216-17:21:04.641;56=SNDJ;45=3;58=Tag not defined for this message type;371=55;372=V;373=2;10=237;

I receive 'tag not defined for this message type' rejects (35=3) when attempting to send 35=V messages. 尝试发送35 = V消息时,我收到“此消息类型未定义的标签”拒绝(35 = 3)。 I have added and removed ValidateUserDefinedFields, ValidateFieldsOutOfOrder. 我添加并删除了ValidateUserDefinedFields,ValidateFieldsOutOfOrder。

I have razed the group structure, re-added it, redefined both Symbol and NoRelatedSym types (to string, symbol, int, numingroup etc.), changed the symbol being sent to EURUSD, TEST, etc. and nothing works. 我已经整理了组结构,重新添加了它,重新定义了Symbol和NoRelatedSym类型(到字符串,符号,int,numingroup等),更改了将符号发送到EURUSD,TEST等的方式,但没有任何效果。

Have I missed something very simple here? 我错过了这里很简单的事情吗? It seems related to the fact that the request message puts the symbol tag ahead of the group, but I do not know why. 似乎与请求消息将符号标记放在组的前面有关,但是我不知道为什么。

MarketDataRequest.h: MarketDataRequest.h:

FIELD_SET(*this, FIX::NoRelatedSym);
      class NoRelatedSym: public FIX::Group
      {
      public:
      NoRelatedSym() : 


FIX::Group(146,55,FIX::message_order(55,65,48,22,167,200,205,201,2
 02,206,231,223,207,106,348,349,107,350,351,336,0)) {}
       FIELD_SET(*this, FIX::Symbol);
       ....
  };

My current FIX 4.2 .xml set up for MarketDataRequest messages looks like: 我当前为MarketDataRequest消息设置的FIX 4.2 .xml如下所示:

<message name='MarketDataRequest' msgtype='V' msgcat='app'>
 <field name='MDReqID' required='Y' />
 <field name='SubscriptionRequestType' required='Y' />
 <field name='MarketDepth' required='Y' />
 <field name='MDUpdateType' required='N' />
 <field name='AggregatedBook' required='N' />
 <group name='NoMDEntryTypes' required='Y'>
  <field name='MDEntryType' required='Y' />
 </group>
 <group name='NoRelatedSym' required='Y'>
  <field name='Symbol' required='Y' />
  <field name='SymbolSfx' required='N' />
  <field name='SecurityID' required='N' />
  <field name='IDSource' required='N' />
  <field name='SecurityType' required='N' />
  <field name='MaturityMonthYear' required='N' />
  <field name='MaturityDay' required='N' />
  <field name='PutOrCall' required='N' />
  <field name='StrikePrice' required='N' />
  <field name='OptAttribute' required='N' />
  <field name='ContractMultiplier' required='N' />
  <field name='CouponRate' required='N' />
  <field name='SecurityExchange' required='N' />
  <field name='Issuer' required='N' />
  <field name='EncodedIssuerLen' required='N' />
  <field name='EncodedIssuer' required='N' />
  <field name='SecurityDesc' required='N' />
  <field name='EncodedSecurityDescLen' required='N' />
  <field name='EncodedSecurityDesc' required='N' />
  <field name='TradingSessionID' required='N' />
 </group>
 </message>

Configuration Settings: 配置设置:

[DEFAULT]
BeginString=FIX.4.2
ReconnectInterval=60
SocketAcceptPort=7091
SenderCompID=SNDJ
TargetCompID=BROKER
SocketNodelay=Y
PersistMessage=Y
FileStorePath=cache
FileLogPath=log

[SESSION]
ConnectionType=acceptor
StartTime=00:30:00
EndTime=23:30:00
ReconnectInterval=30
HeartBtInt=15
SocketAcceptPort=7091
SocketReuseAddress=Y
DataDictionary=spec/FIX42.xml
AppDataDictionary=spec/FIX42.xml
SenderCompID=BROKER
TargetCompID=SNDJ
FileStorePath=cache
FileLogPath=log

[SESSION]
BeginString=FIX.4.2
ConnectionType=initiator
StartTime=00:30:00
EndTime=23:30:00
ReconnectInterval=15
HeartBtInt=15
SocketConnectPort=7091
SocketConnectHost=127.0.0.1
DataDictionary=spec/FIX42.xml
AppDataDictionary=spec/FIX42.xml
SenderCompID=SNDJ
TargetCompID=BROKER
FileStorePath=cache
FileLogPath=log

Thanks 谢谢

The message that you are sending is invalid per your own DD. 根据您自己的DD,您发送的消息无效。

Look at the first body fields after the header ends: 查看标题结束后的第一个正文字段:

55=EUR/USD;146=1;262=676;...

That 55 field is supposed to be inside the 146 repeating group, but its placement puts it prior to the group. 即55场被认为是146重复组 ,但它的位置把它之前的组。

I suspect your config may be to blame. 我怀疑您的配置可能是原因。 If you update your question to include the config, I will probably be able to see what's wrong and update this answer. 如果您将问题更新为包含配置,则我可能能够看到问题所在并更新此答案。

UPDATE: 更新:

You are missing UseDataDictionary=Y from your config, though that's not the cause of your problem. 您的配置中缺少UseDataDictionary=Y ,尽管这不是问题的原因。 (You need it to receive messages correctly, though.) (不过,您需要它才能正确接收消息。)

Also, you don't need AppDataDictionary -- that's only for FIX 5+. 另外,您不需要AppDataDictionary仅适用于FIX 5+。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM