pub struct Position {
pub coin: String,
pub szi: Dec,
pub leverage: Leverage,
pub entry_px: Option<Dec>,
pub position_value: Dec,
pub unrealized_pnl: Dec,
pub return_on_equity: Option<Dec>,
pub liquidation_px: Option<Dec>,
pub margin_used: Dec,
pub max_leverage: u32,
pub cum_funding: Option<CumFunding>,
}Expand description
One position.
Fields§
§coin: StringBTC on the main dex, xyz:XYZ100 on a HIP-3 one.
szi: DecSigned: negative is short.
leverage: Leverage§entry_px: Option<Dec>The average entry; null on a listed position of size zero.
position_value: DecThe size at the mark, positive either way.
unrealized_pnl: Dec§return_on_equity: Option<Dec>The unrealized profit over the margin at entry; not always sent.
liquidation_px: Option<Dec>null where no move of the price liquidates it.
margin_used: Dec§max_leverage: u32The most this account may take on this coin now.
cum_funding: Option<CumFunding>Funding on the position; not always sent.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Position
impl<'de> Deserialize<'de> for Position
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
impl Eq for Position
impl StructuralPartialEq for Position
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.