Resolves a new instrument and subscribe to it asynchronously.
Visual Basic |
---|
Public Sub SubscribeNewInstrument( _ ByVal instrument_request As CQGInstrumentSubscriptionRequest _ ) |
- instrument_request
Instrument request object, represented as CQGInstrumentSubscriptionRequest
This method should be used if CQGAPIConfig.NewInstrumentMode is set to True, otherwise use the NewInstrument method.
The method works in asynchronous mode, i.e. the method just triggers the request in the CQGCEL without waiting for its results.
InstrumentResolved event is fired as a result of the method call.
Depricated:
If the symbol is valid, the result will come with the InstrumentSubscribed event.
If the symbol is not valid, the IncorrectSymbol event will be fired.
An exception will be thrown if symbol is empty string.
It is a good practice to cancel the request as soon as it becomes unnecessary. Such approach allows using memory resources more optimal.
Call RemoveInstrument for request cancelling.