Lean  $LEAN_TAG$
IBrokerageFactory.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 using System.Collections.Generic;
18 using System.ComponentModel.Composition;
20 using QuantConnect.Packets;
22 
24 {
25  /// <summary>
26  /// Defines factory types for brokerages. Every IBrokerage is expected to also implement an IBrokerageFactory.
27  /// </summary>
28  [InheritedExport(typeof(IBrokerageFactory))]
29  public interface IBrokerageFactory : IDisposable
30  {
31  /// <summary>
32  /// Gets the type of brokerage produced by this factory
33  /// </summary>
34  Type BrokerageType { get; }
35 
36  /// <summary>
37  /// Gets the brokerage data required to run the brokerage from configuration/disk
38  /// </summary>
39  /// <remarks>
40  /// The implementation of this property will create the brokerage data dictionary required for
41  /// running live jobs. See <see cref="IJobQueueHandler.NextJob"/>
42  /// </remarks>
43  Dictionary<string, string> BrokerageData { get; }
44 
45  /// <summary>
46  /// Gets a brokerage model that can be used to model this brokerage's unique behaviors
47  /// </summary>
48  /// <param name="orderProvider">The order provider</param>
50 
51  /// <summary>
52  /// Creates a new IBrokerage instance
53  /// </summary>
54  /// <param name="job">The job packet to create the brokerage for</param>
55  /// <param name="algorithm">The algorithm instance</param>
56  /// <returns>A new brokerage instance</returns>
58 
59  /// <summary>
60  /// Gets a brokerage message handler
61  /// </summary>
63  }
64 }