Skip to content

stephenlclarke/fixdecoder

Repository files navigation

repo logo repo title


Quality Gate Status Bugs Code Smells Coverage Duplicated Lines (%) Lines of Code Reliability Rating Security Rating Technical Debt Maintainability Rating Vulnerabilities Repo Visitors


Steve's FIX Decoder / logfile prettify utility

This is my attempt to create an "all-singing / all-dancing" utility to pretty-print logfiles containing FIX Protocol messages while simultaneously learning golang and trying to incorporate SonarQube Code Quality metrics.

I have written utilities like this in past in Java, Python, C, C++ and even in Bash/Awk!! This is my favourite one so far. Maybe Rust will be next.

repo title


Buy Me a Coffee   Leave a Comment

β˜• If you found this project useful, consider buying me a coffee or dropping a comment β€” it keeps the caffeine and ideas flowing! οΏ½οΏ½οΏ½οΏ½


How to use it

The utility behaves like the cat utility in Linux, except as it reads the input (either piped in from stdin or from a filename specified on the commandline) it scans each line for FIX protocol messages and prints them out highlighted in bold white while the rest of the line will be in a mid grey colour. After the line is output it will be followed by a detailed breakdown of all the FIX Protocol tags that were found in the message. The detailed output will use the appropriate FIX dictionary for the version of FIX specified in BeginString (tag 8) tag.

I plan to produce an update shortly that will also look at DefaultApplVerID (tag 1137) when 8=FIXT.1.1 is detected in the message.

Running the utility

❯ bin/fixdecoder-2.0.3-develop.darwin-arm64 --help
fixdecoder v2.0.3-develop (branch:develop, commit:01dca64)
  git clone git@github.com:stephenlclarke/fixdecoder.git
Usage: fixdecoder [[--fix=44] | [--xml=FIX44.xml]] [--message[=MSG] [--verbose] [--column] [--header] [--trailer]]
       fixdecoder [[--fix=44] | [--xml=FIX44.xml]] [--tag[=TAG] [--verbose] [--column]]
       fixdecoder [[--fix=44] | [--xml=FIX44.xml]] [--component=[NAME] [--verbose]]
       fixdecoder [[--fix=44] | [--xml=FIX44.xml]] [--info]
       fixdecoder [--validate] [--colour=yes|no] [--secret] [file1.log file2.log ...]
       fixdecoder [--version]

Flags:
  -colour
      Force coloured output (yes|no). Default: auto-detect based on stdout
  -column
      Display enums in columns
  -component
      Component to display (omit to list all components)
  -fix string
      FIX version to use (40,41,42,43,44,50,50SP1,50SP2,T11) (default "44")
  -header
      Include Header block
  -info
      Show XML schema summary (fields, components, messages, version counts)
  -message
      Message name or MsgType (omit to list all messages)
  -secret
      Obfuscate sensitive FIX tag values
  -tag
      Tag number to display details for (omit to list all tags)
  -trailer
      Include Trailer block
  -validate
      Validate FIX messages during decoding
  -verbose
      Show full message structure with enums
  -version
      Print version information and exit
  -xml string
      Path to alternative FIX XML file

❯ ./bin/fixdecoder/v2.0.3-develop/fixdecoder --help
fixdecoder v2.0.3-develop (branch:develop, commit:f3c0f91)

  git clone git@github.com:stephenlclarke/fixdecoder.git

Usage: fixdecoder [[--fix=44] | [--xml FIX44.xml]] [--message[=MSG] [--verbose] [--column] [--header] [--trailer]]
       fixdecoder [[--fix=44] | [--xml FIX44.xml]] [--tag[=TAG] [--verbose] [--column]]
       fixdecoder [[--fix=44] | [--xml FIX44.xml]] [--component=[NAME] [--verbose]]
       fixdecoder [[--fix=44] | [--xml FIX44.xml]] [--info]
       fixdecoder [--validate] [--colour=yes|no] [file1.log file2.log ...]

Flags:
  --colour
        Force coloured output (yes|no). Default: auto-detect based on stdout
  --column
        Display enums in columns
  --component
        Component to display (omit to list all components)
  --fix string
        FIX version to use (40,41,42,43,44,50,50SP1,50SP2,T11) (default "44")
  --header
        Include Header block
  --info
        Show XML schema summary (fields, components, messages, version counts)
  --message
        Message name or MsgType (omit to list all messages)
  --secret
        Obfuscate sensitive FIX tag values
  --tag
        Tag number to display details for (omit to list all tags)
  --trailer
        Include Trailer block
  --validate
        Validate FIX messages during decoding
  --verbose
        Show full message structure with enums
  --xml string
        Path to alternative FIX XML file

