Skip to main content

Execution

Struct Execution 

Source
pub struct Execution {
Show 18 fields pub order_id: i32, pub client_id: i32, pub execution_id: String, pub time: String, pub account_number: String, pub exchange: String, pub side: String, pub shares: f64, pub price: f64, pub perm_id: i32, pub liquidation: i32, pub cumulative_quantity: f64, pub average_price: f64, pub order_reference: String, pub ev_rule: String, pub ev_multiplier: Option<f64>, pub model_code: String, pub last_liquidity: Liquidity,
}
Expand description

Describes an order’s execution.

Fields§

§order_id: i32

The API client’s order Id. May not be unique to an account.

§client_id: i32

The API client identifier which placed the order which originated this execution.

§execution_id: String

The execution’s identifier. Each partial fill has a separate ExecId. A correction is indicated by an ExecId which differs from a previous ExecId in only the digits after the final period, e.g. an ExecId ending in “.02” would be a correction of a previous execution with an ExecId ending in “.01”

§time: String

The execution’s server time.

§account_number: String

The account to which the order was allocated.

§exchange: String

The exchange where the execution took place.

§side: String

Specifies if the transaction was buy or sale BOT for bought, SLD for sold

§shares: f64

The number of shares filled.

§price: f64

The order’s execution price excluding commissions.

§perm_id: i32

The TWS order identifier. The PermId can be 0 for trades originating outside IB.

§liquidation: i32

Identifies whether an execution occurred because of an IB-initiated liquidation.

§cumulative_quantity: f64

Cumulative quantity.

§average_price: f64

Average price. Used in regular trades, combo trades and legs of the combo. Does not include commissions.

§order_reference: String

The OrderRef is a user-customizable string that can be set from the API or TWS and will be associated with an order for its lifetime.

§ev_rule: String

The Economic Value Rule name and the respective optional argument. The two values should be separated by a colon. For example, aussieBond:YearsToExpiration=3. When the optional argument is not present, the first value will be followed by a colon.

§ev_multiplier: Option<f64>

Tells you approximately how much the market value of a contract would change if the price were to change by 1. It cannot be used to get market value by multiplying the price by the approximate multiplier.

§model_code: String

model code

§last_liquidity: Liquidity

Liquidity type of the execution (requires TWS 968+ / API v973.05+).

Trait Implementations§

Source§

impl Clone for Execution

Source§

fn clone(&self) -> Execution

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Execution

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Execution

Source§

fn default() -> Execution

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.