Lean  $LEAN_TAG$
QuantConnect.Orders.OrderResponse Class Reference

Represents a response to an OrderRequest. See OrderRequest.Response property for a specific request's response value More...

Public Member Functions

override string ToString ()
 Returns a string that represents the current object. More...
 

Static Public Member Functions

static OrderResponse Success (OrderRequest request)
 Helper method to create a successful response from a request More...
 
static OrderResponse Error (OrderRequest request, OrderResponseErrorCode errorCode, string errorMessage)
 Helper method to create an error response from a request More...
 
static OrderResponse InvalidStatus (OrderRequest request, Order order)
 Helper method to create an error response due to an invalid order status More...
 
static OrderResponse InvalidNewStatus (OrderRequest request, Order order)
 Helper method to create an error response due to the "New" order status More...
 
static OrderResponse UnableToFindOrder (OrderRequest request)
 Helper method to create an error response due to a bad order id More...
 
static OrderResponse ZeroQuantity (OrderRequest request)
 Helper method to create an error response due to a zero order quantity More...
 
static OrderResponse MissingSecurity (SubmitOrderRequest request)
 Helper method to create an error response due to a missing security More...
 
static OrderResponse WarmingUp (OrderRequest request)
 Helper method to create an error response due to algorithm still in warmup mode More...
 

Static Public Attributes

static readonly OrderResponse Unprocessed
 Gets an OrderResponse for a request that has not yet been processed More...
 

Properties

int OrderId [get]
 Gets the order id More...
 
string ErrorMessage [get]
 Gets the error message if the ErrorCode does not equal OrderResponseErrorCode.None, otherwise gets string.Empty More...
 
OrderResponseErrorCode ErrorCode [get]
 Gets the error code for this response. More...
 
bool IsSuccess [get]
 Gets true if this response represents a successful request, false otherwise If this is an unprocessed response, IsSuccess will return false. More...
 
bool IsError [get]
 Gets true if this response represents an error, false otherwise More...
 
bool IsProcessed [get]
 Gets true if this response has been processed, false otherwise More...
 

Detailed Description

Represents a response to an OrderRequest. See OrderRequest.Response property for a specific request's response value

Definition at line 22 of file OrderResponse.cs.

Member Function Documentation

◆ ToString()

override string QuantConnect.Orders.OrderResponse.ToString ( )

Returns a string that represents the current object.

Returns
A string that represents the current object.

<filterpriority>2</filterpriority>

Definition at line 97 of file OrderResponse.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Success()

static OrderResponse QuantConnect.Orders.OrderResponse.Success ( OrderRequest  request)
static

Helper method to create a successful response from a request

Definition at line 113 of file OrderResponse.cs.

Here is the caller graph for this function:

◆ Error()

static OrderResponse QuantConnect.Orders.OrderResponse.Error ( OrderRequest  request,
OrderResponseErrorCode  errorCode,
string  errorMessage 
)
static

Helper method to create an error response from a request

Definition at line 121 of file OrderResponse.cs.

Here is the caller graph for this function:

◆ InvalidStatus()

static OrderResponse QuantConnect.Orders.OrderResponse.InvalidStatus ( OrderRequest  request,
Order  order 
)
static

Helper method to create an error response due to an invalid order status

Definition at line 129 of file OrderResponse.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InvalidNewStatus()

static OrderResponse QuantConnect.Orders.OrderResponse.InvalidNewStatus ( OrderRequest  request,
Order  order 
)
static

Helper method to create an error response due to the "New" order status

Definition at line 137 of file OrderResponse.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UnableToFindOrder()

static OrderResponse QuantConnect.Orders.OrderResponse.UnableToFindOrder ( OrderRequest  request)
static

Helper method to create an error response due to a bad order id

Definition at line 145 of file OrderResponse.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZeroQuantity()

static OrderResponse QuantConnect.Orders.OrderResponse.ZeroQuantity ( OrderRequest  request)
static

Helper method to create an error response due to a zero order quantity

Definition at line 153 of file OrderResponse.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MissingSecurity()

static OrderResponse QuantConnect.Orders.OrderResponse.MissingSecurity ( SubmitOrderRequest  request)
static

Helper method to create an error response due to a missing security

Definition at line 161 of file OrderResponse.cs.

Here is the call graph for this function:

◆ WarmingUp()

static OrderResponse QuantConnect.Orders.OrderResponse.WarmingUp ( OrderRequest  request)
static

Helper method to create an error response due to algorithm still in warmup mode

Definition at line 169 of file OrderResponse.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ Unprocessed

readonly OrderResponse QuantConnect.Orders.OrderResponse.Unprocessed
static
Initial value:
= new OrderResponse(int.MinValue, OrderResponseErrorCode.None,
Messages.OrderResponse.UnprocessedOrderResponseErrorMessage)

Gets an OrderResponse for a request that has not yet been processed

Definition at line 107 of file OrderResponse.cs.

Property Documentation

◆ OrderId

int QuantConnect.Orders.OrderResponse.OrderId
get

Gets the order id

Definition at line 28 of file OrderResponse.cs.

◆ ErrorMessage

string QuantConnect.Orders.OrderResponse.ErrorMessage
get

Gets the error message if the ErrorCode does not equal OrderResponseErrorCode.None, otherwise gets string.Empty

Definition at line 37 of file OrderResponse.cs.

◆ ErrorCode

OrderResponseErrorCode QuantConnect.Orders.OrderResponse.ErrorCode
get

Gets the error code for this response.

Definition at line 45 of file OrderResponse.cs.

◆ IsSuccess

bool QuantConnect.Orders.OrderResponse.IsSuccess
get

Gets true if this response represents a successful request, false otherwise If this is an unprocessed response, IsSuccess will return false.

Definition at line 54 of file OrderResponse.cs.

◆ IsError

bool QuantConnect.Orders.OrderResponse.IsError
get

Gets true if this response represents an error, false otherwise

Definition at line 62 of file OrderResponse.cs.

◆ IsProcessed

bool QuantConnect.Orders.OrderResponse.IsProcessed
get

Gets true if this response has been processed, false otherwise

Definition at line 70 of file OrderResponse.cs.


The documentation for this class was generated from the following file: