OnixS C++ CME Market Data Handler  2.56.0.0
Public Member Functions | List of all members
Handler Class Reference

CME FIX/FAST Market Data Handler. More...

Public Member Functions

 Handler (const HandlerSettings &)
 Constructor.
 
 ~Handler ()
 Destructor.
 
void addSecurityIdFilter (SecurityId filter)
 Add the Security Id filtering value. More...
 
void addSecurityIdFilters (const SecurityIdFilters &filters)
 Add the Security Id filtering values.
 
void removeSecurityIdFilter (SecurityId filter)
 Removes a filter.
 
void removeAllSecurityIdFilters ()
 Removes all filters.
 
void getSecurityIdFilters (SecurityIdFilters *filters) const
 Fills given collection with the registered security id filters.
 
void addSecuritySymbolFilter (const Symbol &)
 Add the Security Symbol filtering value. More...
 
void addSecuritySymbolFilters (const SecuritySymbolFilters &)
 Add the Security Symbol filtering values.
 
void removeSecuritySymbolFilter (const Symbol &)
 Removes a filter.
 
void removeAllSecuritySymbolFilters ()
 Removes all filters.
 
void getSecuritySymbolFilters (SecuritySymbolFilters *) const
 Fills given collection with the registered security id filters.
 
void addSecurityGroupFilter (const std::string &)
 Add the Security Group filtering value. More...
 
void addSecurityGroupFilters (const SecurityGroupFilters &)
 Add the Security Group filtering values.
 
void removeSecurityGroupFilter (const std::string &)
 Removes a filter.
 
void removeAllSecurityGroupFilters ()
 Removes all filters.
 
void getSecurityGroupFilters (SecurityGroupFilters *) const
 Fills given collection with the registered security id filters.
 
void addSecurityDescriptionFilter (const std::string &)
 Add the Security Description filtering value. More...
 
void addSecurityDescriptionFilters (const SecurityDescriptionFilters &)
 Add the Security Description filtering values.
 
void removeSecurityDescriptionFilter (const std::string &)
 Removes a filter.
 
void removeAllSecurityDescriptionFilters ()
 Removes all filters.
 
void getSecurityDescriptionFilters (SecurityDescriptionFilters *) const
 Fills given collection with the registered security id filters.
 
void addSubchannelFilter (SubChannelId subchannel)
 Adds sub-channel id filtering value. More...
 
void addSubchannelFilter (SubchannelFilters &)
 Adds sub-channel ids filtering values. More...
 
void removeSubchannelFilter (SubChannelId subchannel)
 Removes sub-channel id from filtering. More...
 
void removeAllSubchannelFilters ()
 Removes all ids and restores default behavior when all packets are point of interest. More...
 
void getSubchannelFilters (SubchannelFilters *filters) const
 Fills given collection with the registered security id filters.
 
void logDebug (const std::string &message)
 Log a debug message.
 
void logError (const std::string &message)
 Log an error message.
 
void logMessage (const std::string &message)
 Log an information message.
 
void logWarning (const std::string &message)
 Log a warning message.
 
void backupLog ()
 Backs up current log file without stopping the Handler.
 
void registerErrorListener (ErrorListener *listener)
 Registers the error listener. More...
 
void registerWarningListener (WarningListener *listener)
 Registers the warning listener. More...
 
void registerDirectBookChangeListener (DirectBookChangeListener *listener)
 Registers the direct book change listener. More...
 
void registerDirectBookChangeListener (DirectBookChangeListener *listener, const DirectBestBidAskTrackingOptions &bbaTrackingOptions)
 Registers the direct book change listener. More...
 
void registerDirectBookUpdateListener (DirectBookUpdateListener *listener)
 Registers the direct book update listener. More...
 
void registerDirectBookUpdateListener (DirectBookUpdateListener *listener, const DirectBestBidAskTrackingOptions &options)
 Registers the direct book update listener. More...
 
void registerImpliedBookChangeListener (ImpliedBookChangeListener *listener)
 Registers the implied book change listener. More...
 
