pub struct CloseResult {
pub tx_hash: B256,
pub was_maker: bool,
pub was_liquidated: bool,
pub remaining_position_id: Option<U256>,
pub exit_perp_delta: f64,
pub exit_usd_delta: f64,
pub net_usd_delta: f64,
pub funding: f64,
pub utilization_fee: f64,
pub adl: f64,
pub liquidation_fee: f64,
pub net_margin: f64,
}Expand description
Result of closing a position.
Parsed from the PositionClosed event in the transaction receipt.
Fields§
§tx_hash: B256Transaction hash.
was_maker: boolWhether this was a maker position.
was_liquidated: boolWhether the position was liquidated.
remaining_position_id: Option<U256>If the close was partial, the remaining position’s NFT token ID.
None means the position was fully closed.
exit_perp_delta: f64Perp delta at exit (signed).
exit_usd_delta: f64USD delta at exit (signed).
net_usd_delta: f64Net USD delta after settlement.
funding: f64Funding settled at close.
utilization_fee: f64Utilization fee charged.
adl: f64Auto-deleveraging amount.
liquidation_fee: f64Liquidation fee (zero if not liquidated).
net_margin: f64Net margin returned.
Trait Implementations§
Source§impl Clone for CloseResult
impl Clone for CloseResult
Source§fn clone(&self) -> CloseResult
fn clone(&self) -> CloseResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CloseResult
impl Debug for CloseResult
Source§impl<'de> Deserialize<'de> for CloseResult
impl<'de> Deserialize<'de> for CloseResult
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CloseResult
impl PartialEq for CloseResult
Source§impl Serialize for CloseResult
impl Serialize for CloseResult
impl Copy for CloseResult
impl StructuralPartialEq for CloseResult
Auto Trait Implementations§
impl Freeze for CloseResult
impl RefUnwindSafe for CloseResult
impl Send for CloseResult
impl Sync for CloseResult
impl Unpin for CloseResult
impl UnsafeUnpin for CloseResult
impl UnwindSafe for CloseResult
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