NAME

Protocol::FIX::Field - FIX Message Field

Description

The following field types are known to the class. Validators are provided.

AMT
BOOLEAN
CHAR
COUNTRY
CURRENCY
DATA
EXCHANGE
FLOAT
INT
LENGTH
LOCALMKTDATE
MONTHYEAR
MULTIPLEVALUESTRING
NUMINGROUP
PERCENTAGE
PRICE
PRICEOFFSET
QTY
SEQNUM
STRING
UTCDATEONLY
UTCTIMEONLY
UTCTIMESTAMP

METHODS (for protocol developers)

new

new($class, $number, $name, $type, $values)

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

check

check($self, $value)

Returns true or false if the supplied value conforms type.

If type has enumeration (i.e. "B" for "BID" and "O" for "OFFER"), then it expects that human-readable value ("BID" / "OFFER") will be provided as $value. The values "B" or "O" will not bypass the check.

This method is used during message serialization "serialize" in Message.

has_mapping

has_mapping($self)

returns true if field has enumeration

check_raw

check_raw($self, $value)

Returns true or false if the supplied value conforms type.

If type has enumeration (i.e. "B" for "BID" and "O" for "OFFER"), then it expects that enum value ("B" / "O") will be provided as $value. The values "BID" or "OFFER" will not bypass the check.

This method is used during message deserialization "parse" in FIX.

serialize

serialize($self, $values)

Serializes field value. If the value does not bypasses the type check, an exception will be thrown.