Lean  $LEAN_TAG$
ISymbolMapper.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;
17 
19 {
20  /// <summary>
21  /// Provides the mapping between Lean symbols and brokerage specific symbols.
22  /// </summary>
23  public interface ISymbolMapper
24  {
25  /// <summary>
26  /// Converts a Lean symbol instance to a brokerage symbol
27  /// </summary>
28  /// <param name="symbol">A Lean symbol instance</param>
29  /// <returns>The brokerage symbol</returns>
30  string GetBrokerageSymbol(Symbol symbol);
31 
32  /// <summary>
33  /// Converts a brokerage symbol to a Lean symbol instance
34  /// </summary>
35  /// <param name="brokerageSymbol">The brokerage symbol</param>
36  /// <param name="securityType">The security type</param>
37  /// <param name="market">The market</param>
38  /// <param name="expirationDate">Expiration date of the security(if applicable)</param>
39  /// <param name="strike">The strike of the security (if applicable)</param>
40  /// <param name="optionRight">The option right of the security (if applicable)</param>
41  /// <returns>A new Lean Symbol instance</returns>
42  Symbol GetLeanSymbol(string brokerageSymbol, SecurityType securityType, string market, DateTime expirationDate = default(DateTime), decimal strike = 0, OptionRight optionRight = 0);
43  }
44 }