pub struct BookOrder { /* private fields */ }Expand description
Individual order in the book with linked list pointers.
Each order belongs to a doubly-linked list at its price level, enabling O(1) insertion/removal and natural FIFO ordering.
Implementations§
Methods from Deref<Target = Order>§
Sourcepub fn instant(&self) -> StateInstant
pub fn instant(&self) -> StateInstant
Instant the order state is consistent with or was last updated at.
Sourcepub fn request_id(&self) -> Option<RequestId>
pub fn request_id(&self) -> Option<RequestId>
ID of the request this order was posted or updated by. Available only from real-time events, not from the initial snapshot.
Sourcepub fn client_order_id(&self) -> Option<RequestId>
pub fn client_order_id(&self) -> Option<RequestId>
Client order ID = ID of the request this order was placed by. Available only from real-time events, not from the initial snapshot.
Sourcepub fn account_id(&self) -> AccountId
pub fn account_id(&self) -> AccountId
ID of the account issued the order.
Sourcepub fn placed_size(&self) -> Option<UD64>
pub fn placed_size(&self) -> Option<UD64>
Size of the order that was placed. Available only from real-time events, not from the initial snapshot.
Sourcepub fn filled_size(&self) -> Option<UD64>
pub fn filled_size(&self) -> Option<UD64>
Filled size of the order. Available only from real-time events, not from the initial snapshot.
Sourcepub fn expiry_block(&self) -> u64
pub fn expiry_block(&self) -> u64
Expiry block of the order, zero if was not specified.
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check if the order is expired. NOTE: Valid only after the end of expiry block processing.
Sourcepub fn post_only(&self) -> Option<bool>
pub fn post_only(&self) -> Option<bool>
Post-only flag. Available only from real-time events, not from the initial snapshot.
Sourcepub fn fill_or_kill(&self) -> Option<bool>
pub fn fill_or_kill(&self) -> Option<bool>
Fill-or-fill flag. Available only from real-time events, not from the initial snapshot.
Sourcepub fn immediate_or_cancel(&self) -> Option<bool>
pub fn immediate_or_cancel(&self) -> Option<bool>
Immediate-or-cancel flag. Available only from real-time events, not from the initial snapshot.
Sourcepub fn builder(&self) -> Option<BuilderAttribution>
pub fn builder(&self) -> Option<BuilderAttribution>
Builder the order is attributed to, along with the additive fee rate
that builder charges on the size the order adds. None means no
builder.
Unlike the flags above, attribution is persisted with the resting order
on-chain, so it is available both from the initial snapshot (contract
v1.1.7.4+, via getOrderV2) and from the OrderRequestV2 event stream.
What a builder actually earned per fill is reported by the builder_fee
of super::OrderEventType::Filled.
Sourcepub fn prev_order_id(&self) -> Option<OrderId>
pub fn prev_order_id(&self) -> Option<OrderId>
Previous order ID in the FIFO queue at this price level. Available from snapshot, None for newly placed orders or if this is the first order.
Sourcepub fn next_order_id(&self) -> Option<OrderId>
pub fn next_order_id(&self) -> Option<OrderId>
Next order ID in the FIFO queue at this price level. Available from snapshot, None for newly placed orders or if this is the last order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BookOrder
impl RefUnwindSafe for BookOrder
impl Send for BookOrder
impl Sync for BookOrder
impl Unpin for BookOrder
impl UnsafeUnpin for BookOrder
impl UnwindSafe for BookOrder
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more