Requests a list of instrument names corresponding to the specified commodity.
Visual Basic |
---|
Public Sub RequestCommodityInstruments( _ ByVal commodity_name As String, _ ByVal instrument_types As eInstrumentType, _ Optional ByVal tradable_only As Boolean = False _ ) |
- commodity_name
- commodity symbol name
- instrument_types
Value Description itAllInstruments Represents all instrument types. itAllOptions Represents Option Call and Option Put instrument types. itFuture Represents Futures instrument type. itOptionCall Represents Option Call instrument type. itOptionPut Represents Option Put instrument type. itOther Represents other (not explicitly listed in the enumeration) instrument types, such as cash, indices, currencies, reports etc. itStock Represents Stock instrument type. itSyntheticStrategy Represents synthetic strategy instrument type. itTreasure Represents Treasury instrument type. itUndefined Undefined type. Instrument type bitmask represented as eInstrumentType.
This parameter can include any combination of the instrument types. Its value controls the contents of the collection returned by the CommodityInstrumentsResolved Event.
- tradable_only
If set to False, all instrument names corresponding to the given instrumentTypes filter will be resolved.
If set to True, only tradable instrument names corresponding to the given instrumentTypes filter will be resolved.
The default value for this parameter is False.
This method works in asynchronous mode, i.e. the method just triggers the request in the CQGCEL without waiting for its results. The result will come with the CommodityInstrumentsResolved event.
See the usage of the RequestCommodityInstruments method in CommodityInstrumentsResolved Example.