How to get it

ℹ️ However you download it you will have to make the binary executable on your computer. Windows users will need to rename the download and add a .exe extension to the binary before you can execute it. Linux and MacOS users will need to do a chmod +x on the file first.

Download it

Check out the Repo's Releases Page to see what versions are available for the computer you want to run it on.

Build it

Build it from source. This require bash version 5+ and go version 1.25.0

❯ bash --version
GNU bash, version 5.3.3(1)-release (aarch64-apple-darwin24.4.0)
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

❯ go version
go version go1.25.0 darwin/arm64

Clone the git repo.

❯ git clone git@github.com:stephenlclarke/fixdecoder.git
Cloning into 'fixdecoder'...
remote: Enumerating objects: 418, done.
remote: Counting objects: 100% (418/418), done.
remote: Compressing objects: 100% (375/375), done.
remote: Total 418 (delta 201), reused 0 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (418/418), 1.02 MiB | 2.65 MiB/s, done.
Resolving deltas: 100% (201/201), done.
❯ cd fixdecoder

Then build it.

❯ ./ci.sh build

>> Setting up environment

>> Installing test dependencies

>> Running go mod tidy in all modules

>> Auto-Generating FIX dictionary
Downloading https://raw.githubusercontent.com/quickfix/quickfix/master/spec/FIX40.xml β†’ resources/FIX40.xml
Downloading https://raw.githubusercontent.com/quickfix/quickfix/master/spec/FIX41.xml β†’ resources/FIX41.xml
Downloading https://raw.githubusercontent.com/quickfix/quickfix/master/spec/FIX42.xml β†’ resources/FIX42.xml
Downloading https://raw.githubusercontent.com/quickfix/quickfix/master/spec/FIX43.xml β†’ resources/FIX43.xml
Downloading https://raw.githubusercontent.com/quickfix/quickfix/master/spec/FIX44.xml β†’ resources/FIX44.xml
Downloading https://raw.githubusercontent.com/quickfix/quickfix/master/spec/FIX50.xml β†’ resources/FIX50.xml
Downloading https://raw.githubusercontent.com/quickfix/quickfix/master/spec/FIX50SP1.xml β†’ resources/FIX50SP1.xml
Downloading https://raw.githubusercontent.com/quickfix/quickfix/master/spec/FIX50SP2.xml β†’ resources/FIX50SP2.xml
Downloading https://raw.githubusercontent.com/quickfix/quickfix/master/spec/FIXT11.xml β†’ resources/FIXT11.xml
Processing resources/FIX40.xml β†’ fix/fix40/fix40.go
Processing resources/FIX41.xml β†’ fix/fix41/fix41.go
Processing resources/FIX42.xml β†’ fix/fix42/fix42.go
Processing resources/FIX43.xml β†’ fix/fix43/fix43.go
Processing resources/FIX44.xml β†’ fix/fix44/fix44.go
Processing resources/FIX50.xml β†’ fix/fix50/fix50.go
Processing resources/FIX50SP1.xml β†’ fix/fix50SP1/fix50SP1.go
Processing resources/FIX50SP2.xml β†’ fix/fix50SP2/fix50SP2.go
Processing resources/FIXT11.xml β†’ fix/fixT11/fixT11.go
Generating fix/chooseFixVersion.go
Done.

>> Auto-Generating FIX sensitive tags
Generated fix/sensitiveTagNames.go with 109 tags

>> Building fixdecoder v2.0.3-develop (branch: develop, commit: 570547b), OS: darwin, ARCH: arm64

real  0m0.392s
user  0m0.221s
sys   0m0.228s

>> Copying binaries
[Sep 16 21:28]  ./bin
β”œβ”€β”€ [Sep 16 21:28]  fixdecoder
└── [Sep 16 21:28]  fixdecoder-2.0.3-develop
    └── [Sep 16 21:28]  fixdecoder

2 directories, 2 files

Run it and check the version details

❯ ./bin/fixdecoder/v2.0.3-develop/fixdecoder --version
fixdecoder v2.0.3-develop (branch:develop, commit:c2a60e8)
  git clone git@github.com:stephenlclarke/fixdecoder.git

Third-Party Specifications

This project uses the public FIX Protocol XML specifications from the QuickFIX project. The XML files are downloaded during the build and used to generate Go sources under fix/ and to drive message decoding at runtime.

The QuickFIX specifications are licensed under the BSD 2-Clause License. Their copyright notice and license terms are included in this repository’s NOTICE file (and in licenses/QUICKFIX-BSD-2-Clause.txt).


Β© 2025 Steve Clarke Β· Released under the AGPL-3.0 License