pub struct Position { /* private fields */ }Expand description
Open perpetual contract position.
Implementations§
Source§impl Position
impl Position
Sourcepub fn instant(&self) -> StateInstant
pub fn instant(&self) -> StateInstant
Instant the position state is consistent with or was last updated at.
Sourcepub fn perpetual_id(&self) -> PerpetualId
pub fn perpetual_id(&self) -> PerpetualId
ID of the perpetual contract.
Sourcepub fn account_id(&self) -> AccountId
pub fn account_id(&self) -> AccountId
ID of the account holding the position.
Sourcepub fn type(&self) -> PositionType
pub fn type(&self) -> PositionType
Type of the position.
Sourcepub fn entry_price(&self) -> UD64
pub fn entry_price(&self) -> UD64
Position entry price, full precision - including 16 bit rounding residue
Unrealized Premium PnL of the position.
Sourcepub fn maintenance_margin_requirement(&self) -> UD128
pub fn maintenance_margin_requirement(&self) -> UD128
Maintenance margin requirement of the position.
Sourcepub fn liquidation_price(&self) -> UD64
pub fn liquidation_price(&self) -> UD64
Liquidation price of the position.
Sourcepub fn bankruptcy_price(&self) -> UD64
pub fn bankruptcy_price(&self) -> UD64
Bankruptcy price of the position.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnsafeUnpin for Position
impl UnwindSafe for Position
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