pub struct SafetyLimits {Show 15 fields
pub max_trade_value_usd: f64,
pub max_shares_per_order: f64,
pub allow_market_orders: bool,
pub allow_limit_orders: bool,
pub allow_short_sales: bool,
pub allow_option_orders: bool,
pub allow_complex_orders: bool,
pub allow_conditional_orders: bool,
pub max_legs_per_order: u32,
pub allowed_complex_strategies: Vec<String>,
pub allowed_instructions: Vec<String>,
pub allowed_order_types: Vec<String>,
pub allowed_symbols: Vec<String>,
pub blocked_symbols: Vec<String>,
pub max_trade_pct_of_equity: f64,
}Fields§
§max_trade_value_usd: f64Maximum estimated notional (USD) for a single order.
Maximum shares (or contracts) per order leg.
allow_market_orders: boolAllow MARKET orders.
allow_limit_orders: boolAllow LIMIT orders.
allow_short_sales: boolAllow short-sale instructions (SELL_SHORT, etc.).
allow_option_orders: boolAllow non-equity asset types (OPTION, etc.).
allow_complex_orders: boolAllow multi-leg / complex orders (spreads, iron condors, etc.).
allow_conditional_orders: boolAllow conditional orders (OCO, TRIGGER, etc.).
max_legs_per_order: u32Max legs per order (complex spreads).
allowed_complex_strategies: Vec<String>If non-empty, only these complexOrderStrategyType values are allowed.
allowed_instructions: Vec<String>Permitted instructions (e.g. BUY, SELL). Empty = none allowed.
allowed_order_types: Vec<String>Permitted order types (e.g. MARKET, LIMIT). Empty = none allowed.
allowed_symbols: Vec<String>If non-empty, only these symbols may be traded (uppercase).
blocked_symbols: Vec<String>Symbols that may never be traded (uppercase).
max_trade_pct_of_equity: f64Max estimated order value as % of account equity (0 = disabled).
Trait Implementations§
Source§impl Clone for SafetyLimits
impl Clone for SafetyLimits
Source§fn clone(&self) -> SafetyLimits
fn clone(&self) -> SafetyLimits
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SafetyLimits
impl Debug for SafetyLimits
Source§impl Default for SafetyLimits
impl Default for SafetyLimits
Source§impl<'de> Deserialize<'de> for SafetyLimitswhere
SafetyLimits: Default,
impl<'de> Deserialize<'de> for SafetyLimitswhere
SafetyLimits: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SafetyLimits
impl RefUnwindSafe for SafetyLimits
impl Send for SafetyLimits
impl Sync for SafetyLimits
impl Unpin for SafetyLimits
impl UnsafeUnpin for SafetyLimits
impl UnwindSafe for SafetyLimits
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more