Vivek Jeeva Kumar
Vivek Jeeva Kumar

Reputation: 85

Error in Postion Report (FIX 4.4): Group 702's first entry does not start with delimiter 704

I am new to the FIX protocol and I am using QuickFIX to parse my FIX messages. Whenever I receive a Position Report message (AP), it gets rejected by the FIX engine with the below error:

Group 702's first entry does not start with delimiter 704

Here 702 is a group tag. I did some research and found that a repeating group message uses its first field as a delimiter. In my case group 702 is supposed to have either tag 704 (LongQty) or 705 (ShortQty). Only one of either tags will be present.

My counterparty is not sending the 703 tag. When the FIX engine sees there is no 704 tag in some cases, it rejects the message. Please let me know your suggestion to over come this problem.

Upvotes: 3

Views: 1203

Answers (1)

Grant Birchmeier
Grant Birchmeier

Reputation: 18484

FIX expects every group to start with a single consistent tag.

You can alter that tag in your XML DataDictionary, for instance, to use 704 instead of 703, by rearranging (or deleting/adding) the fields in that group.

In my case group 702 is supposed to have either tag 704(LongQty) or 705(ShortQty).

No, that won't work. Does it always start with 704 or does it always start with 705? It can't be one-of-either.

If your counterparty really is saying that it's one-of-either, then they are doing FIX wrong and we should publicly shame them. (Seriously, can't they just put 704=0 instead of omitting it?) To deal with this idiocy, you may have to hack the QF engine.

I suggest you double-check with your counterparty to confirm that they really are doing it wrong like this. I'm hoping (for your sake) that you are mistaken.

EDIT:

This is from the FIX 44 spec, Vol 1, page 19:

If the repeating group is used, the first field of the repeating group is required. This allows implementations of the protocol to use the first field as a "delimiter" indicating a new repeating group entry. The first field listed after the NoXXX, then becomes conditionally required if the NoXXX field is greater than zero.

Upvotes: 2

Related Questions