void registerImpliedBookChangeListener (ImpliedBookChangeListener *listener, const ImpliedBestBidAskTrackingOptions &options)
 Registers the implied book change listener. More...
 
void registerImpliedBookUpdateListener (ImpliedBookUpdateListener *listener)
 Registers the implied book update listener. More...
 
void registerImpliedBookUpdateListener (ImpliedBookUpdateListener *listener, const ImpliedBestBidAskTrackingOptions &options)
 Registers the implied book update listener. More...
 
void registerConsolidatedBookUpdateListener (ConsolidatedBookUpdateListener *listener)
 Registers the consolidated book update listener. More...
 
void registerConsolidatedBookUpdateListener (ConsolidatedBookUpdateListener *listener, const ConsolidatedBestBidAskTrackingOptions &options)
 Registers the consolidated book update listener. More...
 
void registerMessageProcessingListener (MessageProcessingListener *listener)
 Registers the message processing listener. More...
 
void registerNewsListener (NewsListener *listener)
 Registers the news listener. More...
 
void registerSecurityDefinitionListener (SecurityDefinitionListener *listener)
 Registers the security definitions listener. More...
 
void registerStatisticsListener (StatisticsListener *listener)
 Registers the statistics listener. More...
 
void registerSecurityStatusListener (SecurityStatusListener *listener)
 Registers the security status listener. More...
 
void registerTradeListener (TradeListener *listener)
 Registers the trades listener. More...
 
void registerStateChangeListener (HandlerStateChangeListener *listener)
 Registers the Handler state change listener. More...
 
void registerFeedListener (FeedListener *listener)
 Registers market data feed events listener. More...
 
void registerThreadListener (ThreadListener *listener)
 Registers thread events listener. More...
 
void clearInstrumentDefinitionsCache ()
 If security definitions cache is used, cleans it up. More...
 
void getPendingMarketDataInfo (PendingMarketDataInfo &)
 Provides information on incremental market data processing state.
 
bool directBookSnapshot (SecurityId securityId, DirectBookSnapshot &bookSnapshot, MarketDepth maxDepth=MarketDepthTraits::MaxDepth)
 Allows obtaining snapshot of direct book for given security. More...
 
bool impliedBookSnapshot (SecurityId securityId, ImpliedBookSnapshot &bookSnapshot, MarketDepth maxDepth=MarketDepthTraits::MaxDepth)
 Allows obtaining snapshot of implied book for given security. More...
 
bool consolidatedBookSnapshot (SecurityId securityId, ImpliedBookSnapshot &bookSnapshot, MarketDepth maxDepth=MarketDepthTraits::MaxDepth)
 Allows obtaining snapshot of consolidated book for given security. More...
 
void start (HandlerStartupStrategy startupStrategy=HandlerStartupStrategies::LateJoin)
 Starts market data processing. More...
 
void start (const NaturalRefreshOptions &options)
 Starts market data processing in natural refresh. More...
 
void start (const ReplayOptions &options)
 Starts replaying previously logged data.
 
void stop ()
 Stops the Handler.
 

Detailed Description

CME FIX/FAST Market Data Handler.

Member Function Documentation

void addSecurityDescriptionFilter ( const std::string &  )

Add the Security Description filtering value.

Note
The filter is inclusive.
void addSecurityGroupFilter ( const std::string &  )

Add the Security Group filtering value.

Note
The filter is inclusive.
void addSecurityIdFilter ( SecurityId  filter)

Add the Security Id filtering value.

Note
The filter is inclusive.
void addSecuritySymbolFilter ( const Symbol )

Add the Security Symbol filtering value.

Note
The filter is inclusive.
void addSubchannelFilter ( SubChannelId  subchannel)

Adds sub-channel id filtering value.

Note
Adding new value doesn't overwrite previous value. to exclude id from filtering use appropriate remove* member.
void addSubchannelFilter ( SubchannelFilters &  )

Adds sub-channel ids filtering values.

Note
Adding new values doesn't overwrite previous value. to exclude id from filtering use appropriate remove* member.
void clearInstrumentDefinitionsCache ( )

