This page sets out the key aspects of establishing and managing sessions between a Whisperer Enterprise Client and a Feed Handler. In addition details are provided setting out how to initiate or terminate connectivity to the target Venue.
Overview
Terminology
- Customer - The organisation utilizing MarketFactory's systems.
- Client - The software component(s) maintained by the Customer that are used to communicate with Venues via Whisperer
- User - A logical entity defined by the Customer and configured by MarketFactory, used to associate a Client Session with a Venue Connection.
- Venue - External trading system - may be a Maker (e.g. a Bank), a Taker (e.g. an ECN), or a CLOB.
- Logon Service - Whisperer's security and session administration component.
- Feed Handler - The Whisperer component responsible for maintaining connectivity with a Venue.
- Venue Connection - A connection established between the Feed Handler and the Venue and Whisperer. Typically this will be a single FIX session (i.e. a specific Target/SenderCompID pair), but in some cases this may incorporate additional physical connections - for example, a Pricing session for a CLOB may comprise A/B UDP market data feeds in addition to a standard TCP FIX session used for message recovery.
- Client Session - A connection maintained between the Feed Handler and a Client User, dedicated to delivering messages between the User and the Venue for a specific Session Type.
Sessions
Session Types
Whisperer Enterprise maintains the following session types:
- Pricing
- Delivery of Market Data from a CLOB Venue.
- ESP mass-quotes from a Maker MFSBE4 Client to a Taker Venue.
- ESP mass-quotes from a Maker Venue to a Taker Client.
- Orders
- Submission and execution of MFSBE4 Client orders against a CLOB Venue.
- Orders against ESP liquidity (published on a separate Pricing session) from a Taker Venue to a Maker Client.
- Orders against ESP liquidity (published on a separate Pricing session) from a Taker Client to a Maker Venue.
- RFS
- Full RFS/RFQ quotation negotiation life cycle between Maker Client and Taker Venue.
- Full RFS/RFQ quotation negotiation life cycle between Taker Client and Maker Venue.
- DropCopy
- Delivery of post-Trade Straight-Through Processing (STP) trade notifications. Typically this will be restricted to notifications from dedicated Venue API connections only.
For a given Client and given Whisperer Feed Handler deployment, each session type will be assigned unique Venue connection credentials (typically target IP:Port details and associated Target/SenderCompIDs, but potentially additional details such as Username and Password, PKI certs, etc).
Session Architecture
24x5.5 Availability
All session types are maintained directly with an individual Whisperer Feed Handler. All Feed Handlers are available 24 x 5.5 - the full trading week commencing on Sunday prior to Asia-open and ending on Friday, NY-close, irrespective of the schedule of the Venue itself.
Message Header
In addition to the default SBE message header fields (blockLength, templateId, schemaId and version), the MFSBE4 header additionally defines the mandatory population of the following fields:
- messageLength - this is provided to allow verification that the full message has indeed been received (e.g. should it span multiple packets).
- sendingTime - nanosecond-precision timestamp indicating when the message left the sender.
- msgSeqNum - this is the standard integer message sequence number. When first establishing a connection at the start of a trading week, it should be set to '1', and incremented with every subsequent message sent for the remainder of the trading week.
msgSeqNum
This field should never be reset intra-week, for any session type.
If the Client should disconnect from Whisperer during the trading week, it must continue the message sequence when re-establishing the session.
Venue Connection Management
Whisperer is solely responsible for the management and correct handling of Venue-side FIX Session Synchronisation, including the necessary logic relating to End of Day Resets etc.
Venue Logon
Session startup behaviour is standardised across Taker, Maker and CLOB Venue types as follows:
- The Client first establishes connection to the Feed Handler with Logon & LogonResponse,
- The Client then instructs the Feed Handler to establish a connection to the Venue via a UserRequest (UserRequestType=LogOnUser) message.
- The Feed Handler will attempt to establish connectivity to the Venue
- Once connectivity is established, FIX Session-level messages are exchanged as necessary to address any synchronisation issues.
- The Feed Handler then notifies the client of a successful connection via a UserNotification (UserStatus=LoggedOn) message.
- Any Client pricing/trading requests sent before this will be rejected by Whisperer via ErrorReport messages.
FIX Session Reset
For those Venues which reset FIX sessions on a weekly basis, no special action is required, as this matches the Feed Handler schedule described above.
For persisted (non-Pricing) session types where Venues reset FIX sessions on a daily basis, the Feed Handler will apply the necessary reset logic for the first successful FIX Session Logon only, at Start of Day.
For non-persisted Pricing sessions, the Feed Handler will typically reset the session on every FIX Session Logon.
FIX Session Establishment
Once instructed to do so by the Client User, the Feed Handler will attempt to logon to the Venue. Should a connection not be established immediately, it will periodically retry as follows:
- On a failed logon attempt the Feed Handler will wait RetryInterval seconds (> 0), and repeat.
- Once MaxAttempts (> 0) failed logons occur in a row, the Feed Handler will
- wait BackoffInterval seconds (>= 0) and restart the cycle.
This behaviour applies across all Feed Handlers, irrespective of line protocol, Maker/Taker perspective, or trading model.
MarketFactory will apply appropriate values to each of these three properties, based on individual Venue requirements. No Customer involvement is required.
Should the Client User wish to instruct the Feed Handler to cease attempting to connect to the Venue at any time during this cycle, then it may issue a UserRequest (UserRequestType=LogOffUser) message.
Venue Connection - FIX Session Synchronisation
In order to ensure that Venue-side session synchronisation issues are avoided, Whisperer implements the following policy:
Feed Handler Detection of Venue Sequence Number Gaps
If a sequence number gap is detected on receipt of the Venue's logon response, then a ResendRequest will be issued.
Whilst a sequence gap exists, no other Venue messages will be processed until the sequence gap is resolved - via SequenceResetGapFill(s) and message resends, as the Venue deems necessary.
Once the sequence gap is resolved, Whisperer will formally Logout from the Venue and then re-Logon. Standard Logon processing will thus only progress when complete, clean session synchronisation is guaranteed.
As a final verification, the Feed Handler will issue a TestRequest against the Venue; receipt of the Heartbeat response triggers Whisperer to notify the Client of successful session establishment via the UserNotification(UserStatus=LoggedOn).
The Client User must therefore be capable of receiving and processing resent Venue messages relating to it's previous session (marked as PossResend) in the interval between the UserRequest and the UserNotification.
Venue Detection of Feed Handler Sequence Number Gaps
If the sequence number associated with Venue Logon message issued by the Feed Handler indicates a gap, the Venue will typically respond with a Logon response, followed by a ResendRequest.
Whisperer will respond to this via SequenceResetGapFill(s) and/or message resends, as mandated by the Venue. Immediately after resolution of the sequence gap, Whisperer will formally Logout from the Venue and then re-Logon.
Client Session Synchronisation
Any Client User messages that were delivered to the Feed Handler during Client Session synchronisation will be assigned message sequence numbers that follow sequentially from the end of the previous session. delivered to the Venue immediately on successful completion of the standard FIX Session Synchronisation.
This is not technically a FIX session synchronisation event and whilst the PossDupFlag will be set to mark it as a resend, the sequence number used will be new.
Venue Logoff
Venue logoff may be initiated as a result of any of the following:
- A request from the Client via UserRequest (UserRequestType=LogOffUser).
- The Venue initiates a Logout (e.g. End of Day).
- Whisperer detects a dropped connection
- Whisperer shutdown
In all scenarios, the Client is notified of the event via UserNotification (UserStatus=LoggedOff).
TODO
user sends initiates a transaction after after receiving a loggedout user notification