pub struct GTTCreateParams {
pub gtt_type: GTTTriggerType,
pub condition: GTTCondition,
pub orders: Vec<GTTOrderParams>,
pub expires_at: Option<DateTime<Utc>>,
}
Expand description
GTT creation parameters
Fields§
§gtt_type: GTTTriggerType
GTT type
condition: GTTCondition
Condition
orders: Vec<GTTOrderParams>
Orders to execute when triggered
expires_at: Option<DateTime<Utc>>
Expiry time (optional)
Implementations§
Source§impl GTTCreateParams
impl GTTCreateParams
Sourcepub fn single(condition: GTTCondition, order: GTTOrderParams) -> Self
pub fn single(condition: GTTCondition, order: GTTOrderParams) -> Self
Create a single trigger GTT
Sourcepub fn two_leg(condition: GTTCondition, orders: Vec<GTTOrderParams>) -> Self
pub fn two_leg(condition: GTTCondition, orders: Vec<GTTOrderParams>) -> Self
Create a two-leg (OCO) GTT
Sourcepub fn expires_at(self, expires_at: DateTime<Utc>) -> Self
pub fn expires_at(self, expires_at: DateTime<Utc>) -> Self
Set expiry time
Trait Implementations§
Source§impl Clone for GTTCreateParams
impl Clone for GTTCreateParams
Source§fn clone(&self) -> GTTCreateParams
fn clone(&self) -> GTTCreateParams
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GTTCreateParams
impl Debug for GTTCreateParams
Source§impl<'de> Deserialize<'de> for GTTCreateParams
impl<'de> Deserialize<'de> for GTTCreateParams
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 GTTCreateParams
impl RefUnwindSafe for GTTCreateParams
impl Send for GTTCreateParams
impl Sync for GTTCreateParams
impl Unpin for GTTCreateParams
impl UnwindSafe for GTTCreateParams
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