pub struct PortfolioPosition {
pub wallet_address: WalletAddress,
pub symbol: String,
pub amount: Decimal,
pub entry_price: Decimal,
pub margin_posted: Decimal,
pub realized_pnl: Decimal,
pub unrealized_pnl: Decimal,
pub notional_value: Decimal,
pub maintenance_margin: Decimal,
pub liquidation_price: Option<Decimal>,
pub margin_ratio: Decimal,
}Expand description
Position information in portfolio response.
Fields§
§wallet_address: WalletAddressWallet address
symbol: StringOption symbol (e.g., “BTC-20260115-100000-C”)
amount: DecimalPosition size in contracts (positive = long, negative = short)
entry_price: DecimalAverage entry price
margin_posted: DecimalStandalone diagnostic before expiry-group relief in Standard Margin. Not additive portfolio attribution; use margin_summary.standard_margin.
realized_pnl: DecimalRealized profit/loss from closed positions
unrealized_pnl: DecimalUnrealized profit/loss from mark-to-market
notional_value: DecimalNotional value of position
maintenance_margin: DecimalRequired maintenance margin (deprecated, use portfolio-level margin)
liquidation_price: Option<Decimal>Display liquidation estimate; None for Standard options because risk is grouped.
margin_ratio: DecimalCurrent margin ratio
Trait Implementations§
Source§impl Clone for PortfolioPosition
impl Clone for PortfolioPosition
Source§fn clone(&self) -> PortfolioPosition
fn clone(&self) -> PortfolioPosition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PortfolioPosition
impl Debug for PortfolioPosition
Source§impl<'de> Deserialize<'de> for PortfolioPosition
impl<'de> Deserialize<'de> for PortfolioPosition
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PortfolioPosition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PortfolioPosition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PortfolioPosition
impl Serialize for PortfolioPosition
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Forget for PortfolioPosition
impl Freeze for PortfolioPosition
impl Move for PortfolioPosition
impl RefUnwindSafe for PortfolioPosition
impl Send for PortfolioPosition
impl Sync for PortfolioPosition
impl Unpin for PortfolioPosition
impl UnsafeUnpin for PortfolioPosition
impl UnwindSafe for PortfolioPosition
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<'de, T> BorrowedRpcObject<'de> for T
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<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