Libraries

The FIX libraries are built-in to IPL, and all their messages, fields, records and enumeration types can be accessed by importing a library. All implemented FIX libraries are called FIX_ with some version after them (accessible via completion in VSCode). For example to import the 4.4 FIX library we can start the IPL model as:

import FIX_4_4

Now all of the elements from the FIX version 4.4 library are accessible so we can import messages from there as described in section Messages and Actions for example.

It is possible to override the type of an imported field. Sometimes you may want to specify your own enumeration type for example, or change the type stated in the FIX library that has been imported. In order to do this we can employ the following syntax:

import FIX_4_4

@encoding: int
enum PartyID {
   Zero "0" 
   One "1" 
   Two "2" 
} 

overrideFieldTypes {
    PartyID : PartyID 
}

Any further reference in the file to PartyID is then of type PartyID, whereas in the dictionary it is given as string.

It is possible to override the encodings associated with an imported enumeration type. For example, if the existing encoding type of an enumeration type is MultipleValueChar it is possible to change this to allow only one value:

import FIX_4_4
extend enum ExecInst {
    @encoding: char
    BestBidPeg "x"
    BestOfferPeg "z"
}

Equally if an enumeration type is of type int it is possible to use the same mechanism to extend to char. In general such overrides can only take place if they do not invalidate existing entries. For example, it is not possible to override an enumeration encoding of type char with int as existing values - e.g. "a" would not be consistent with type int.

Below is a table of permissible encoding base type overrides for each base type.

int,MultipleValueInt : int,MultipleValueInt,string,MultipleValueString
char,MultipleValueChar : char,MultipleValueChar,string,MultipleValueString
string,MultipleValueString : string,MultipleValueString

For encodings which are set types (e.g. MultipleValueChar) it is possible to define a separator for values that come in a FIX message. For example if a FIX message has a field with tag “2001” and type myEnum which has encoding MultipleValueChar it may come in as

|2002=a b c d|...

which is the default behaviour, or it may come in as

|2002=a|b|c|d|...

in which case a char types separator can be defined via the encoding command (here in a custom enum extension, but if a newly defined (non-library) enumeration type can be defined in the encoding directly):

extend enum myEnum {
    @encoding: MultipleValueChar separator: "|"
}

.

It is possible, but not advisable to import objects from multiple FIX libraries. For example, one can write

import FIX_4_2
import FIX_4_4

See the tutorial on Multiple Imports for a detailed description of the possible side effects of importing to libraries.

It is possible to override the name of certain artifacts in an IPL model.

Overriding message names

One can give a new name to an existing message as follows:

import FIX_4_2
message OrderSingle {
    @OverrideName NewOrderSingle
    ...
}

Then when referring to this message for example in receive code, the name of the message is given as the overridden name:

import FIX_4_2
message OrderSingle {
    @OverrideName NewOrderSingle
    ...
}

receive (msg:NewOrderSingle){
    ...
}

Overriding case names

It is possible to give a new name for an enumeration case using the custom machinery:

extend enum Rule80A {
    @OverrideName "R" Rule80ACaseR
}

Now within the document the case corresponding to tag "R" will be referred to as Rule80ACaseR.

There is a built-in documentation creation system available via IPL - this can be accessed via the VSCode command Ipl:Generate Documentation. One of the purposes of the overriding of encodings, types and names described in the previous sections is that the names given in documentation will adhere to the overridden names given in the IPL model code.

View here the generated documentation for the advanced tutorial model.

The libraries accessible to a user are FIX version 4.2, 4.4 and 5.0. The respective libraries that can be imported are called FIX_4_2, FIX_4_4 and FIX_5_0. You can view the generated documentation for the libraries here: