Imported from previous forum
Hi All
thanx for helping me to understand the Fix.
I have a facing a problem. In the give below message the body length is 63. When I try to send this message to open fix server it give me an error saying that body length expecting is 61
8=FIX.4.3 35=A 9=63 49=654 56=OPENFIX 34=1 52=20040415-08:57:16 98=0 108=60 10=246
if I add two extra tags like for example in the Above message I added username and password. It works perfectly fine.
8=FIX.4.3 35=A 9=80 49=654 56=OPENFIX 34=1 52=20040415-09:28:11 98=0 108=60 553=PRASAD 554=XYZ 10=108
Can any body tell me where I am doing wrong?
is anyother way to calculate the body length
Calculation of body length
I am counting the length of the message excluding the <SOH> characters, the body length’s length and Check sum length
EX:
8=FIX.4.3 35=A 49=654 56=OPENFIX 34=1 52=20040415-08:57:16 98=0 108=60
Thanx in advance
Prasad
[ original email was from Dean Kauffman - dean.kauffman@tradeweb.com ]
Rama,
The first three fields in every FIX message must be 8= 9= and 35= in that order. The proper response to a production message with these fields out of order is to ignore it. The BodyLength is derived "by counting the number of characters in the message following the BodyLength field up to, and including, the delimiter immediately preceding the CheckSum tag (“10=”)" - including the <SOH> delimeters. So reordering your fields and omitting 8= 9= 10= and their <SOH>s from the count, 61 is correct for your first message and 80 is correct for your second.
8=FIX.4.3 9=61 35=A 49=654 56=OPENFIX 34=1 52=20040415-08:57:16 98=0 108=60 10=246
8=FIX.4.3 9=80 35=A 49=654 56=OPENFIX 34=1 52=20040415-09:28:11 98=0 108=60 553=PRASAD 554=XYZ 10=108
> Hi All
> thanx for helping me to understand the Fix.
> I have a facing a problem. In the give below message the body length is 63. When I try to send this message to open fix server it give me an error saying that body length expecting is 61
>
> 8=FIX.4.3 35=A 9=63 49=654 56=OPENFIX 34=1 52=20040415-08:57:16 98=0 108=60 10=246
>
> if I add two extra tags like for example in the Above message I added username and password. It works perfectly fine.
>
> 8=FIX.4.3 35=A 9=80 49=654 56=OPENFIX 34=1 52=20040415-09:28:11 98=0 108=60 553=PRASAD 554=XYZ 10=108
>
>
> Can any body tell me where I am doing wrong?
> is anyother way to calculate the body length
>
> Calculation of body length
> I am counting the length of the message excluding the <SOH> characters, the body length’s length and Check sum length
> EX:
> 8=FIX.4.3 35=A 49=654 56=OPENFIX 34=1 52=20040415-08:57:16 98=0 108=60
>
> Thanx in advance
> Prasad
>
>