Lean  $LEAN_TAG$
IDataQueueUniverseProvider.cs
1 /*
2  * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3  * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14 */
15 
16 using System.Collections.Generic;
17 
19 {
20  /// <summary>
21  /// This interface allows interested parties to lookup or enumerate the available symbols. Data source exposes it if this feature is available.
22  /// Availability of a symbol doesn't imply that it is possible to trade it. This is a data source specific interface, not broker specific.
23  /// </summary>
24  public interface IDataQueueUniverseProvider
25  {
26  /// <summary>
27  /// Method returns a collection of Symbols that are available at the data source.
28  /// </summary>
29  /// <param name="symbol">Symbol to lookup</param>
30  /// <param name="includeExpired">Include expired contracts</param>
31  /// <param name="securityCurrency">Expected security currency(if any)</param>
32  /// <returns>Enumerable of Symbols, that are associated with the provided Symbol</returns>
33  IEnumerable<Symbol> LookupSymbols(Symbol symbol, bool includeExpired, string securityCurrency = null);
34 
35  /// <summary>
36  /// Returns whether selection can take place or not.
37  /// </summary>
38  /// <remarks>This is useful to avoid a selection taking place during invalid times, for example IB reset times or when not connected,
39  /// because if allowed selection would fail since IB isn't running and would kill the algorithm</remarks>
40  /// <returns>True if selection can take place</returns>
41  bool CanPerformSelection();
42  }
43 }