Market Connectivity / Trading Session Status
Market Connectivity status
Deltix Data connectors use:
ConnectionStatusChangeMessage
to communicate status of their operation. For example a fact of successful connection to market data venue, or an event of losing such connection.SecurityStatusMessage
to communicate successful subscription for a specific contract on specific market data venue, as well as loss of this subscription due to connectivity problem.
Expected flow of messages
After Data Connector starts or re-connects expected sequence of messages is:
ConnectionStatusChangeMessage
{status=CONNECTED_BY_USER or AUTOMATICALLY_RESTORED}SecurityStatusMessage
{symbol="AAA", status=FEED_CONNECTED}SecurityStatusMessage
{symbol="BBB", status=FEED_CONNECTED}
At this point you should see normal flow of market data messages. When connection is terminated for any reason you should see:
SecurityStatusMessage
{symbol="AAA", status=FEED_DISCONNECTED}SecurityStatusMessage
{symbol="BBB", status=FEED_DISCONNECTED}ConnectionStatusChangeMessage
{status=DISCONNECTED_BY_some_reason}
Status codes used by ConnectionStatusChangeMessage
- CONNECTED_BY_USER - Historically this was initiated by system operator. Nowadays data connectors still use this code when automatic setups made first connection to market data venue on start up.
- AUTOMATICALLY_RESTORED - Data Connector has automatically restored the connection to market data venue.
- DISCONNECTED_BY_USER - API User initiated disconnect. The connector never tries to restore a connection that is explicitly terminated.
- DISCONNECTED_BY_COMPLETED_BATCH - Sent after all data requested by batch operation is pushed to the output stream successfully.
- DISCONNECTED_BY_VENDOR_AND_RECONNECTING - Data venue's system forcefully terminated the connection, which this connector is trying to restore.
- DISCONNECTED_BY_VENDOR_AND_HALTED - The venue's system forcefully terminated the connection, which this connector is NOT trying to restore.
- DISCONNECTED_BY_ERROR_AND_RECONNECTING - Unexpected error terminated the connection, which this connector is trying to restore.
- DISCONNECTED_BY_ERROR_AND_HALTED - Unexpected error terminated the connection, which this connector is NOT trying to restore.
- RECOVERING_BEGIN - Failover process marks beginning of non-live data for a given instrument, when it recovers from disconnection. Rarely used as of June 2024.
- LIVE_BEGIN - Failover process marks beginning of live data for a given instrument, when it goes to Live again after reconnection. Rarely used as of June 2024.
Trading Session status
Some markets publish information about trading sessions. For example, when market is halted, or when auction trading session starts, etc. This information is communicated using deltix.timebase.api.messages.service.SecurityTradingStatusMessage
.
Please note that there is a class with same name in different package: deltix.qsrv.hf.pub.SecurityTradingStatusMessage
. This class is depreacted and should not be used.
The SecurityTradingStatusMessage
conveys what happen using several fields:
status
- which can be TRADING_ACTIVE or TRADING_HALTED is gross classification of whether market is trading as normal or not.detailedStatus
- classification of what happened inspired by FIX Protocol tag TradingSessionStatus(326).originalStatus
- market-specific code (as it comes from venue API)cause
- textual description of what happened (usually as it comes from market venue)
While events that trigger ConnectionStatusChangeMessage
and SecurityStatusMessage
originate in Deltix Data Connectors (e.g. dropped network socket), any event that triggers SecurityTradingStatusMessage
always originates on upstream market data venue.