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
fee: UD64Total fee the fill charged, builder share included.
From contract v1.1.7.5 EVERY fill that changes a position’s size is charged, in either direction: a close or decrease pays on the removed notional at the exit price, netted from the exit proceeds rather than debited, and an inverting order pays on its full lot. Earlier releases charged additions only, so a close fill reports zero there. Liquidation, ADL, force-close, unwind, frozen-account close and buy-to-liquidate stay uncharged at any version.
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. Zero on
liquidation fills and on contracts without builder attribution, and
on close/decrease fills before v1.1.7.5 - 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
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 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
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