FIX Data Dictionary
About FIX Data Dictionary
While conceptualizing and planning the design for your FIX Initiator application, FIX Acceptor application or FIX-compliant programmatic components, you may come across several questions like:
- How do I build my FIX Initiator or Acceptor application when counterparties follow different FIX Protocol versions?
- How do I implement custom fields in FIX Messages?
- How do I support message types not defined in FIX Protocol?
- Can my common code work across all counterparties?
- Can I implement only relevant message types and fields?
- How do I update without changing code?
- How do I validate FIX Messages?
QXFIX Engine solves these using counterparty-dependent FIX Data Dictionary (XML file).
It contains:
- FIX Protocol version
- Message types
- Header fields
- Trailer fields
- Body fields
- Field definitions
- Repeating groups
- Enumerations
Note
QXFIX Engine includes QXFIX ROE tool to manage Data Dictionary XML files easily.
FAQs
- How does QXFIX ROE help in customization?
- What is structure of FIX Data Dictionary?
- How to specify FIX Protocol version?
- How to implement Header fields?
- How to implement Trailer fields?
- How to implement message types?
- How to specify repeating groups?
- How to implement FIX fields?
- How to specify enumerations?
- How to implement new message types and fields?
- How to use Data Dictionary in config?
- How to load Data Dictionary programmatically?
- How to extract FixDataDictionaryField?
- How to extract FixDataDictionaryMessage?
1. How does QXFIX ROE help in customization?
View Answer
Without modifying code, you can update Data Dictionaries to support:
- Custom fields and message types
- New FIX Protocol updates
QXFIX ROE allows easy editing of XML Data Dictionary.
2. What is the structure of a typical FIX Data Dictionary?
View Answer
A typical FIX Data Dictionary XML structure is:
View Code
<?xml version="1.0" ?>
<fixDataDictionary version="FIX.4.2">
<fixheader>
<fixfield name="BeginString" required="Y" />
<fixfield name="BodyLength" required="Y" />
</fixheader>
<fixtrailer>
<fixfield name="CheckSum" required="Y" />
</fixtrailer>
<fixmessages>
<fixmessage name="Heartbeat" msgtype="0">
<fixfield name="TestReqID" required="N" />
</fixmessage>
</fixmessages>
<fixfields>
<fixfield tag="1" name="Account" datatype="STRING" />
</fixfields>
</fixDataDictionary>
Note
Description attribute is optional. Other attributes are mandatory.
3. How do I specify the FIX Protocol version in the FIX Data Dictionary?
View Answer
The version attribute in the
Format: FIX.m.n
View Code
<?xml version="1.0"?>
<fixDataDictionary version="FIX.4.2">
...
</fixDataDictionary>
4. How do I implement the mandatory and optional Header fields agreed with my counterparty?
View Answer
The
Include only required and agreed fields.
Types of fields:
- Mandatory FIX fields
- Selected optional fields
- Custom fields
View Code
<fixheader>
<fixfield name="BeginString" required="Y" />
<fixfield name="BodyLength" required="Y" />
<fixfield name="MsgType" required="Y" />
<fixfield name="SenderCompID" required="Y" />
<fixfield name="TargetCompID" required="Y" />
</fixheader>
Note
- name must match
- required = Y/N
- description is optional
5. How do I implement Trailer fields agreed with my counterparty?
View Answer
Standard Trailer fields:
- SignatureLength
- Signature
- CheckSum
View Code
<fixtrailer>
<fixfield name="SignatureLength" required="N" />
<fixfield name="Signature" required="N" />
<fixfield name="CheckSum" required="Y" />
</fixtrailer>
If Signature is required:
View Code
<fixtrailer>
<fixfield name="SignatureLength" required="Y" />
<fixfield name="Signature" required="Y" />
<fixfield name="CheckSum" required="Y" />
</fixtrailer>
6. How do I implement different message types agreed with my counterparty, including the custom message types?
View Answer
The
Each
- Message name
- Message type (tag 35)
- Body fields
View Code
<fixmessages>
<fixmessage name="Heartbeat" msgtype="0">
<fixfield name="TestReqID" required="N" />
</fixmessage>
<fixmessage name="Logon" msgtype="A">
<fixfield name="EncryptMethod" required="Y" />
<fixfield name="HeartBtInt" required="Y" />
<fixfield name="RawDataLength" required="N" />
<fixfield name="RawData" required="N" />
<repeatinggroup name="NoMsgTypes" required="N">
<fixfield name="RefMsgType" required="N" />
<fixfield name="MsgDirection" required="N" />
</repeatinggroup>
</fixmessage>
</fixmessages>
Note
- name = message name
- msgtype = FIX tag 35
- required = Y/N
7. How do I specify the Repeating Groups in a message?
View Answer
Repeating Groups are defined using
Example: NoMsgTypes in Logon message.
View Code
<fixmessage name="Logon" msgtype="A">
<fixfield name="EncryptMethod" required="Y" />
<fixfield name="HeartBtInt" required="Y" />
<repeatinggroup name="NoMsgTypes" required="N">
<fixfield name="RefMsgType" required="N" />
<fixfield name="MsgDirection" required="N" />
</repeatinggroup>
</fixmessage>
Key Points
- Repeating group uses NumInGroup field
- Contains multiple field sets
- Must define child fields properly
8. How do I implement the standard and custom FIX fields that my organization and the counterparty mutually agreed to use?
View Answer
The
Each
- tag number
- field name
- data type
- optional description
View Code
<fixfields>
<fixfield tag="1" name="Account" datatype="STRING" />
<fixfield tag="2" name="AdvId" datatype="STRING" />
<fixfield tag="4" name="AdvSide" datatype="CHAR">
<choice value="B" description="Buy" />
<choice value="S" description="Sell" />
<choice value="T" description="Trade" />
<choice value="X" description="Cross" />
</fixfield>
<fixfield tag="5" name="AdvTransType" datatype="STRING">
<choice value="C" description="Cancel" />
<choice value="N" description="New" />
<choice value="R" description="Replace" />
</fixfield>
</fixfields>
Note
- description is optional
- choice defines enumerations
9. How do I specify the description for enumerations of an enumerated field?
View Answer
Enumerations are defined using
Each choice has:
- value
- description
View Code
<fixfields>
<fixfield tag="4" name="AdvSide" datatype="CHAR">
<choice value="B" description="BUY" />
<choice value="S" description="SELL" />
</fixfield>
</fixfields>
Note
Include only required enumerations for compact design.
10. How do I implement new message types and fields that my organization and the counterparty mutually agreed to use?
View Answer
| To implement | Required Action |
|---|---|
| Standard FIX message types (new) | Add |
| Custom message types | Add |
| New standard fields | Add |
| Custom fields | Add |
11. I created a FIX Data Dictionary for my counterparty ‘X’. How do I implement it in the FIX configuration file?
View Answer
You can reference the Data Dictionary file in FIX configuration.
View Code
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<Session>
<add key="DataDictionary" value="D:\...\DataDictionary_X.xml" />
</Session>
</configuration>
Note
Always provide full file path.
12. How do I programmatically refer to a FIX Data Dictionary file and get object structure?
View Answer
Use FixDataDictionary class.
View Code
using com.QX.FIXEngine.Core;
FixDataDictionary cmeFIXDataDictionary =
FixDataDictionaryManager.Instance()
.GetFixDataDictionary("D:\...\DataDictionary\CME4.2.xml");
Related objects:
- FixDataDictionaryField
- FixDataDictionaryMessage
- FixDataDictionaryHeader
- FixDataDictionaryTrailer
13. How do I extract FixDataDictionaryField information?
View Answer
First get FixDataDictionaryField object.
View Code
string fieldName = "OrdType";
FixDataDictionaryField fixDataDictionaryField =
fixDataDictionary.GetFixDataDictionaryField(fieldName);
int fieldTag = fixDataDictionaryField.FieldTag;
string name = fixDataDictionaryField.FieldName;
eFixFieldDataType type =
fixDataDictionaryField.FieldDataTypeEnum;
bool isRequired =
fixDataDictionaryField.IsRequiredField;
bool isGroup =
fixDataDictionaryField.IsGroupField;
bool isValid =
fixDataDictionaryField.HasValidFieldValue("Market");
string description =
fixDataDictionaryField.GetFieldValueDescription("Market");
14. How do I extract FixDataDictionaryMessage object and get information?
View Answer
Use FixDataDictionaryMessage API.
View Code
FixDataDictionaryMessage fixDataDictionaryMessage =
fixDataDictionary.GetDataDictionaryMessage(
com.QX.FIXEngine.Core.Message.FixMessageTypes.Logon_A
);