pub struct HyperliquidPositionData {
pub asset: String,
pub position: Decimal,
pub entry_px: Option<Decimal>,
pub unrealized_pnl: Decimal,
pub cumulative_funding: Option<Decimal>,
pub position_value: Decimal,
}Expand description
Raw position data from Hyperliquid API for parsing position status reports.
This struct is used only for parsing API responses and converting to Nautilus PositionStatusReport events. The actual position tracking is handled by the Nautilus platform, not the adapter.
See Hyperliquid API documentation:
Fields§
§asset: String§position: Decimal§entry_px: Option<Decimal>§unrealized_pnl: Decimal§cumulative_funding: Option<Decimal>§position_value: DecimalImplementations§
Trait Implementations§
Source§impl Clone for HyperliquidPositionData
impl Clone for HyperliquidPositionData
Source§fn clone(&self) -> HyperliquidPositionData
fn clone(&self) -> HyperliquidPositionData
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 moreAuto Trait Implementations§
impl Freeze for HyperliquidPositionData
impl RefUnwindSafe for HyperliquidPositionData
impl Send for HyperliquidPositionData
impl Sync for HyperliquidPositionData
impl Unpin for HyperliquidPositionData
impl UnsafeUnpin for HyperliquidPositionData
impl UnwindSafe for HyperliquidPositionData
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