OnixS ICE iMpact Multicast Price Feed Handler C++ library 8.18.0
Users' manual and API documentation
Loading...
Searching...
No Matches
Product Definitions

Types of Product Definitions

The ICE Exchange provides the following types of product definitions:

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

The product definitions can be received in two ways:

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

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

Product Definition Security Type Callback (TCP) Callback (UDP)
Futures/OTC Futures onFuturesProductDefinition onNewExpiry
Options Options onOptionsProductDefinition onNewOptionsMarketDefinition
Options Strategy UdsOptionsMarkets onOptionsStrategyDefinition onNewOptionsStrategyDefinition
Futures Strategy UdsFuturesMarkets onFuturesStrategyDefinition onNewFuturesStrategyDefinition

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

MarketSubscription brentFutures(
// Market type id for IPE Brent Futures.
// Non-implied market functionality
// Defines type of securities (Futures/OTC)
// Build and maintain the Top5PL book.
MarketSubscriptions subscriptions;
subscriptions.insert(brentFutures);

Receive Product Definitions Only

The Handler provides a special mode when it only receives product definitions and then stops. To activate this mode, you need to set HandlerSettings::receiveProductDefinitionsOnly to true. After this, you can create and start the Handler as usual, but the behavior will differ. 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. HandlerStates::Stopped
  2. HandlerStates::Started
  3. HandlerStates::SecurityDefinitionsRecoveryStarted
  4. HandlerStates::SecurityDefinitionsRecoveryFinished
  5. HandlerStates::Stopped

This mode is used if you want to periodically update product definition information in your local store and have a simple implementation that avoids tracking the Handler state and calling the 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 local storage for future use.

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

class Dummy : public ExchangeListener
{
std::map<MarketId, FuturesProductDefinition> productDefinitions;
public:
void onFuturesProductDefinition(const FuturesProductDefinition& msg,
bool& isInterested) override
{
productDefinitions.emplace(msg.marketId, msg);
}
};