Lean  $LEAN_TAG$
QuantConnect.Orders.OrderEvent Class Reference

Order Event - Messaging class signifying a change in an order state and record the change in the user's algorithm portfolio More...

Public Member Functions

 OrderEvent ()
 Order Event empty constructor required for json converter More...
 
 OrderEvent (int orderId, Symbol symbol, DateTime utcTime, OrderStatus status, OrderDirection direction, decimal fillPrice, decimal fillQuantity, OrderFee orderFee, string message="")
 Order Event Constructor. More...
 
 OrderEvent (Order order, DateTime utcTime, OrderFee orderFee, string message="")
 Helper Constructor using Order to Initialize. More...
 
override string ToString ()
 Returns a string that represents the current object. More...
 
string ShortToString ()
 Returns a short string that represents the current object. More...
 
OrderEvent Clone ()
 Returns a clone of the current object. More...
 

Static Public Member Functions

static OrderEvent FromSerialized (SerializedOrderEvent serializedOrderEvent)
 Creates a new instance based on the provided serialized order event More...
 

Public Attributes

decimal AbsoluteFillQuantity => Math.Abs(FillQuantity)
 Public Property Absolute Getter of Quantity -Filled More...
 

Properties

int OrderId [get, set]
 Id of the order this event comes from. More...
 
int Id [get, set]
 The unique order event id for each order More...
 
Symbol Symbol [get, set]
 Easy access to the order symbol associated with this event. More...
 
DateTime UtcTime [get, set]
 The date and time of this event (UTC). More...
 
OrderStatus Status [get, set]
 Status message of the order. More...
 
OrderFee OrderFee [get, set]
 The fee associated with the order More...
 
decimal FillPrice [get, set]
 Fill price information about the order More...
 
string FillPriceCurrency [get, set]
 Currency for the fill price More...
 
decimal FillQuantity [get, set]
 Number of shares of the order that was filled in this event. More...
 
OrderDirection Direction [get, set]
 Order direction. More...
 
string Message [get, set]
 Any message from the exchange. More...
 
bool IsAssignment [get, set]
 True if the order event is an assignment More...
 
decimal? StopPrice [get, set]
 The current stop price More...
 
decimal? TriggerPrice [get, set]
 The current trigger price More...
 
decimal? LimitPrice [get, set]
 The current limit price More...
 
decimal Quantity [get, set]
 The current order quantity More...
 
bool IsInTheMoney [get, set]
 True if the order event's option is In-The-Money (ITM) More...
 
decimal? TrailingAmount [get, set]
 The trailing stop amount More...
 
bool? TrailingAsPercentage [get, set]
 Whether the TrailingAmount is a percentage or an absolute currency value More...
 
OrderTicket Ticket [get, set]
 The order ticket associated to the order More...
 

Detailed Description

Order Event - Messaging class signifying a change in an order state and record the change in the user's algorithm portfolio

Definition at line 30 of file OrderEvent.cs.

Constructor & Destructor Documentation

◆ OrderEvent() [1/3]

QuantConnect.Orders.OrderEvent.OrderEvent ( )

Order Event empty constructor required for json converter

Definition at line 239 of file OrderEvent.cs.

Here is the caller graph for this function:

◆ OrderEvent() [2/3]

QuantConnect.Orders.OrderEvent.OrderEvent ( int  orderId,
Symbol  symbol,
DateTime  utcTime,
OrderStatus  status,
OrderDirection  direction,
decimal  fillPrice,
decimal  fillQuantity,
OrderFee  orderFee,
string  message = "" 
)

Order Event Constructor.

Parameters
orderIdId of the parent order
symbolAsset Symbol
utcTimeDate/time of this event
statusStatus of the order
directionThe direction of the order this event belongs to
fillPriceFill price information if applicable.
fillQuantityFill quantity
orderFeeThe order fee
messageMessage from the exchange

Definition at line 255 of file OrderEvent.cs.

◆ OrderEvent() [3/3]

QuantConnect.Orders.OrderEvent.OrderEvent ( Order  order,
DateTime  utcTime,
OrderFee  orderFee,
string  message = "" 
)

Helper Constructor using Order to Initialize.

Parameters
orderOrder for this order status
utcTimeDate/time of this event
orderFeeThe order fee
messageMessage from exchange or QC.

Definition at line 286 of file OrderEvent.cs.

Member Function Documentation

◆ ToString()

override string QuantConnect.Orders.OrderEvent.ToString ( )

Returns a string that represents the current object.

Returns
A string that represents the current object.

<filterpriority>2</filterpriority>

Definition at line 312 of file OrderEvent.cs.

Here is the call graph for this function:

