Lean  $LEAN_TAG$
OrderError.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.ComponentModel;
17 
18 namespace QuantConnect.Orders
19 {
20  /// <summary>
21  /// Specifies the possible error states during presubmission checks
22  /// </summary>
23  public enum OrderError
24  {
25  /// <summary>
26  /// Order has already been filled and cannot be modified (-8)
27  /// </summary>
28  [Description("Order has already been filled and cannot be modified")]
30 
31  /// <summary>
32  /// General error in order (-7)
33  /// </summary>
34  [Description("General error in order")]
35  GeneralError = -7,
36 
37  /// <summary>
38  /// Order timestamp error. Order appears to be executing in the future (-6)
39  /// </summary>
40  [Description("Order timestamp error. Order appears to be executing in the future")]
41  TimestampError = -6,
42 
43  /// <summary>
44  /// Exceeded maximum allowed orders for one analysis period (-5)
45  /// </summary>
46  [Description("Exceeded maximum allowed orders for one analysis period")]
47  MaxOrdersExceeded = -5,
48 
49  /// <summary>
50  /// Insufficient capital to execute order (-4)
51  /// </summary>
52  [Description("Insufficient capital to execute order")]
54 
55  /// <summary>
56  /// Attempting market order outside of market hours (-3)
57  /// </summary>
58  [Description("Attempting market order outside of market hours")]
59  MarketClosed = -3,
60 
61  /// <summary>
62  /// There is no data yet for this security - please wait for data (market order price not available yet) (-2)
63  /// </summary>
64  [Description("There is no data yet for this security - please wait for data (market order price not available yet)")]
65  NoData = -2,
66 
67  /// <summary>
68  /// Order quantity must not be zero (-1)
69  /// </summary>
70  [Description("Order quantity must not be zero")]
71  ZeroQuantity = -1,
72 
73  /// <summary>
74  /// The order is OK (0)
75  /// </summary>
76  [Description("The order is OK")]
77  None = 0
78  }
79 }