Saturday, 17 May 2014

FIX Protocol tutorials: Difference between Session Level Reject and Business message Reject


FIX Protocol tutorials: Difference between Session Level Reject and Business message Reject
In FIX protocol there are multiple ways of rejecting message some of them are using an Execution Report (MsgType=8) and ExecType=8 to reject a FIX message if it can not be acceptable by exchange e.g. Sending order for an exchange and link between broker and exchange is down. Another way of rejecting message is OrderCancelReject (FIX MsgType=9) which is used to reject amend (OrderCancelReplace message FIX MsgType 35=G) and cancel (OrderCancelRequest FIX MsgType=F) messages if its not possible to modify or cancel original message e.g. Sending Cancel request to an already filled order will be rejected by OrderCancelReject message in FIX protocol.


In this FIX tutorial (that's what I called it :) it may not be a full fledged tutorial but it just an article based on my experience which gives you basic idea about some functionality available in FIX protocol and supplement your concept while reading lengthy but detailed FIX protocol specification) we are going to discuss another two ways or rejecting FIX messages , these reject message represent more serious error than previous two and named as Session Level Reject (FIX MsgType 35=3) and Business Message Reject (35=j). If you want to know more about my FIX protocol tutorials please see this link FIX Protocol tutorial.

Both Session level Reject (FIX MsgType 35=3) and Business Message Reject (FIX MsgType 35=j) is used to reject incoming FIX message.
Session level Reject (FIX MsgType 35=3) message should be used when incoming message cannot be parsed correctly because of session level rule violation. for example Session level Reject(FIX MsgType 35=3) should be used to reject an incoming FIX message with invalid basic data like unknown MsgType (e.g. MsgType 35=99) which successfully passes de-encryption, Checksum (FIX tag 10) and BodyLength (FIX tag 9) checks. As recommended by FIX Protocol we should always try to forward FIX message to the trading application for application or business level rejections.

We should always log both Session level Reject(FIX MsgType 35=3) and Business Message Reject (FIX MsgType 35=j)in the FIX Engine log file so that Trade Support knows about it and inform client or broker about it also Sequence Number should be increased as a result of session or business level reject. Session level Reject (FIX MsgType 35=3) indicates a serious error which is due to buggy or faulty logic in either the sending or receiving FIX engine so it the message fails on session level rule e.g. checksum or body length a session level reject should be preferred over business level reject while business Message Reject (FIX MsgType 35=j) should be used to reject an application-level message which passes all session-level rules and cannot be rejected by any other means.

No comments:

Post a Comment