Working with Books | Table of Content | Threading Model |
Optional Fields |
This section provides information about optional fields supported by ICE since iMpact version 1.1.21.
The mechanism in which new fields are added to the messages has been changed. As ICE continue to add new asset classes to the platform that continue to be supported via the same API interface, there is a need to support optionality for some fields in this message to reduce the impact of the new fields particularly where the new fields have no meaning for a specific product. For backwards compatibility purposes, all existing fields (pre v 1.1.21) will remain unchanged. However, all new fields will follow the format of FieldId|Length|Value. Any new fields will leverage this new mechanism.
In the current implementation all the optional fields represented as references. In order to check if the field present in a underlying message, it is required to test it for null.
public void OnFuturesProductDefinitionReceived(object sender, FuturesProductDefinitionEventArgs args) { if (null != args.AccruedPremiumAmt) { /// do something } }
Represented by FuturesProductDefinitionReceived event with following optional arguments:
Represented by FuturesStrategyDefinitionReceived event with following optional arguments in a collection Legs of a FuturesStrategyDefinitionLeg:
Represented by OptionsStrategyDefinitionReceived event with following optional arguments in a collection Legs of a OptionsStrategyDefinitionLeg:
And in a collection Hedges of a OptionsStrategyDefinitionHedge:
Represented by NewFuturesStrategyDefinitionReceived event with following optional arguments in a collection Legs of a FuturesStrategyDefinitionLeg:
Represented by NewOptionsStrategyDefinitionReceived event with following optional arguments in a collection Legs of a OptionsStrategyDefinitionLeg:
And in a collection Hedges of a OptionsStrategyDefinitionHedge:
Represented by SpecialFieldReceived event with following optional arguments: