pub enum TimeInForce {
Gtc,
Ioc,
Fok,
Gtd(u64),
Day,
}Expand description
Specifies how long an order remains active before it is executed or expires.
Variants§
Gtc
Good ’Til Canceled - The order remains active until it is filled or canceled.
Ioc
Immediate Or Cancel - The order must be filled immediately in its entirety. If the order cannot be filled completely, the unfilled portion is canceled.
Fok
Fill Or Kill - The order must be filled immediately and completely. If the order cannot be filled entirely, the entire order is canceled.
Gtd(u64)
Good ’Til Date - The order remains active until a specified date and time, expressed as a Unix timestamp (seconds since epoch).
Day
Good for the trading Day - The order remains active until the end of the current trading day.
Implementations§
Source§impl TimeInForce
impl TimeInForce
Sourcepub fn is_immediate(&self) -> bool
pub fn is_immediate(&self) -> bool
Returns true if the order should be canceled after attempting to match
Sourcepub fn has_expiry(&self) -> bool
pub fn has_expiry(&self) -> bool
Returns true if the order has a specific expiration time
Trait Implementations§
Source§impl Clone for TimeInForce
impl Clone for TimeInForce
Source§fn clone(&self) -> TimeInForce
fn clone(&self) -> TimeInForce
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more