◆ ShortToString()

string QuantConnect.Orders.OrderEvent.ShortToString ( )

Returns a short string that represents the current object.

Definition at line 320 of file OrderEvent.cs.

Here is the call graph for this function:

◆ Clone()

OrderEvent QuantConnect.Orders.OrderEvent.Clone ( )

Returns a clone of the current object.

Returns
The new clone object

Definition at line 329 of file OrderEvent.cs.

Here is the caller graph for this function:

◆ FromSerialized()

static OrderEvent QuantConnect.Orders.OrderEvent.FromSerialized ( SerializedOrderEvent  serializedOrderEvent)
static

Creates a new instance based on the provided serialized order event

Definition at line 337 of file OrderEvent.cs.

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

Member Data Documentation

◆ AbsoluteFillQuantity

decimal QuantConnect.Orders.OrderEvent.AbsoluteFillQuantity => Math.Abs(FillQuantity)

Public Property Absolute Getter of Quantity -Filled

Definition at line 107 of file OrderEvent.cs.

Property Documentation

◆ OrderId

int QuantConnect.Orders.OrderEvent.OrderId
getset

Id of the order this event comes from.

Definition at line 45 of file OrderEvent.cs.

◆ Id

int QuantConnect.Orders.OrderEvent.Id
getset

The unique order event id for each order

Definition at line 51 of file OrderEvent.cs.

◆ Symbol

Symbol QuantConnect.Orders.OrderEvent.Symbol
getset

Easy access to the order symbol associated with this event.

Definition at line 57 of file OrderEvent.cs.

◆ UtcTime

DateTime QuantConnect.Orders.OrderEvent.UtcTime
getset

The date and time of this event (UTC).

Definition at line 63 of file OrderEvent.cs.

◆ Status

OrderStatus QuantConnect.Orders.OrderEvent.Status
getset

Status message of the order.

Definition at line 69 of file OrderEvent.cs.

◆ OrderFee

OrderFee QuantConnect.Orders.OrderEvent.OrderFee
getset

The fee associated with the order

Definition at line 75 of file OrderEvent.cs.

◆ FillPrice

decimal QuantConnect.Orders.OrderEvent.FillPrice
getset

Fill price information about the order

Definition at line 82 of file OrderEvent.cs.

◆ FillPriceCurrency

string QuantConnect.Orders.OrderEvent.FillPriceCurrency
getset

Currency for the fill price

Definition at line 91 of file OrderEvent.cs.

◆ FillQuantity

decimal QuantConnect.Orders.OrderEvent.FillQuantity
getset

Number of shares of the order that was filled in this event.

Definition at line 98 of file OrderEvent.cs.

◆ Direction

OrderDirection QuantConnect.Orders.OrderEvent.Direction
getset

Order direction.

Definition at line 113 of file OrderEvent.cs.

◆ Message

string QuantConnect.Orders.OrderEvent.Message
getset

Any message from the exchange.

Definition at line 120 of file OrderEvent.cs.

◆ IsAssignment

bool QuantConnect.Orders.OrderEvent.IsAssignment
getset

True if the order event is an assignment

Definition at line 126 of file OrderEvent.cs.

◆ StopPrice

decimal? QuantConnect.Orders.OrderEvent.StopPrice
getset

The current stop price

Definition at line 134 of file OrderEvent.cs.

◆ TriggerPrice

decimal? QuantConnect.Orders.OrderEvent.TriggerPrice
getset

The current trigger price

Definition at line 151 of file OrderEvent.cs.

◆ LimitPrice

decimal? QuantConnect.Orders.OrderEvent.LimitPrice
getset

The current limit price

Definition at line 168 of file OrderEvent.cs.

◆ Quantity

decimal QuantConnect.Orders.OrderEvent.Quantity
getset

The current order quantity

Definition at line 184 of file OrderEvent.cs.

◆ IsInTheMoney

bool QuantConnect.Orders.OrderEvent.IsInTheMoney
getset

True if the order event's option is In-The-Money (ITM)

Definition at line 194 of file OrderEvent.cs.

◆ TrailingAmount

decimal? QuantConnect.Orders.OrderEvent.TrailingAmount
getset

The trailing stop amount

Definition at line 202 of file OrderEvent.cs.

◆ TrailingAsPercentage

bool? QuantConnect.Orders.OrderEvent.TrailingAsPercentage
getset

Whether the TrailingAmount is a percentage or an absolute currency value

Definition at line 219 of file OrderEvent.cs.

◆ Ticket

OrderTicket QuantConnect.Orders.OrderEvent.Ticket
getset

The order ticket associated to the order

Definition at line 234 of file OrderEvent.cs.


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