pub enum OrderEventType {
Filled {
fill_price: UD64,
fill_size: UD64,
fee: UD64,
builder_fee: UD64,
is_maker: bool,
},
Placed {
type: OrderType,
price: UD64,
size: UD64,
expiry_block: u64,
leverage: UD64,
post_only: bool,
fill_or_kill: bool,
immediate_or_cancel: bool,
},
Removed,
Updated {
price: Option<UD64>,
size: Option<UD64>,
expiry_block: Option<u64>,
},
}Expand description
Type of order event with corresponding details.
Variants§
Filled
Order filled.
For maker orders this event is paired with OrderEventType::Updated
or OrderEventType::Removed.
Fields
§
builder_fee: UD64Portion of fee earned by the builder the order is attributed to,
routed entirely to the protocol balance and paid out off-chain.
Included in fee, so consumers must not add it on top. Always zero
on close/decrease and liquidation fills, and on contracts without
builder attribution - a non-zero
OrderEvent::builder does not imply a non-zero fee here.
Placed
Order placed to the book.
Fields
Removed
Order removed from the book.
Updated
Order in the book updated.
Trait Implementations§
Source§impl Clone for OrderEventType
impl Clone for OrderEventType
Source§fn clone(&self) -> OrderEventType
fn clone(&self) -> OrderEventType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OrderEventType
Auto Trait Implementations§
impl Freeze for OrderEventType
impl RefUnwindSafe for OrderEventType
impl Send for OrderEventType
impl Sync for OrderEventType
impl Unpin for OrderEventType
impl UnsafeUnpin for OrderEventType
impl UnwindSafe for OrderEventType
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
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> ⓘ
Converts
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> ⓘ
Converts
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