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?
Found the issue:
The
toAppmethod is checking for duplicates using thePossDupFlagAnd if it doesn’t exist,
FieldNotFoundexception 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: