FIX message delimiter

21,752

Solution 1

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.

Solution 2

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

Solution 3

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.)

Share:
21,752

Related videos on Youtube

Ashley
Author by

Ashley

Updated on July 05, 2022

Comments

  • Ashley
    Ashley almost 2 years

    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.

  • Ashley
    Ashley almost 10 years
    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.
  • MP24
    MP24 almost 10 years
    Yes, see fixwiki.org/fixwiki/FPL:Tag_Value_Syntax for a description of the format. Looking into source code for quickfix, it also uses 0x01 as delimiter.
  • Andy Lynch
    Andy Lynch almost 10 years
    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=2014‌​0825-07:24:08^A... .