If security definitions cache is used, cleans it up.

The Handler will refresh the cache during next execution.

bool consolidatedBookSnapshot ( SecurityId  securityId,
ImpliedBookSnapshot bookSnapshot,
MarketDepth  maxDepth = MarketDepthTraits::MaxDepth 
)

Allows obtaining snapshot of consolidated book for given security.

Number of levels to be copied is limited by 'maxDepth' parameter. Thus, it's possible to copy only a few levels instead of full book.

Returns
true if book was found for given security.
bool directBookSnapshot ( SecurityId  securityId,
DirectBookSnapshot bookSnapshot,
MarketDepth  maxDepth = MarketDepthTraits::MaxDepth 
)

Allows obtaining snapshot of direct book for given security.

Number of levels to be copied is limited by 'maxDepth' parameter. Thus, it's possible to copy only a few levels instead of full book.

Returns
true if book was found for given security.
bool impliedBookSnapshot ( SecurityId  securityId,
ImpliedBookSnapshot bookSnapshot,
MarketDepth  maxDepth = MarketDepthTraits::MaxDepth 
)

Allows obtaining snapshot of implied book for given security.

Number of levels to be copied is limited by 'maxDepth' parameter. Thus, it's possible to copy only a few levels instead of full book.

Returns
true if book was found for given security.
void registerConsolidatedBookUpdateListener ( ConsolidatedBookUpdateListener listener)

Registers the consolidated book update listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerConsolidatedBookUpdateListener ( ConsolidatedBookUpdateListener listener,
const ConsolidatedBestBidAskTrackingOptions options 
)

Registers the consolidated book update listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerDirectBookChangeListener ( DirectBookChangeListener listener)

Registers the direct book change listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerDirectBookChangeListener ( DirectBookChangeListener listener,
const DirectBestBidAskTrackingOptions bbaTrackingOptions 
)

Registers the direct book change listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerDirectBookUpdateListener ( DirectBookUpdateListener listener)

Registers the direct book update listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerDirectBookUpdateListener ( DirectBookUpdateListener listener,
const DirectBestBidAskTrackingOptions options 
)

Registers the direct book update listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerErrorListener ( ErrorListener listener)

Registers the error listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerFeedListener ( FeedListener listener)

Registers market data feed events listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerImpliedBookChangeListener ( ImpliedBookChangeListener listener)

Registers the implied book change listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerImpliedBookChangeListener ( ImpliedBookChangeListener listener,
const ImpliedBestBidAskTrackingOptions options 
)

Registers the implied book change listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerImpliedBookUpdateListener ( ImpliedBookUpdateListener listener)

Registers the implied book update listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerImpliedBookUpdateListener ( ImpliedBookUpdateListener listener,
const ImpliedBestBidAskTrackingOptions options 
)

Registers the implied book update listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerMessageProcessingListener ( MessageProcessingListener listener)

Registers the message processing listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerNewsListener ( NewsListener listener)

Registers the news listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerSecurityDefinitionListener ( SecurityDefinitionListener listener)

Registers the security definitions listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerSecurityStatusListener ( SecurityStatusListener listener)

Registers the security status listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerStateChangeListener ( HandlerStateChangeListener listener)

Registers the Handler state change listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerStatisticsListener ( StatisticsListener listener)

Registers the statistics listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerThreadListener ( ThreadListener listener)

Registers thread events listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerTradeListener ( TradeListener listener)

Registers the trades listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void registerWarningListener ( WarningListener listener)

Registers the warning listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

void removeAllSubchannelFilters ( )

Removes all ids and restores default behavior when all packets are point of interest.

void removeSubchannelFilter ( SubChannelId  subchannel)

Removes sub-channel id from filtering.

Note
Removing the last value restores default behavior with no filters.

Starts market data processing.

Parameters
startupStrategyidentifies strategy Handler must use to join the market. By default, late joining strategy is used.
void start ( const NaturalRefreshOptions options)

Starts market data processing in natural refresh.

Parameters
optionsSet of options affecting behavior of the Handler while maintaining order books by natural refresh.