OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.17.0
API documentation
Product Definitions

Types of Product Definitions

The ICE Exchange provides following types of product definitions:

  1. Futures/OTC
  2. Options
  3. Options Strategy
  4. Futures Strategy

The product definitions could be received in two ways:

  1. By request (TCP)
  2. During the day (UDP)

The table below describes how the product definitions represented in the OnixS ICE iMpact Multicast Price Feed Handler API:

Product Definition Security Type Callback (TCP) Callback (UDP)
Futures/OTC OnixS::ICE::iMpact::MarketData::SecurityType::Futures OnixS::ICE::iMpact::MarketData::ExchangeListener::onFuturesProductDefinition OnixS::ICE::iMpact::MarketData::ExchangeListener::onNewExpiry
Options OnixS::ICE::iMpact::MarketData::SecurityType::Options OnixS::ICE::iMpact::MarketData::ExchangeListener::onOptionsProductDefinition OnixS::ICE::iMpact::MarketData::ExchangeListener::onNewOptionsMarketDefinition
Options Strategy OnixS::ICE::iMpact::MarketData::SecurityType::UdsOptionsMarkets OnixS::ICE::iMpact::MarketData::ExchangeListener::onOptionsStrategyDefinition OnixS::ICE::iMpact::MarketData::ExchangeListener::onNewOptionsStrategyDefinition
Futures Strategy OnixS::ICE::iMpact::MarketData::SecurityType::UdsFuturesMarkets OnixS::ICE::iMpact::MarketData::ExchangeListener::onFuturesStrategyDefinition OnixS::ICE::iMpact::MarketData::ExchangeListener::onNewFuturesStrategyDefinition

Example

Below is the example of creating subscription for the Futures/OTC of the 'IPE Brent Futures' (5) market type:

MarketSubscription brentFutures(
5, // Market type id for IPE Brent Futures.
SecurityTypes::Futures, // Defines type of securities (Futures/OTC)
BookDepth::TOP5PL // Build and maintain Top5PL book.
);
subscriptions.push_back(brentFutures);

Receive Product Definitions Only

The Handler provides a special mode when it only receives product definitions and then stopped. To activate this mode you need to set OnixS::ICE::iMpact::MarketData::HandlerSettings::receiveProductDefinitionsOnly to true. After this, you can create and start the Handler in the usual way, but the behavior will be different. The Handler establishes a TCP connection to the ICE server, sends a Login request, and according to market subscriptions, sends Product Definition requests. When all the requested product definitions are received, the Handler stops. The Handler's state changes in the following sequence:

  1. Stopped
  2. Started
  3. SecurityDefinitionsRecoveryStarted
  4. SecurityDefinitionsRecoveryFinished
  5. Stopped

This mode is using, if you want to periodically update information about product definitions in your local store and have a simple implementation without tracking the Handler state and calling the OnixS::ICE::iMpact::MarketData::Handler::stop method to stop the Handler.

Store Product Definitions

Product definitions can be stored for future use by associating them with a unique market ID field. When a new product definition is received, the Handler calls a callback. The user code can store a product definition in a local storage for future use.

Example

The following sample demonstrates how product definition can be stored by the appropriate callback:

std::map<MarketId, FuturesProductDefinition> productDefinitions_;
virtual void onFuturesProductDefinition(const FuturesProductDefinition& msg, bool& isInterested)
{
productDefinitions_.emplace(msg.marketId, msg);
}