CQG API 4.0 - Revised
SubscribeNewInstrument Method
See Also  Send Feedback
instrument_request

Instrument request object, represented as CQGInstrumentSubscriptionRequest

CQGCEL Interface : SubscribeNewInstrument Method

Glossary Item Box

Description

Resolves a new instrument and subscribe to it asynchronously.

Syntax

Visual Basic
Public Sub SubscribeNewInstrument( _
   ByVal instrument_request As CQGInstrumentSubscriptionRequest _
) 

Parameters

instrument_request

Instrument request object, represented as CQGInstrumentSubscriptionRequest

Remarks

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.

See Also