Does ordering of tags matter?

I work for a buy side firm and currently using FIX 4.4. I’m sending 35=AE to a vendor. The vendor has come back with an ask that I should be sending the tags in a specific order. Since my application is written in generic fashion, it’s becoming difficult to maintain the order in which tags are sent for different vendors.

My question to this group is - which is more reasonable? For the guy sending the order to send it as per the specifications of the receiver, or for the receiver to deal with ordering? I see that the documentation provides for the list of tags for an AE message, but doesn’t call out which order the messages should be sent with.

Please take a look at the spec…FIX 4.4 Volume 1 (FIX 4.4 Specification – FIX Trading Community v2.1). I assume you are using tag=value syntax (encoding).

Except where noted, fields within a message can be defined in any sequence (Relative position of a field within a message is inconsequential.) The exceptions to this rule are:

  1. General message format is composed of the standard header followed by the body followed by the standard trailer.
  2. The first three fields in the standard header are BeginString (tag #8) followed by BodyLength (tag #9) followed by MsgType (tag #35).
  3. The last field in the standard trailer is the CheckSum (tag #10).
  4. Fields within repeating data groups must be specified in the order that the fields are specified in the message definition within the FIX specification document. The NoXXX field where XXX is the field being counted specifies the number of repeating group instances that must immediately precede the repeating group contents.
  5. A tag number (field) should only appear in a message once. If it appears more than once in the message it should be considered an error with the specification document. The error should be pointed out to the FIX Global Technical Committee.

Apart from the exceptions above, your parser must be able to handle any ordering.

Thanks a lot @hanno.klein your response was absolutely spot on and what I was looking for. Thanks so much!

Good luck getting an exchange to change their parser just because you ask them to. :wink:

@aybiss: I know it is hard, I work for an exchange. In this case it is buy-side vs vendor. It is a decision for or against FIX compliance, no more but also no less.