Skip to main content

Order

Struct Order 

Source
pub struct Order {
Show 152 fields pub soft_dollar_tier: SoftDollarTier, pub order_id: i32, pub client_id: i32, pub perm_id: i64, pub action: String, pub total_quantity: Decimal, pub order_type: String, pub limit_price: f64, pub aux_price: f64, pub tif: String, pub active_start_time: String, pub active_stop_time: String, pub oca_group: String, pub oca_type: i32, pub order_ref: String, pub transmit: bool, pub parent_id: i32, pub block_order: bool, pub sweep_to_fill: bool, pub display_size: i32, pub trigger_method: i32, pub outside_rth: bool, pub hidden: bool, pub good_after_time: String, pub good_till_date: String, pub rule80a: String, pub all_or_none: bool, pub min_qty: i32, pub percent_offset: f64, pub override_percentage_constraints: bool, pub trail_stop_price: f64, pub trailing_percent: f64, pub fa_group: String, pub fa_method: String, pub fa_percentage: String, pub designated_location: String, pub open_close: String, pub origin: Origin, pub short_sale_slot: i32, pub exempt_code: i32, pub discretionary_amount: f64, pub opt_out_smart_routing: bool, pub auction_strategy: AuctionStrategy, pub starting_price: f64, pub stock_ref_price: f64, pub delta: f64, pub stock_range_lower: f64, pub stock_range_upper: f64, pub randomize_price: bool, pub randomize_size: bool, pub volatility: f64, pub volatility_type: i32, pub delta_neutral_order_type: String, pub delta_neutral_aux_price: f64, pub delta_neutral_con_id: i32, pub delta_neutral_settling_firm: String, pub delta_neutral_clearing_account: String, pub delta_neutral_clearing_intent: String, pub delta_neutral_open_close: String, pub delta_neutral_short_sale: bool, pub delta_neutral_short_sale_slot: i32, pub delta_neutral_designated_location: String, pub continuous_update: bool, pub reference_price_type: i32, pub basis_points: f64, pub basis_points_type: i32, pub scale_init_level_size: i32, pub scale_subs_level_size: i32, pub scale_price_increment: f64, pub scale_price_adjust_value: f64, pub scale_price_adjust_interval: i32, pub scale_profit_offset: f64, pub scale_auto_reset: bool, pub scale_init_position: i32, pub scale_init_fill_qty: i32, pub scale_random_percent: bool, pub scale_table: String, pub hedge_type: String, pub hedge_param: String, pub hedge_max_size: i32, pub account: String, pub settling_firm: String, pub clearing_account: String, pub clearing_intent: String, pub model_code: String, pub algo_strategy: String, pub algo_params: Vec<TagValue>, pub smart_combo_routing_params: Vec<TagValue>, pub algo_id: String, pub what_if: bool, pub not_held: bool, pub solicited: bool, pub order_combo_legs: Vec<OrderComboLeg>, pub order_misc_options: Vec<TagValue>, pub reference_contract_id: i32, pub pegged_change_amount: f64, pub is_pegged_change_amount_decrease: bool, pub reference_change_amount: f64, pub reference_exchange_id: String, pub adjusted_order_type: String, pub trigger_price: f64, pub adjusted_stop_price: f64, pub adjusted_stop_limit_price: f64, pub adjusted_trailing_amount: f64, pub adjustable_trailing_unit: i32, pub limit_price_offset: f64, pub conditions: Vec<OrderCondition>, pub conditions_cancel_order: bool, pub conditions_ignore_rth: bool, pub ext_operator: String, pub cash_qty: f64, pub mifid2_decision_maker: String, pub mifid2_decision_algo: String, pub mifid2_execution_trader: String, pub mifid2_execution_algo: String, pub dont_use_auto_price_for_hedge: bool, pub is_oms_container: bool, pub discretionary_up_to_limit_price: bool, pub auto_cancel_date: String, pub filled_quantity: Decimal, pub ref_futures_con_id: i32, pub auto_cancel_parent: bool, pub shareholder: String, pub imbalance_only: bool, pub route_marketable_to_bbo: i32, pub parent_perm_id: i64, pub use_price_mgmt_algo: i32, pub duration: i32, pub post_to_ats: i32, pub advanced_error_override: String, pub manual_order_time: String, pub min_trade_qty: i32, pub min_compete_size: i32, pub compete_against_best_offset: f64, pub mid_offset_at_whole: f64, pub mid_offset_at_half: f64, pub customer_account: String, pub professional_customer: bool, pub bond_accrued_interest: String, pub include_overnight: bool, pub manual_order_indicator: i32, pub submitter: String, pub post_only: bool, pub allow_pre_open: bool, pub ignore_open_auction: bool, pub deactivate: bool, pub seek_price_improvement: i32, pub what_if_type: i32, pub stop_loss_order_id: i32, pub stop_loss_order_type: String, pub profit_taker_order_id: i32, pub profit_taker_order_type: String,
}
Expand description

