Tuesday, January 24, 2006

ResendRequest

One of the problems with the FIX protocol is the handling of missing messages. If you receive a message with a sequence number higher than expected, the protocol dictates that you should send a ResendRequest, requesting the messages from the missing message (to infinity). As the messages are to be handled sequentially all process of incoming messages should stop, until the gap has been filled.

This modus operandi works fine for trade and order related messages and executions, but what about quotes? Or market data? Are you really interested in receiving a bunch of old quotes that you can't trade on anyway, because they are ... old?

To overcome this, we have adopted the following best practice for our own B2B Server: we use two FIX sessions, one for the quotes and one for the trades. The benefit of this is that the client does not have to request missing messages on the quote session, but can simply accept the incoming sequence number as being the next in line, even if it is too high according to his or her own book keeping. At the same time, we will not send out old quotes, but simply a SessionReset(GapFill) should we receive a ResendRequest. Obviously ResendRequests should be made on the trade session.


No comments: