The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Protocol::FIX::Message - FIX protocol message definition

METHODS

serialize

    serialize($self, $values)

Serializes provided values into string.

    $message->serialize([
        field => 'value',
        component => [
            other_field => 'value-2',
            group_field => [
                [some_field_1 => 'value-3.1.1', some_field_1 => 'value-3.1.2'],
                [some_field_1 => 'value-3.2.1', some_field_1 => 'value-3.2.2'],
            ],
        ],
    ]);

Error will be thrown if values do not conform the specification (e.g. string provided, while integer is expected).

The managed fields (BeginString, MsgType, and CheckSum) are calculated and added to serialized string automatically.

METHODS (for protocol developers)

new

    new($class, $name, $category, $message_type, $composites, $protocol)

Creates new Message (performed by Protocol, when it parses XML definition)