TWS order.

Fields§

§soft_dollar_tier: SoftDollarTier

Soft-dollar tier.

§order_id: i32

Order id.

§client_id: i32

Client id.

§perm_id: i64

Permanent id.

§action: String

BUY/SELL.

§total_quantity: Decimal

Total quantity.

§order_type: String

Order type.

§limit_price: f64

Limit price.

§aux_price: f64

Auxiliary price.

§tif: String

Time in force.

§active_start_time: String

Active start time.

§active_stop_time: String

Active stop time.

§oca_group: String

OCA group.

§oca_type: i32

OCA type.

§order_ref: String

Order ref.

§transmit: bool

Transmit flag.

§parent_id: i32

Parent order id.

§block_order: bool

Block order.

§sweep_to_fill: bool

Sweep to fill.

§display_size: i32

Display size.

§trigger_method: i32

Trigger method.

§outside_rth: bool

Outside regular trading hours.

§hidden: bool

Hidden order.

§good_after_time: String

Good-after time.

§good_till_date: String

Good-till date.

§rule80a: String

Rule 80A.

§all_or_none: bool

All-or-none flag.

§min_qty: i32

Minimum quantity.

§percent_offset: f64

Percent offset.

§override_percentage_constraints: bool

Override percentage constraints.

§trail_stop_price: f64

Trail stop price.

§trailing_percent: f64

Trailing percent.

§fa_group: String

Financial-advisor group.

§fa_method: String

Financial-advisor method.

§fa_percentage: String

Financial-advisor percentage.

§designated_location: String

Short-sale designated location.

§open_close: String

Open/close marker.

§origin: Origin

Order origin.

§short_sale_slot: i32

Short-sale slot.

§exempt_code: i32

Exempt code.

§discretionary_amount: f64

Discretionary amount.

§opt_out_smart_routing: bool

Opt out of SMART routing.

§auction_strategy: AuctionStrategy

Auction strategy.

§starting_price: f64

Starting price.

§stock_ref_price: f64

Stock reference price.

§delta: f64

Delta.

§stock_range_lower: f64

Stock range lower.

§stock_range_upper: f64

Stock range upper.

§randomize_price: bool

Randomize price.

§randomize_size: bool

Randomize size.

§volatility: f64

Volatility.

§volatility_type: i32

Volatility type.

§delta_neutral_order_type: String

Delta-neutral order type.

§delta_neutral_aux_price: f64

Delta-neutral auxiliary price.

§delta_neutral_con_id: i32

Delta-neutral contract id.

§delta_neutral_settling_firm: String

Delta-neutral settling firm.

§delta_neutral_clearing_account: String

Delta-neutral clearing account.

§delta_neutral_clearing_intent: String

Delta-neutral clearing intent.

§delta_neutral_open_close: String

Delta-neutral open/close marker.

§delta_neutral_short_sale: bool

Delta-neutral short sale flag.

§delta_neutral_short_sale_slot: i32

Delta-neutral short-sale slot.

§delta_neutral_designated_location: String

Delta-neutral designated location.

§continuous_update: bool

Continuous update flag.

§reference_price_type: i32

Reference price type.

§basis_points: f64

Combo basis points.

§basis_points_type: i32

Combo basis-points type.

§scale_init_level_size: i32

Initial scale level size.

§scale_subs_level_size: i32

Subsequent scale level size.

§scale_price_increment: f64

Scale price increment.

§scale_price_adjust_value: f64

Scale price adjust value.

§scale_price_adjust_interval: i32

Scale price adjust interval.

§scale_profit_offset: f64

Scale profit offset.

§scale_auto_reset: bool

Scale auto-reset flag.

§scale_init_position: i32

Scale initial position.

§scale_init_fill_qty: i32

Scale initial fill quantity.

§scale_random_percent: bool

Scale random percent flag.

§scale_table: String

Scale table.

§hedge_type: String

Hedge type.

§hedge_param: String

Hedge parameter.

§hedge_max_size: i32

Hedge maximum size.

