The ICE Exchange provides the following types of product definitions:
The product definitions can be received in two ways:
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:
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:
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.
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: