FIX message delimiter

蹲街弑〆低调 提交于 2019-11-29 05:50:28

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.

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
}

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!