#[non_exhaustive]pub struct HlPosition {
pub coin: String,
pub size: Decimal,
pub entry_px: Decimal,
pub unrealized_pnl: Decimal,
pub leverage: Decimal,
pub liquidation_px: Option<Decimal>,
}Expand description
A position held on Hyperliquid.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.coin: StringThe coin/asset symbol.
size: DecimalPosition size (negative for short).
entry_px: DecimalAverage entry price.
unrealized_pnl: DecimalUnrealised PnL.
leverage: DecimalLeverage used.
liquidation_px: Option<Decimal>Liquidation price, if applicable.
Implementations§
Trait Implementations§
Source§impl Clone for HlPosition
impl Clone for HlPosition
Source§fn clone(&self) -> HlPosition
fn clone(&self) -> HlPosition
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 HlPosition
impl Debug for HlPosition
Source§impl<'de> Deserialize<'de> for HlPosition
impl<'de> Deserialize<'de> for HlPosition
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 HlPosition
impl PartialEq for HlPosition
Source§impl Serialize for HlPosition
impl Serialize for HlPosition
impl Eq for HlPosition
impl StructuralPartialEq for HlPosition
Auto Trait Implementations§
impl Freeze for HlPosition
impl RefUnwindSafe for HlPosition
impl Send for HlPosition
impl Sync for HlPosition
impl Unpin for HlPosition
impl UnsafeUnpin for HlPosition
impl UnwindSafe for HlPosition
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.