Search code examples
javaquickfixfix-protocolquickfixj

QuickfixJ required field missing, even if it's there


I'm getting a "Conditionally Required Field Missing" error message, even though I'm sure that field is there.

58=Conditionally Required Field Missing, field=55

Versions:

QuickFixJ 2.1.0

FIX 4.4

Here is the FIX message that I'm sending (with mocked values and a few fields removed for clarity)

8=FIX.4.4
9=709
35=R
34=4
49=TARGET
56=ME
11=myClOrdID
131=myQuoteReqID
146=myNoRelatedSym
55=mySymbol          // field missing
167=mySecurityType   // field missing

Here is the calling code:

String symbol = quoteRequest.getField(new StringField(55)).getValue();

I also tried:

String symbol = quoteRequest.getString(55);

Here is my Data Dictionary:

<field number="55" name="Symbol" type="STRING"/>

I realize that the symbol field is no longer a part of the QuoteRequest FIX specification for 4.4 (though it was in earlier versions, such as 4.0), however surely there are ways to retrieve custom fields? I have no control over the QuoteRequest message that I receive.

I can always parse the message myself using toString() but that kinda defeats the purpose of using quickfixj in the first place.

Any ideas?


Solution

  • Tag 55 is inside the 146 repeating group. See the docs for reading repeating groups.

    The symbol field is still in FIX44. You should spend some time familiarizing yourself with the FIX44.xml data dictionary file that you're using.

    (You may find that you need to customize that file based on your counterparty's messaging; in practice, nobody uses the basic FIX44 message definitions without changing them at least a little.)