pub enum OrderStatusKind {
ApiPending,
PendingSubmit,
PendingCancel,
PreSubmitted,
Submitted,
ApiCancelled,
Cancelled,
Filled,
Inactive,
}Expand description
The lifecycle state of an order, as reported by TWS.
See the IB OrderStatus reference.
Default is OrderStatusKind::Submitted to match the Action enum’s
pragmatic default; OrderStatus::default callers should overwrite it
before reading.
Variants§
ApiPending
Order has not yet been sent to the IB server, e.g. while waiting for a security definition lookup. Uncommon in practice.
PendingSubmit
Order has been transmitted to the destination but no acknowledgment has been received yet.
PendingCancel
A cancellation request has been sent but the destination has not yet confirmed it. Cancellation is not guaranteed at this point.
PreSubmitted
A simulated order type has been accepted by the IB system and is held pending its election criteria; once met, it is transmitted to the destination.
Submitted
Order has been accepted by the system and is working at the destination.
ApiCancelled
API client requested cancellation after submission but before acknowledgment, producing this transitional state.
Cancelled
Destination has confirmed the order is fully cancelled. Terminal. May also occur if IB or the destination unexpectedly rejects the order.
Filled
Order has been completely filled. Terminal. (Market orders may not always trigger this state.)
Inactive
Order was received but is no longer active because it was rejected or cancelled. Terminal.
Implementations§
Source§impl OrderStatusKind
impl OrderStatusKind
Sourcepub fn is_active(self) -> bool
pub fn is_active(self) -> bool
Order is still working in the market: PreSubmitted, PendingSubmit,
PendingCancel, Submitted.
Note that is_active and
is_terminal together cover 8 of 9 variants —
ApiPending is neither, so do not assume !is_active() ⇒ is_terminal().
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
Order has reached a final state: Filled, Cancelled, ApiCancelled,
Inactive.
Trait Implementations§
Source§impl Clone for OrderStatusKind
impl Clone for OrderStatusKind
Source§fn clone(&self) -> OrderStatusKind
fn clone(&self) -> OrderStatusKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for OrderStatusKind
impl ComposeSchema for OrderStatusKind
Source§impl Debug for OrderStatusKind
impl Debug for OrderStatusKind
Source§impl Default for OrderStatusKind
impl Default for OrderStatusKind
Source§fn default() -> OrderStatusKind
fn default() -> OrderStatusKind
Source§impl<'de> Deserialize<'de> for OrderStatusKind
impl<'de> Deserialize<'de> for OrderStatusKind
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>,
Source§impl Display for OrderStatusKind
impl Display for OrderStatusKind
Source§impl FromStr for OrderStatusKind
impl FromStr for OrderStatusKind
Source§impl PartialEq for OrderStatusKind
impl PartialEq for OrderStatusKind
Source§fn eq(&self, other: &OrderStatusKind) -> bool
fn eq(&self, other: &OrderStatusKind) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for OrderStatusKind
impl Serialize for OrderStatusKind
Source§impl ToSchema for OrderStatusKind
impl ToSchema for OrderStatusKind
impl Copy for OrderStatusKind
impl Eq for OrderStatusKind
impl StructuralPartialEq for OrderStatusKind
Auto Trait Implementations§
impl Freeze for OrderStatusKind
impl RefUnwindSafe for OrderStatusKind
impl Send for OrderStatusKind
impl Sync for OrderStatusKind
impl Unpin for OrderStatusKind
impl UnsafeUnpin for OrderStatusKind
impl UnwindSafe for OrderStatusKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.