市场数据请求 - FieldNotFound 异常
当我尝试订阅外汇交易品种的报价时,我不断收到 FieldNotFound
异常。 尽管我添加了所有必需的标签及其他标签。
(分别是:MDReqID、SubscriptionRequestType、MarketDepth、NoMDEntryTypes、MDEntryType、NoRelatedSym、Symbol。如此处指定:http://www.onixs.biz/tools/fixdictionary/4.2/msgType_V_86.html)
这是我的代码:
Dim l_msg As New QuickFix42.MarketDataRequest(
New MDReqID(System.Guid.NewGuid.ToString),
New SubscriptionRequestType(SubscriptionRequestType.SNAPSHOT_PLUS_UPDATES),
New MarketDepth(1))
l_msg.setField(New MDUpdateType(1))
l_msg.setField(New AggregatedBook(False))
l_msg.setField(New NoMDEntryTypes(2))
l_msg.setField(New MDEntryType("0"c))
l_msg.setField(New NoRelatedSym(1))
l_msg.setField(New Symbol("EUR/USD"))
Session.sendToTarget(l_msg, SENDER_COMP_ID.Value, TARGET_COMP_ID.Value)
我在这里缺少什么?
I'm constantly getting FieldNotFound
exception when trying to subscribe to quotes of a Forex symbol.
Although i added all the required tags and beyond.
(Which are: MDReqID,SubscriptionRequestType,MarketDepth,NoMDEntryTypes,MDEntryType,NoRelatedSym,Symbol. As specified here: http://www.onixs.biz/tools/fixdictionary/4.2/msgType_V_86.html)
Here is my code:
Dim l_msg As New QuickFix42.MarketDataRequest(
New MDReqID(System.Guid.NewGuid.ToString),
New SubscriptionRequestType(SubscriptionRequestType.SNAPSHOT_PLUS_UPDATES),
New MarketDepth(1))
l_msg.setField(New MDUpdateType(1))
l_msg.setField(New AggregatedBook(False))
l_msg.setField(New NoMDEntryTypes(2))
l_msg.setField(New MDEntryType("0"c))
l_msg.setField(New NoRelatedSym(1))
l_msg.setField(New Symbol("EUR/USD"))
Session.sendToTarget(l_msg, SENDER_COMP_ID.Value, TARGET_COMP_ID.Value)
What am i missing here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发现问题:
toApp
方法正在使用PossDupFlag
检查重复项如果不存在,则会抛出
FieldNotFound
异常。解决方案是用一个检查 PossDupFlag 是否存在的条件来包装它,或者在发送之前将此字段添加到消息中:
Found the issue:
The
toApp
method is checking for duplicates using thePossDupFlag
And if it doesn't exist,
FieldNotFound
exception is being thrown.The solution is either to wrap it with a condition that checks if PossDupFlag exists, or adding this field to the message before send: