pub struct ExecutionInfo {
pub execution_venue: ExecutionVenue,
pub exchange_symbol: Option<String>,
pub tick_size: TickSize,
pub step_size: Decimal,
pub min_order_quantity: Decimal,
pub min_order_quantity_unit: MinOrderQuantityUnit,
pub is_delisted: bool,
pub initial_margin: Option<Decimal>,
pub maintenance_margin: Option<Decimal>,
}Expand description
Information about a symbol related to its execution route.
Fields§
§execution_venue: ExecutionVenue§exchange_symbol: Option<String>If the execution venue has stable symbology, this may be populated
tick_size: TickSize§step_size: Decimal§min_order_quantity: Decimal§min_order_quantity_unit: MinOrderQuantityUnit§is_delisted: bool§initial_margin: Option<Decimal>§maintenance_margin: Option<Decimal>Implementations§
Source§impl ExecutionInfo
impl ExecutionInfo
Sourcepub fn min_quantity_in_base_units(
&self,
price: Option<Decimal>,
) -> Option<Decimal>
pub fn min_quantity_in_base_units( &self, price: Option<Decimal>, ) -> Option<Decimal>
Calculate the minimum quantity in base units When min_order_quantity_unit is Quote, converts using the provided price Returns Decimal::ZERO if price is needed but not provided or is zero
Sourcepub fn round_quantity(&self, quantity: Decimal) -> Decimal
pub fn round_quantity(&self, quantity: Decimal) -> Decimal
Round quantity to the nearest valid step size without checking minimum
Sourcepub fn round_quantity_up(&self, quantity: Decimal) -> Decimal
pub fn round_quantity_up(&self, quantity: Decimal) -> Decimal
Round quantity up to the next valid step size without respecting minimum order quantity
Sourcepub fn round_quantity_down(&self, quantity: Decimal) -> Decimal
pub fn round_quantity_down(&self, quantity: Decimal) -> Decimal
Round quantity down to the previous valid step size without respecting minimum order quantity
Trait Implementations§
Source§impl Clone for ExecutionInfo
impl Clone for ExecutionInfo
Source§fn clone(&self) -> ExecutionInfo
fn clone(&self) -> ExecutionInfo
Returns a duplicate of the value. Read more
1.0.0 · 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 ExecutionInfo
impl Debug for ExecutionInfo
Source§impl<'de> Deserialize<'de> for ExecutionInfo
impl<'de> Deserialize<'de> for ExecutionInfo
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
Source§impl JsonSchema for ExecutionInfo
impl JsonSchema for ExecutionInfo
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ExecutionInfo
impl RefUnwindSafe for ExecutionInfo
impl Send for ExecutionInfo
impl Sync for ExecutionInfo
impl Unpin for ExecutionInfo
impl UnwindSafe for ExecutionInfo
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