Lean  $LEAN_TAG$
DataDownloadConfig.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 
17 using QuantConnect.Util;
20 
22 
23 /// <summary>
24 /// Represents the configuration for downloading data.
25 /// </summary>
27 {
28  /// <summary>
29  /// Gets the type of data download.
30  /// </summary>
31  public override Type DataType { get => LeanData.GetDataType(Resolution, TickType); }
32 
33  /// <summary>
34  /// Initializes a new instance of the <see cref="DataDownloadConfig"/> class.
35  /// </summary>s
37  {
38  TickType = ParseEnum<TickType>(Config.Get(DownloaderCommandArguments.CommandDataType));
39  Resolution = ParseEnum<Resolution>(Config.Get(DownloaderCommandArguments.CommandResolution));
40  }
41 
42  /// <summary>
43  /// Initializes a new instance of the <see cref="DataDownloadConfig"/> class with the specified parameters.
44  /// </summary>
45  /// <param name="tickType">The type of tick data to be downloaded.</param>
46  /// <param name="securityType">The type of security for which data is being downloaded.</param>
47  /// <param name="resolution">The resolution of the data being downloaded.</param>
48  /// <param name="startDate">The start date for the data download range.</param>
49  /// <param name="endDate">The end date for the data download range.</param>
50  /// <param name="marketName">The name of the market from which the data is being downloaded.</param>
51  /// <param name="symbols">A list of symbols for which data is being downloaded.</param>
52  public DataDownloadConfig(TickType tickType, SecurityType securityType, Resolution resolution, DateTime startDate, DateTime endDate, string marketName, List<Symbol> symbols)
53  : base(tickType, securityType, resolution, startDate, endDate, marketName, symbols)
54  { }
55 }