Struct lfest::Order[][src]

pub struct Order {
    pub id: u64,
    pub timestamp: u64,
    pub order_type: OrderType,
    pub limit_price: f64,
    pub trigger_price: f64,
    pub size: f64,
    pub side: Side,
    pub executed: bool,
}
Expand description

Defines an order

Fields

id: u64

id will be filled in using exchange.submit_order()

timestamp: u64

timestamp will be filled in using exchange.submit_order()

order_type: OrderType

order type

limit_price: f64

the limit order price

trigger_price: f64

the trigger price

size: f64

order size

side: Side

order side

executed: bool

whether or not the order has been marked as executed

Implementations

Create a new limit order Returns an OrderError if either the limit_price or size is invalid

Create a new market order Returns an OrderError if wrong size provided

Create a new stop market order Returns an OrderError if either the trigger_price or size is invalid

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.