§account: String

Account.

§settling_firm: String

Settling firm.

§clearing_account: String

Clearing account.

§clearing_intent: String

Clearing intent.

§model_code: String

Model code.

§algo_strategy: String

Algo strategy.

§algo_params: Vec<TagValue>

Algo parameters.

§smart_combo_routing_params: Vec<TagValue>

Smart combo routing parameters.

§algo_id: String

Algo id.

§what_if: bool

What-if flag.

§not_held: bool

Not-held flag.

§solicited: bool

Solicited flag.

§order_combo_legs: Vec<OrderComboLeg>

Order combo legs.

§order_misc_options: Vec<TagValue>

Misc options.

§reference_contract_id: i32

Reference contract id.

§pegged_change_amount: f64

Pegged change amount.

§is_pegged_change_amount_decrease: bool

Pegged change amount decrease flag.

§reference_change_amount: f64

Reference change amount.

§reference_exchange_id: String

Reference exchange id.

§adjusted_order_type: String

Adjusted order type.

§trigger_price: f64

Trigger price.

§adjusted_stop_price: f64

Adjusted stop price.

§adjusted_stop_limit_price: f64

Adjusted stop limit price.

§adjusted_trailing_amount: f64

Adjusted trailing amount.

§adjustable_trailing_unit: i32

Adjustable trailing unit.

§limit_price_offset: f64

Limit price offset.

§conditions: Vec<OrderCondition>

Conditions.

§conditions_cancel_order: bool

Cancel if conditions match.

§conditions_ignore_rth: bool

Ignore RTH for conditions.

§ext_operator: String

External operator.

§cash_qty: f64

Native cash quantity.

§mifid2_decision_maker: String

MiFID II decision maker.

§mifid2_decision_algo: String

MiFID II decision algo.

§mifid2_execution_trader: String

MiFID II execution trader.

§mifid2_execution_algo: String

MiFID II execution algo.

§dont_use_auto_price_for_hedge: bool

Do not use auto price for hedge.

§is_oms_container: bool

OMS container flag.

§discretionary_up_to_limit_price: bool

Discretionary up-to-limit price flag.

§auto_cancel_date: String

Auto-cancel date.

§filled_quantity: Decimal

Filled quantity.

§ref_futures_con_id: i32

Reference futures contract id.

§auto_cancel_parent: bool

Auto-cancel parent flag.

§shareholder: String

Shareholder.

§imbalance_only: bool

Imbalance only flag.

§route_marketable_to_bbo: i32

Route marketable order to BBO.

§parent_perm_id: i64

Parent permanent id.

§use_price_mgmt_algo: i32

Use price-management algo.

§duration: i32

Duration.

§post_to_ats: i32

Post to ATS.

§advanced_error_override: String

Advanced error override.

§manual_order_time: String

Manual order time.

§min_trade_qty: i32

Minimum trade quantity.

§min_compete_size: i32

Minimum compete size.

§compete_against_best_offset: f64

Compete against best offset.

§mid_offset_at_whole: f64

Mid offset at whole.

§mid_offset_at_half: f64

Mid offset at half.

§customer_account: String

Customer account.

§professional_customer: bool

Professional customer flag.

§bond_accrued_interest: String

Bond accrued interest.

§include_overnight: bool

Include overnight flag.

§manual_order_indicator: i32

Manual order indicator.

§submitter: String

Submitter.

§post_only: bool

Post-only flag.

§allow_pre_open: bool

Allow pre-open flag.

§ignore_open_auction: bool

Ignore open auction flag.

§deactivate: bool

Deactivate flag.

§seek_price_improvement: i32

Seek price improvement.

§what_if_type: i32

What-if type.

§stop_loss_order_id: i32

Stop-loss attached order id.

§stop_loss_order_type: String

Stop-loss attached order type.

§profit_taker_order_id: i32

Profit-taker attached order id.

§profit_taker_order_type: String

Profit-taker attached order type.

Trait Implementations§

Source§

impl Clone for Order

Source§

fn clone(&self) -> Order

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Order

Source§

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

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

impl Default for Order

Source§

fn default() -> Self

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

impl PartialEq for Order

Source§

fn eq(&self, other: &Order) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Order

Auto Trait Implementations§

§

impl Freeze for Order

§

impl RefUnwindSafe for Order

§

impl Send for Order

§

impl Sync for Order

§

impl Unpin for Order

§

impl UnsafeUnpin for Order

§

impl UnwindSafe for Order

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> 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.