OnixS C++ CME Market Data Handler  5.5.1
API documentation
Instrument Recovery Options

The Instrument Replay feed constantly loops security definitions and thus lets a client system and the Handler, in particular, to catch up current set of instruments available on a channel. Any additions, modifications, and deletions to available instruments are reflected as soon as a new loop of the recovery data begins. By default, the Handler processes recovery data from the beginning of a loop in order to have accurate set of available instruments. If the Handler joins the feed in the middle of a loop, it waits till its end. When the number of security definitions being looped is significant, it takes a while for the Handler to get all instrument definitions recovered. As a result, client systems using the Handler may need for a faster way of recovering security definitions. For this reason, the SDK offers instrument recovery options client systems may take advantage of.

Instrument Recovery Options

The following table uncovers instrument recovery options exposed by the given SDK:

Event Description
OnixS::CME::MDH::InstrumentRecoveryOptions::Accurate

The given strategy tells the Handler to recover instruments in the most accurate way. In particular, the Handler processes instrument definitions from the beginning of a recovery loop. If the Handler joins instrument recovery feed in the middle of a recovery loop, incoming data is ignored until a new loop begins. Also, if the Handler detects a gap in a sequence of incoming packets, it will stop processing instrument definitions till the end of a loop and restart the recovery from the beginning of a new loop.

The given way to recover instruments is highly recommended for the channels, where user-defined instruments are frequently added or removed during the trading week.

Accurate recovery may take longer due to the necessity to wait for the beginning of a new loop caused by join at the middle of a prior loop or data loss.

OnixS::CME::MDH::InstrumentRecoveryOptions::Fast The fast mode allows starting processing instrument definitions from the middle of a recovery loop without waiting for the beginning of the next loop. In case of data loss, missing definitions are recovered from the next loops. The given approach allows recovering quicker. However, the recovered set of instruments may not be accurate because of differences in the recovery loops from where the recovery data was taken.

The OnixS::CME::MDH::AdvancedSessionSettings class as part of the Handler's settings exposes the OnixS::CME::MDH::SessionSettings::instrumentRecovery member which lets to define the most preferable way of recovering instrument definitions.

The following code depicts how to tell the Handler to recover instruments quicker than the standard approach:

Handler handler;
(
InstrumentRecoveryOptions::Fast
);
handler.start();
Warning
The Handler joins incremental feed before starting processing instrument recovery data. During the recovery, incremental data is queued by the Handler and replayed upon recovery completion. The given behavior reduces chances to lose changes in the set of available instruments which are sent through the incremental feed.