Lean
$LEAN_TAG$
LiveNodePacket.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
Newtonsoft.Json;
18
using
System.Collections.Generic;
19
using
QuantConnect
.
Notifications
;
20
21
namespace
QuantConnect.Packets
22
{
23
/// <summary>
24
/// Live job task packet: container for any live specific job variables
25
/// </summary>
26
public
class
LiveNodePacket
:
AlgorithmNodePacket
27
{
28
/// <summary>
29
/// Deploy Id for this live algorithm.
30
/// </summary>
31
public
string
DeployId
{
get
;
set
; } =
string
.Empty;
32
33
/// <summary>
34
/// String name of the brokerage we're trading with
35
/// </summary>
36
public
string
Brokerage
{
get
;
set
; } =
string
.Empty;
37
38
/// <summary>
39
/// String-String Dictionary of Brokerage Data for this Live Job
40
/// </summary>
41
public
Dictionary<string, string>
BrokerageData
{
get
;
set
; } =
new
Dictionary<string, string>();
42
43
/// <summary>
44
/// String name of the DataQueueHandler or LiveDataProvider we're running with
45
/// </summary>
46
public
string
DataQueueHandler
{
get
;
set
; } =
string
.Empty;
47
48
/// <summary>
49
/// String name of the DataChannelProvider we're running with
50
/// </summary>
51
public
string
DataChannelProvider
{
get
;
set
; } =
string
.Empty;
52
53
/// <summary>
54
/// Gets flag indicating whether or not the message should be acknowledged and removed from the queue
55
/// </summary>
56
public
bool
DisableAcknowledgement
{
get
;
set
; }
57
58
/// <summary>
59
/// A list of event types to generate notifications for, which will use <see cref="NotificationTargets"/>
60
/// </summary>
61
public
HashSet<string>
NotificationEvents
{
get
;
set
; }
62
63
/// <summary>
64
/// A list of notification targets to use
65
/// </summary>
66
public
List<Notification>
NotificationTargets
{
get
;
set
; }
67
68
/// <summary>
69
/// List of real time data types available in the live trading environment
70
/// </summary>
71
public
HashSet<string>
LiveDataTypes
{
get
;
set
; }
72
73
/// <summary>
74
/// Algorithm running mode.
75
/// </summary>
76
[JsonIgnore]
77
public
override
AlgorithmMode
AlgorithmMode
78
{
79
get
80
{
81
return
AlgorithmMode
.Live;
82
}
83
}
84
85
/// <summary>
86
/// Default constructor for JSON of the Live Task Packet
87
/// </summary>
88
public
LiveNodePacket
()
89
: base(
PacketType
.LiveNode)
90
{
91
Controls
=
new
Controls
92
{
93
MinuteLimit = 100,
94
SecondLimit = 50,
95
TickLimit = 25,
96
RamAllocation
= 512
97
};
98
}
99
}
100
}
Common
Packets
LiveNodePacket.cs
Generated by
1.8.17