FIX message delimiter
Asked Answered
B

3

24

I am relatively new to FIX-Protocol.

The delimiter for a FIX-Protocol message sometimes show ^ and other times |. Wikipedia for FIX-Protocol says [SOH] ( <Start of Header> for hex 0x01 ) being the character.

Please explain the meaning of the same.

For example a FIX-Protocol message can be visually represented as

8=FIX.4.4^9=122^35=D^34=215^49=CLIENT12^52=20100225-19:41:57.316^56=B^1=Marcel^11=13346^21=1^40=2^44=5^54=1^59=0^60=20100225-19:39:52.020^10=072^

or

8=FIX.4.4|9=122|35=D|34=215|49=CLIENT12|52=20100225-19:41:57.316|56=B|1=Marcel|11=13346|21=1|40=2|44=5|54=1|59=0|60=20100225-19:39:52.020|10=072|

So what exactly is the difference in using a ^ over |

Are there other delimiters used as well. Its not clear why [SOH] (0x01) fits for ^ or |

It could have been numerical ONE.

Bookstand answered 13/8, 2014 at 18:10 Comment(0)
A
20

The delimiter SOH = ASCII code 01 is a non-printable character. Looking at the binary representation of the message (e.g. in a hex editor view), you'll see the character as 0x01. To display the messages, it seems that some people use | and other use ^ which are rarely used characters and thus a good delimiter.

Aholah answered 13/8, 2014 at 20:40 Comment(2)
So, this means, a real fix message on the wire/socket/network will not contain | or ^ character but only 0x01, however, once off the wire, 0x01 is replaced by one of the | or ^ characters. I may be off the target here, but really appreciate your help.Bookstand
One other point to add - I often see rax messages in logfiles. On Linux, the SOH will often be shown in the terminal as its C escape code, ^A, eg: 8=FIX.4.2^A9=207^A35=D^A43=N^A52=20140825-07:24:08^A122=20140825-07:24:08^A... .Gemmagemmate
C
6

using the | character is just for visual convenience, easier to read than ^A

cat your.file.fix | tr '\01' '|' | less

you can easily transform the above command as a custom shell script to open FIX sessions files

~/.bashrc

function fixlog {
  cat $* | tr '\01' '|' | less
}

then simply

fixlog your.file.fix
Charqui answered 22/2, 2019 at 9:54 Comment(0)
D
1

FIX messages always have 0x01 between fields in the message, whether it is on the wire, in an OMS/EMS or in a log file. It is only when the message has to be displayed that the substitution is made (OK, some people may make their log files clean and so transcribe the character). It is never the case that a valid FIX message will have pipes or carets separating fields. It is also the case that a FIX message will never have anywhere than between fields. ( is a character which shouldn't appear in printed text - FIX messages are supposed to be readable - and it won't clash with that terminates a C string, so the whole message can be treated as a string, if you are so inclined.)

Dorathydorca answered 26/7, 2017 at 8:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.