« RapidAddition’s ShortCut Architecture and Overview | Main | Generating the ExtensionObject XML »
Thursday
Mar312011

FIX for BizTalk (The basics)

(PDF of series)

FIX is a messaging standard and protocol that is used by the finance industry for real-time electronic exchange of securities transmissions. It was developed by the industry to facilitate the automated trading of financial instruments and is used around the world by banks, brokers, exchanges and order management and trading systems. The site fixprotocol.org has some good information to get you started.

To the uninitiated a FIX message will look a little strange but it won’t take you too long to get your head around it. Below is an example of what an Order (NewOrderSingle) might look like:

1: 8=FIX.4.2 9=118 35=D 34=23 49=OMS 56=NSDQ 52=20100721-03:16:21.679 40=1

55=MSFT 54=1 60=1999-05-31T13:20:00.000-05:00 38=100 21=1 10=169


The numbers are referred to as Tags. Tag 8 at the start is the version which in this case is FIX 4.2. Tag 35 denotes the message type, D is NewOrderSingle.  This is a BUY order (54=1) for 100 shares (38=100) of Microsoft (55=MSFT) at a market price (40=1). Tag 49 is SenderCompID and is a string that identifies the Sender of the message to the counter party or recipient. 56 is TargetCompID which is used by the counterparties FIX engine to verify the message. These values are important when setting up BizTalk which I’ll cover in a later article. 

To learn more about these tags and the messages that FIX supports there’s a handy app online: fixmate.

FIXML

The FIX protocol guys have also come up with XML versions of FIX messages which is called FIXML. The NewOrderSingle above in FIXML would look like this:

   1: <Order OrdTyp='1' Sym='MSFT' Side='1' TxnTm='1999-05-31T13:20:00.000-05:00' 
   2:         Qty='100' ClOrdID='' HandlInst='1'>
   3:    <Hdr SndgTm='1999-05-31T13:20:00.000-05:00' SeqNum='23' SID='OMS' TID='NSDQ' />
   4: </Order>


Nothing too scary, the emphasis is on small efficient messages as speed is the name of the game.

FIX Engines

A FIX engine is the application or service that enables the transmission of these messages between parties. The FIX engines connect over using a standard TCP/IP connection, they manage the session level communications (authentication, validation, heartbeats, session recovery) and the application layer (orders, executions etc).

FPL define a FIX engine as:

“A FIX engine is a piece of software that manages a network connection, creates and parses outgoing and incoming messages, respectively, and recovers if something goes wrong. A FIX engine manages the session and application layers and is the single piece of software you need in order to FIX-enable trading or order management systems. In the context of a trading system your FIX engine is the interface to the outside world, which, together with a network, connects you to outside world and allows you to trade and exchange related information in a standard fashion. Thus, to FIX-enable an application refers to the integration of a FIX engine and connection to a routing network.”

BizTalk

The folks at RapidAddition have been building FIX engines since FIX was running around in diapers. They’ve put together a very nice FIX BizTalk Adapter that FIX-enables your BizTalk Server. Your first thought is probably “I thought BizTalk was slow and FIX was about speed”, which just isn’t true. I have worked on FIX-enabled BizTalk systems manage hundreds of executions a second. Whilst there are limitations it all comes down to how you configure BizTalk and design and build the application. A lot of that is contingent on what your application has to do. For example just routing orders will be super quick but if you need to crack open the message and perform validations, transformations etc then it will come at some cost.

RapidAddition’s product is called ShortCut and is super easy to get started with. ShortCut will basically turn your Receive Locations into FIX engines. ShortCut will manage all the FIX session stuff and you just need to worry about routing or orchestrating application messages through your FIX hub. ShortCut comes with all the FIXML schemas in DLL’s for you to reference in your projects. Building applications is pretty easy and you don’t need to be a FIX weapon to do this as I hope to show in posts I’ll put together over the next few weeks.

Articles (as they’re posted)

  1. ShortCut Architecture and Overview
  2. Installing and Configuring ShortCut
  3. Basic Routing Application using ShortCut
  4. Mapping FIX Messages
  5. More complicated scenarios and patterns using a FIX-enabled BizTalk

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>