/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
namespace QuantConnect.Orders
{
///
/// Error detail code
///
public enum OrderResponseErrorCode
{
///
/// No error (0)
///
None = 0,
///
/// Unknown error (-1)
///
ProcessingError = -1,
///
/// Cannot submit because order already exists (-2)
///
OrderAlreadyExists = -2,
///
/// Not enough money to to submit order (-3)
///
InsufficientBuyingPower = -3,
///
/// Internal logic invalidated submit order (-4)
///
BrokerageModelRefusedToSubmitOrder = -4,
///
/// Brokerage submit error (-5)
///
BrokerageFailedToSubmitOrder = -5,
///
/// Brokerage update error (-6)
///
BrokerageFailedToUpdateOrder = -6,
///
/// Internal logic invalidated update order (-7)
///
BrokerageHandlerRefusedToUpdateOrder = -7,
///
/// Brokerage cancel error (-8)
///
BrokerageFailedToCancelOrder = -8,
///
/// Only pending orders can be canceled (-9)
///
InvalidOrderStatus = -9,
///
/// Missing order (-10)
///
UnableToFindOrder = -10,
///
/// Cannot submit or update orders with zero quantity (-11)
///
OrderQuantityZero = -11,
///
/// This type of request is unsupported (-12)
///
UnsupportedRequestType = -12,
///
/// Unknown error during pre order request validation (-13)
///
PreOrderChecksError = -13,
///
/// Security is missing. Probably did not subscribe (-14)
///
MissingSecurity = -14,
///
/// Some order types require open exchange (-15)
///
ExchangeNotOpen = -15,
///
/// Zero security price is probably due to bad data (-16)
///
SecurityPriceZero = -16,
///
/// Need both currencies in cashbook to trade a pair (-17)
///
ForexBaseAndQuoteCurrenciesRequired = -17,
///
/// Need conversion rate to account currency (-18)
///
ForexConversionRateZero = -18,
///
/// Should not attempt trading without at least one data point (-19)
///
SecurityHasNoData = -19,
///
/// Transaction manager's cache is full (-20)
///
ExceededMaximumOrders = -20,
///
/// Below buffer time for MOC order to be placed before exchange closes. 15.5 minutes by default (-21)
///
MarketOnCloseOrderTooLate = -21,
///
/// Request is invalid or null (-22)
///
InvalidRequest = -22,
///
/// Request was canceled by user (-23)
///
RequestCanceled = -23,
///
/// All orders are invalidated while algorithm is warming up (-24)
///
AlgorithmWarmingUp = -24,
///
/// Internal logic invalidated update order (-25)
///
BrokerageModelRefusedToUpdateOrder = -25,
///
/// Need quote currency in cashbook to trade (-26)
///
QuoteCurrencyRequired = -26,
///
/// Need conversion rate to account currency (-27)
///
ConversionRateZero = -27,
///
/// The order's symbol references a non-tradable security (-28)
///
NonTradableSecurity = -28,
///
/// The order's symbol references a non-exercisable security (-29)
///
NonExercisableSecurity = -29,
///
/// Cannot submit or update orders with quantity that is less than lot size (-30)
///
OrderQuantityLessThanLotSize = -30,
///
/// The order's quantity exceeds the max shortable quantity set by the brokerage (-31)
///
ExceedsShortableQuantity = -31,
///
/// Cannot update/cancel orders with OrderStatus.New (-32)
///
InvalidNewOrderStatus = -32,
///
/// Exercise time before expiry for European options (-33)
///
EuropeanOptionNotExpiredOnExercise = -33,
///
/// Option order is invalid due to underlying stock split (-34)
///
OptionOrderOnStockSplit = -34,
///
/// The Market On Open order was submitted during regular market hours,
/// which is not allowed. This order type must be submitted before the market opens.
///
MarketOnOpenNotAllowedDuringRegularHours = -35
}
}