Selasa, 18 Februari 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.





-->






Business Message Reject (FIX MsgType 35=j) can be used in following scenario:

1) Account not mapped correctly on broker side.

2) Unknown ID

3) Valid but unsupported message type

4) Unknown security

5) Valid but unknown message type.

6) Some of conditionally required field is not present in Incoming FIX message.





Session level Reject (FIX MsgType 35=3) can be used in following scenario.

CompID problem: Either FIX Initiator or FIX Acceptor is sending incorrect SenderCompID (tag 49) and TargetCompID (tag 50).

Invalid MsgType: Either FIX initiator or FIX Acceptor is sending MsgType other than specified in FIX Specification for that particular FIX Version e.g. FIX4.2

Incorrect data format for value: If a FIX tag has a data type Timestamp and FIX engine is sending some other data type

Required tag missing: Either FIX Initiator or FIX Acceptor is not sending mandatory FIX tag in a particular FIX message e.g. Price (FIX tag 44) missing in a NewOrderSingle (MsgType=D) message with OrdType =2 i.e. Limit Order.

Invalid tag number: Either FIX initiator or FIX Acceptor is sending any tag other than specified in FIX Specification for that particular FIX Version e.g. FIX4.2

Tag not defined for this message type: Either FIX initiator or FIX Acceptor is sending any tag other than specified in FIX Specification for that particular message type e.g. Sending TestReqID in logout message.

Undefined Tag: In case any of sender FIX engine is sending custom tag and that is not configured or supported by Revenging fix engine.

Tag specified without a value: e.g. 35= and there is no value for that particular fix tag. Its not a valid fix message and so receiving fix engine will reject it.



You can also check Session level messages in FIX protocol to learn more about FIX protocol Sessions.





I have also documented my discussion on my FIX protocol tutorial series, please check for more information on different areas of FIX protocol and FIX connectivity e.g. FIX Session management , FIX application management or FIX Interview questions.






Related post:






Basics of FIX Protocol and FIX Engine



Difference between FIX 4.2 vs FIX 4.4 




























Source:http://javarevisited.blogspot.com/2011/02/fix-protocol-tutorials-difference.html

Tidak ada komentar:

Posting Komentar