Skip to content

OrderRequest

QuantConnect.Orders.OrderRequest

OrderRequest(
    time: Union[datetime, date], order_id: int, tag: str
)

Bases: Object

Represents a request to submit, update, or cancel an order

Initializes a new instance of the OrderRequest class

This codeEntityType is protected.

Parameters:

Name Type Description Default
time Union[datetime, date]

The time this request was created

required
order_id int

The order id this request acts on, specify zero for SubmitOrderRequest

required
tag str

A custom tag for the request

required

order_request_type

order_request_type: OrderRequestType

Gets the type of this order request

status

Gets the status of this request

time

time: datetime

Gets the UTC time the request was created

order_id

order_id: int

Gets the order id the request acts on

tag

tag: str

Gets a tag for this request

response

response: OrderResponse

Gets the response for this request. If this request was never processed then this will equal OrderResponse.UNPROCESSED. This value is never equal to null.

set_response

set_response(
    response: OrderResponse,
    status: OrderRequestStatus = ...,
) -> None

Sets the response for this request

Parameters:

Name Type Description Default
response OrderResponse

The response to this request

required
status OrderRequestStatus

The current status of this request

...

to_string

to_string() -> str

Returns a string that represents the current object.

Returns:

Type Description
str

A string that represents the current object.