eSpeed Multicast Market Data Handler for C++  1.5.2.0
Listening to Market Data

Events in the Handler

Once the Handler is started, it listens to a messages from the eSpeed API message flow, processes it and invokes client code for further processing.

The Handler processes messages asynchronously and uses concept of events and event listeners to notify client code about a particular occasion like receiption of record.

Listening for a particular Event

For each event like Error Occurred Handler provides an interface (C++ class with pure virtual members) like OnixS::eSpeed::MarketData::ErrorListener. Client code must implement this interface (C++ class) to be able to handle events of a particular type. Handler also exposes a member like OnixS::eSpeed::MarketData::Handler::registerErrorListener which allows to associate an instance of the event handler with a appropriate event in bounds of a particular instance of the OnixS::eSpeed::MarketData::Handler class.

Note
Associating listener for a particular event with an instance of the OnixS::eSpeed::MarketData::Handler class must be performed while the Handler is in disconnected state. Once the Handler is started, changing listener-event associations is not allowed and may lead to unpredictable behavior as well as may cause unexpected errors.

Associating event listener with an instance of the OnixS::eSpeed::MarketData::Handler class is also called subscribing to an event.

Primary High-level Events

There're multiple events exposed by the Handler. All events can be logically divided onto high- and low- level event sub-set. High-level events reflect various results of message processing done by the Handler like Order book changed or Trade occured. Low-level events are designed for more control over data processing as well for more flexibility and described in different section of this documentation including Advanced Programming section.

Below table describes events exposed by the Handler as well as depicts correspondence between events, interfaces for listeners and the Handler's members to subscribe to an event:

Event Listener (C++ class) to be implemented Handler's member to register listener Description
Market data being updated OnixS::eSpeed::MarketData::MarketDataListener::onBeginUpdate OnixS::eSpeed::MarketData::Handler::registerMarketDataListener Occurs when market data being updated.
Market data updated OnixS::eSpeed::MarketData::MarketDataListener::onEndUpdate OnixS::eSpeed::MarketData::Handler::registerMarketDataListener Occurs when market data already updated.
Incremental order book changes OnixS::eSpeed::MarketData::MarketDataListener::onPriceLevelChanged OnixS::eSpeed::MarketData::Handler::registerMarketDataListener Occurs when price level changed.
Order book updated OnixS::eSpeed::MarketData::MarketDataListener::onOrderBookUpdated OnixS::eSpeed::MarketData::Handler::registerMarketDataListener Occurs when order book updated.
Order book reset OnixS::eSpeed::MarketData::MarketDataListener::onOrderBooksReset OnixS::eSpeed::MarketData::Handler::registerMarketDataListener Occurs when order book is reseted.
Order book is out of date OnixS::eSpeed::MarketData::MarketDataListener::onOrderBooksOutOfDate OnixS::eSpeed::MarketData::Handler::registerMarketDataListener Occurs when order book is out of date.
Trade occured OnixS::eSpeed::MarketData::MarketDataListener::onTrade OnixS::eSpeed::MarketData::Handler::registerMarketDataListener

Occurs when a deal takes place on the Exchange.