pub struct PnlBreakdown {
pub fees: Option<String>,
pub funding_paid: Option<String>,
pub perps_realized: Option<String>,
pub perps_unrealized: Option<String>,
pub spot_realized: Option<String>,
pub spot_unrealized: Option<String>,
}Expand description
Lifetime PnL components for the authenticated user. The fields satisfy totalPnl = (spotRealized + perpsRealized) + (spotUnrealized + perpsUnrealized) - fundingPaid - fees.
JSON schema
{
"description": "Lifetime PnL components for the authenticated user. The fields satisfy\n totalPnl = (spotRealized + perpsRealized) + (spotUnrealized + perpsUnrealized) - fundingPaid - fees.",
"type": "object",
"properties": {
"fees": {
"description": "Cumulative trading fees; positive means charged, negative means rebated. Subtracted in totalPnl.",
"examples": [
"1.15"
],
"type": [
"string",
"null"
]
},
"fundingPaid": {
"description": "Cumulative funding paid; positive means paid, negative means received (same sign convention as the funding-payments endpoint). Subtracted in totalPnl.",
"examples": [
"0.50"
],
"type": [
"string",
"null"
]
},
"perpsRealized": {
"description": "Cumulative realized perps PnL, gross of fees",
"examples": [
"5.55"
],
"type": [
"string",
"null"
]
},
"perpsUnrealized": {
"description": "Unrealized PnL on open perp positions: quantity x (mark - entry)",
"examples": [
"2.00"
],
"type": [
"string",
"null"
]
},
"spotRealized": {
"description": "Cumulative realized spot PnL, average-cost basis, gross of fees; withdrawals realize at fair value",
"examples": [
"3.21"
],
"type": [
"string",
"null"
]
},
"spotUnrealized": {
"description": "Unrealized PnL on current spot holdings: quantity x (latest close - average cost)",
"examples": [
"1.00"
],
"type": [
"string",
"null"
]
}
}
}Fields§
§fees: Option<String>Cumulative trading fees; positive means charged, negative means rebated. Subtracted in totalPnl.
funding_paid: Option<String>Cumulative funding paid; positive means paid, negative means received (same sign convention as the funding-payments endpoint). Subtracted in totalPnl.
perps_realized: Option<String>Cumulative realized perps PnL, gross of fees
perps_unrealized: Option<String>Unrealized PnL on open perp positions: quantity x (mark - entry)
spot_realized: Option<String>Cumulative realized spot PnL, average-cost basis, gross of fees; withdrawals realize at fair value
spot_unrealized: Option<String>Unrealized PnL on current spot holdings: quantity x (latest close - average cost)
Trait Implementations§
Source§impl Clone for PnlBreakdown
impl Clone for PnlBreakdown
Source§fn clone(&self) -> PnlBreakdown
fn clone(&self) -> PnlBreakdown
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 PnlBreakdown
impl Debug for PnlBreakdown
Source§impl Default for PnlBreakdown
impl Default for PnlBreakdown
Source§impl<'de> Deserialize<'de> for PnlBreakdown
impl<'de> Deserialize<'de> for PnlBreakdown
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
Auto Trait Implementations§
impl Freeze for PnlBreakdown
impl RefUnwindSafe for PnlBreakdown
impl Send for PnlBreakdown
impl Sync for PnlBreakdown
impl Unpin for PnlBreakdown
impl UnsafeUnpin for PnlBreakdown
impl UnwindSafe for PnlBreakdown
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