FIX Protocol in Runtime

Basic concept

The Fixopaedia is a high-level mechanism for FixMessage manipulation. It is responsible for:

FIX Dictionary

The FixDictionary is a storage of meta-data which describes different versions and dialects of the FIX protocol. The format of FixDictionary structure description is XML. The FixDictionary allows to load protocol descriptions dynamically. It provides the following information about the FIX Protocol elements:

Create and start

The FixDictionary object can be created in a common way.

For example:

final SAXUnmarshaler
<Fixdic> saxUnmapshaler = new SAXUnmarshaler
        final XMLEngine
        <Fixdic> engine = new XMLEngineImpl
                //dictName - path to dictionary (XML file)
                final InputStream xml = Thread.currentThread().getContextClassLoader().getResourceAsStream(dictName);
                if (xml == null) {
                throw new RuntimeException("Unable to locate requested dictionary '" + dictName
                + "' in the application classpath");
                Fixdic fixdic = engine.unmarshal(Fixdic.class, SAXReader.createReader(xml, saxUnmapshaler), true);

Search for the FIX protocol elements

You can get lists of messages

                <Msgdef> messages = fixdic.getMsgdic().getMsgdef();

, blocks

                    <Blockdef> blocks = fixdic.getMsgdic().getBlockdef();

, fields

                        <Fielddef> fields = fixdic.getFielddic().getFielddef();

from Fixdic.

If you need a particular message you have to iterate through the list to find it.

You can get fields, blocks and groups from the message by calling the message.getFieldOrDescrOrAlias()method. It returns a list containing all children, so you need to iterate through it and check element types.

For example, to process all groups in message:

                            Msgdef message = ...
                            for (Object obj : message.getFieldOrDescrOrAlias()) {
                            if (obj instanceof Group){
                            Group gr = (Group) obj;

The other way to work with dictionary is to get instance of FIXUtil:

                            FIXVersionContainer fixVersionContainer =
                            FIXUtil fixUtil = FIXUtilFactory.getInstance().getFIXUtil(fixVersionContainer);
                            //get order message definition
                            Msgdef orderDefinition = fixUtil.getMessageDefUtils().get("D");
                            //get required tags for order
                            <Integer> requiredTagsForMessage = fixUtil.getRequiredTagsForMessage("D");

Generated on 10 Feb 2022 for FIXAntennaJava by  doxygen 1.6.1