/// <summary> /// Отправить запрос на получение списка инструментов по заданному фильтру. /// </summary> /// <param name="requestId">Идентификатор запроса.</param> /// <param name="searchField">Поле, по которому необходимо искать данные.</param> /// <param name="searchText">Строка поиска.</param> /// <param name="filterType">Тип фильтра.</param> /// <param name="filterValue">Значения фильтра.</param> public void RequestSecurities(long requestId, IQFeedSearchField searchField, string searchText, IQFeedFilterType filterType, params string[] filterValue) { //Symbols By Filter - A symbol search by symbol or description. Can be filtered by providing a list of Listed Markets or Security Types. //SBF,[Field To Search],[Search String],[Filter Type],[Filter Value],[RequestID]<CR><LF> // [Field To Search] - "s" to search symbols. "d" to search descriptions. // [Search String] - What you want to search for. // [Filter Type] - "e" to search within specific Listed Markets. "t" to search within specific Security Types. // [Filter Value] - A space delimited list of listed markets or security types (based upon the Filter Type parameter). // NOTE: A list of security types or listed marekts can be retrieved dynamicly from the server using the SLM and SST requests below. // [RequestID] - This parameter allows you to specify an identier that will be attached to the returned data inserted as the FIRST field in the output message. var request = "SBF,{0},{1},{2},{3},{4}" .Put( (searchField == IQFeedSearchField.Symbol) ? "s" : "d", searchText, (filterType == IQFeedFilterType.Market) ? "e" : "t", filterValue.Join(" "), ToIQFeedId(requestId)); Request(request); }
/// <summary> /// To send the request for the list of instruments by the specified filter. /// </summary> /// <param name="requestId">Request identifier.</param> /// <param name="searchField">The field by which you need to search for data.</param> /// <param name="searchText">The search string.</param> /// <param name="filterType">Filter type.</param> /// <param name="filterValue">Filter value.</param> public void RequestSecurities(long requestId, IQFeedSearchField searchField, string searchText, IQFeedFilterType filterType, params string[] filterValue) { //Symbols By Filter - A symbol search by symbol or description. Can be filtered by providing a list of Listed Markets or Security Types. //SBF,[Field To Search],[Search String],[Filter Type],[Filter Value],[RequestID]<CR><LF> // [Field To Search] - "s" to search symbols. "d" to search descriptions. // [Search String] - What you want to search for. // [Filter Type] - "e" to search within specific Listed Markets. "t" to search within specific Security Types. // [Filter Value] - A space delimited list of listed markets or security types (based upon the Filter Type parameter). // NOTE: A list of security types or listed marekts can be retrieved dynamicly from the server using the SLM and SST requests below. // [RequestID] - This parameter allows you to specify an identier that will be attached to the returned data inserted as the FIRST field in the output message. var request = "SBF,{0},{1},{2},{3},{4}" .Put( (searchField == IQFeedSearchField.Symbol) ? "s" : "d", searchText, (filterType == IQFeedFilterType.Market) ? "e" : "t", filterValue.Join(" "), ToIQFeedId(requestId)); Request(request); }