Fixisoft - IdeaFIX - High-Frequency Trading made simple

Documentation

How-to get started

Pre-requisites

Install the following standard tools to run examples and build your own applications

SDKMAN! is highly recommended. It helps installing SDKs on a profile-only basis.

User Guide

Follow these simple steps to make a FIX application

  1. Make or re-use a FIX Dictionary
  2. Implement the IFixMessageInitializer interface
  3. Implement the IFixIncomingHandler interface
  4. Define configuration
  5. Use the client or server factory methods

Please refer to the Javadoc for more details.

1. Define a dictionary

A dictionary is required to run IdeaFIX. It’s a key aspect that makes IdeaFIX ultra-fast. QuickFIX’s conventions are used, so an existing or custom QuickFIX dictionary can be re-used.

Here’s an extract taken from SDK’s file SIMPLE_OM.xml :

<fix major="4" minor="4">
    <header>
        <field name="BeginString" required="Y"/>
        <field name="BodyLength" required="Y"/>
        <field name="MsgType" required="Y"/>
        <field name="SenderCompID" required="Y"/>
        <field name="TargetCompID" required="Y"/>
        <field name="MsgSeqNum" required="Y"/>
        <field name="PossDupFlag" required="N"/>
        <field name="SendingTime" required="Y"/>
        <field name="OrigSendingTime" required="N"/>
    </header>
    <trailer>
        <field name="CheckSum" required="Y"/>
    </trailer>
    <messages>
        <message name="Heartbeat" msgtype="0" msgcat="admin">
            <field name="TestReqID" required="N"/>
        </message>
        <message name="Logon" msgtype="A" msgcat="admin">
            <field name="EncryptMethod" required="Y"/>
            <field name="HeartBtInt" required="Y"/>
            <field name="ResetSeqNumFlag" required="N"/>
            <field name="NextExpectedMsgSeqNum" required="N"/>
            <field name="Username" required="N"/>
            <field name="Password" required="N"/>
        </message>
      ...
  </fix>

2. Implement IFixMessageInitializer

Many counterparties depart from the plain FIX 4.2 up to 5.0 standards and expect additional headers or trailers. This is where you can insert custom field. Internally, hook methods are called on the main event loop each time a message is requested from the message pool.

You can perfectly design an application that only requires the bare minimum fields and use the NoopMessageInitializer implementation. In fact, using a factory method without this argument type will automatically use this class.

3. Implement IFixIncomingHandler

This is the main interface to implement for any IdeaFIX application. In fact, it follows the design of many other FIX engines. Each of the following methods corresponds to a certain stage of the session

And finally, your client code can call the close() method to gracefully finish a session (with a logout message). It’s useful to implement security such as password checks in the client code.

4. Define configuration

Configuration follows the same conventions as QuickFIX except that IdeaFIX uses YAML. The file is loaded by the loadConfig methods in the factory classes. Here’s an example

    ConnectionType: acceptor
    SocketPort: 8080
    SocketHost: localhost
    StartTime: 00:00:00
    EndTime: 00:00:00
    HeartBtInt: 30
    SenderCompID: testClient
    TargetCompID: testServer
    CheckLatency: Y
    HeartBeatTimeoutMultiplier: 1.5
    IncomingPoolSizes:
        D: 2048
        0: 1024
    ...

Alternatively, you can directly load a JDK Map and therefore use any kind of format.

5. Run a factory methods

There are 2 kinds of factory methods depending on whether you’re writing a client (Initiator in FIX lingo) or a server (Acceptor) :

Here’s a snippet

String name = OMIdeaFixClientExample.class.getSimpleName();
IFixClient fixClient = FixClientFactory.makeClient(makeSimpleClientConfig(name), 
						name,
						new OMClientIncomingHandler());
fixClient.run();

Please bear with us as more detailed documentation will be uploaded later ! As always, the best is to head GitHub to view and run the latest examples.

Download View on GitHub

Zip-archive includes the development kit, documentation, benchmark scripts and examples

fix trading