Search code examples
quickfixfix-protocol

What are "bodyLength" and "checkSum" in QuickFix?


Anyone here can tell me what are "bodyLength" and "checkSum" in QuickFix?

I have searched on this and there is no definition.

What is the purpose of those in Message (tag = 9 and 10)?


Solution

  • First of all, your question is about FIX, which is a protocol, not QuickFIX, which is just an engine that can be used for FIX programs.

    Second, if you are going to work with FIX (and, given your many recent SO questions, you obviously are), then you really need to acquaint yourself with the FIX specifications.

    You can create an account for free at http://fixtradingcommunity.org, and then go to this page to download the specs in PDF format:

    http://www.fixtradingcommunity.org/pg/structure/tech-specs/fix-protocol

    The specs will tell you exactly what bodyLength and checkSum are and how they are computed. Luckily, QuickFIX does these computations for you.

    Purposes of those fields:

    • bodylength: tells the receiving parser how many bytes the message should be. If the parser finds it has less bytes than that, then there was a problem in either the sender or receiver.
    • checksum: again, helps the receiver detect a problem. If the receiver's computed checksum doesn't match field 10, then someone's got a bug.