Instrument search
Some connectors (for example, OpenECry, Interactive Brokers or Sterling) do not support the transfer of all the available on the server instruments to the client (usually this is done to reduce the load on the broker server) after the (IConnector.Connect) establish connection.
To find the instrument you need to call the Connector.Subscribe(StockSharp.Algo.Subscription subscription**)** method. Передаваемая в него подписка должна быть создана на основе SecurityLookupMessage, поля которого используются в качестве фильтра. Например: The subscription passed to it should be based on SecurityLookupMessage, and used as a filter. For example, search criterias:
- The SecurityMessage.SecurityId with specified SecurityId.SecurityCode property sets the instrument or description name mask (for example, «ES» or «e-mini» or «gold») or the exact name (for example, «esh5»).
- The SecurityMessage.SecurityType property sets the instrument type.
- The SecurityMessage.SecurityId with specified SecurityId.BoardCode property sets the board where the instrument trades (for example, ExchangeBoard.Bats or ExchangeBoard.Nasdaq).
Found instruments will be returned through the Connector.NewSecurity event.