#[repr(C)]pub enum OrderStatus {
Show 15 variants
Initialized = 1,
Denied = 2,
Emulated = 3,
Released = 4,
Submitted = 5,
Accepted = 6,
Rejected = 7,
Canceled = 8,
Expired = 9,
Triggered = 10,
PendingUpdate = 11,
PendingCancel = 12,
PartiallyFilled = 13,
Filled = 14,
Voided = 15,
}Expand description
The status for a specific order.
An order is considered open for the following status:
ACCEPTEDTRIGGEREDPENDING_UPDATEPENDING_CANCELPARTIALLY_FILLED
An order is considered in-flight for the following status:
SUBMITTEDPENDING_UPDATEPENDING_CANCEL
An order is considered closed for the following status:
DENIEDREJECTEDCANCELEDEXPIREDFILLEDVOIDED
Variants§
Initialized = 1
The order is initialized (instantiated) within the Nautilus system.
Denied = 2
The order was denied by the Nautilus system, either for being invalid, unprocessable, or exceeding a risk limit.
Emulated = 3
The order became emulated by the Nautilus system in the OrderEmulator component.
Released = 4
The order was released by the Nautilus system from the OrderEmulator component.
Submitted = 5
The order was submitted by the Nautilus system to the external service or trading venue (awaiting acknowledgement).
Accepted = 6
The order was acknowledged by the trading venue as being received and valid (may now be working).
Rejected = 7
The order was rejected by the trading venue.
Canceled = 8
The order was canceled (closed/done).
Expired = 9
The order reached a GTD expiration (closed/done).
Triggered = 10
The order STOP price was triggered on a trading venue.
PendingUpdate = 11
The order is currently pending a request to modify on a trading venue.
PendingCancel = 12
The order is currently pending a request to cancel on a trading venue.
PartiallyFilled = 13
The order has been partially filled on a trading venue.
Filled = 14
The order has been completely filled on a trading venue (closed/done).
Voided = 15
The order is terminal after an authoritative venue void or fill correction.
Implementations§
Source§impl OrderStatus
impl OrderStatus
Source§impl OrderStatus
impl OrderStatus
Sourcepub const fn is_open(self) -> bool
pub const fn is_open(self) -> bool
Returns whether the order status represents an open/working order.
Sourcepub const fn is_closed(self) -> bool
pub const fn is_closed(self) -> bool
Returns whether the order status represents a terminal (closed) state.
Sourcepub const fn is_cancellable(self) -> bool
pub const fn is_cancellable(self) -> bool
Returns whether the order can be cancelled from this status.
Source§impl OrderStatus
impl OrderStatus
Sourcepub fn transition(&mut self, event: &OrderEventAny) -> Result<Self, OrderError>
pub fn transition(&mut self, event: &OrderEventAny) -> Result<Self, OrderError>
Transitions the order state machine based on the given event.
§Errors
Returns an error if the state transition is invalid from the current status.
Trait Implementations§
Source§impl AsRef<str> for OrderStatus
impl AsRef<str> for OrderStatus
Source§impl Clone for OrderStatus
impl Clone for OrderStatus
Source§fn clone(&self) -> OrderStatus
fn clone(&self) -> OrderStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OrderStatus
Source§impl Debug for OrderStatus
impl Debug for OrderStatus
Source§impl<'de> Deserialize<'de> for OrderStatus
impl<'de> Deserialize<'de> for OrderStatus
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 OrderStatus
impl Display for OrderStatus
impl Eq for OrderStatus
Source§impl FromStr for OrderStatus
impl FromStr for OrderStatus
Source§impl Hash for OrderStatus
impl Hash for OrderStatus
Source§impl IntoEnumIterator for OrderStatus
impl IntoEnumIterator for OrderStatus
type Iterator = OrderStatusIter
fn iter() -> OrderStatusIter ⓘ
Source§impl Ord for OrderStatus
impl Ord for OrderStatus
Source§fn cmp(&self, other: &OrderStatus) -> Ordering
fn cmp(&self, other: &OrderStatus) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for OrderStatus
impl PartialEq for OrderStatus
Source§impl PartialOrd for OrderStatus
impl PartialOrd for OrderStatus
Source§impl Serialize for OrderStatus
impl Serialize for OrderStatus
impl StructuralPartialEq for OrderStatus
Auto Trait Implementations§
impl Freeze for OrderStatus
impl RefUnwindSafe for OrderStatus
impl Send for OrderStatus
impl Sync for OrderStatus
impl Unpin for OrderStatus
impl UnsafeUnpin for OrderStatus
impl UnwindSafe for OrderStatus
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.