pub struct PositionPnlPoint {
pub bucket_start: Option<String>,
pub cum_fees: Option<String>,
pub cum_funding_paid: Option<String>,
pub cum_realized_pnl: Option<String>,
pub entry_price: Option<String>,
pub mark_price: Option<String>,
pub quantity: Option<String>,
pub unrealized_pnl: Option<String>,
}Expand description
One PnL state sample for a position in one bucket. Cumulative fields are lifetime values as of the bucket; fundingPaid and fees are cost-positive.
JSON schema
{
"description": "One PnL state sample for a position in one bucket. Cumulative fields are\n lifetime values as of the bucket; fundingPaid and fees are cost-positive.",
"type": "object",
"properties": {
"bucketStart": {
"description": "Bucket start timestamp (ISO 8601)",
"examples": [
"2026-02-18T00:00:00Z"
],
"type": [
"string",
"null"
]
},
"cumFees": {
"description": "Cumulative trading fees; positive means charged, negative means rebated",
"examples": [
"1.75"
],
"type": [
"string",
"null"
]
},
"cumFundingPaid": {
"description": "Cumulative funding paid; positive means paid, negative means received",
"examples": [
"3.20"
],
"type": [
"string",
"null"
]
},
"cumRealizedPnl": {
"description": "Cumulative realized PnL, gross of fees",
"examples": [
"120.00"
],
"type": [
"string",
"null"
]
},
"entryPrice": {
"description": "Average entry price",
"examples": [
"95000.00"
],
"type": [
"string",
"null"
]
},
"markPrice": {
"description": "Mark price at the sample",
"examples": [
"95410.25"
],
"type": [
"string",
"null"
]
},
"quantity": {
"description": "Signed position quantity (negative for shorts)",
"examples": [
"1.50"
],
"type": [
"string",
"null"
]
},
"unrealizedPnl": {
"description": "Unrealized PnL at the sample: quantity x (mark - entry)",
"examples": [
"615.38"
],
"type": [
"string",
"null"
]
}
}
}Fields§
§bucket_start: Option<String>Bucket start timestamp (ISO 8601)
cum_fees: Option<String>Cumulative trading fees; positive means charged, negative means rebated
cum_funding_paid: Option<String>Cumulative funding paid; positive means paid, negative means received
cum_realized_pnl: Option<String>Cumulative realized PnL, gross of fees
entry_price: Option<String>Average entry price
mark_price: Option<String>Mark price at the sample
quantity: Option<String>Signed position quantity (negative for shorts)
unrealized_pnl: Option<String>Unrealized PnL at the sample: quantity x (mark - entry)
Trait Implementations§
Source§impl Clone for PositionPnlPoint
impl Clone for PositionPnlPoint
Source§fn clone(&self) -> PositionPnlPoint
fn clone(&self) -> PositionPnlPoint
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 PositionPnlPoint
impl Debug for PositionPnlPoint
Source§impl Default for PositionPnlPoint
impl Default for PositionPnlPoint
Source§impl<'de> Deserialize<'de> for PositionPnlPoint
impl<'de> Deserialize<'de> for PositionPnlPoint
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 PositionPnlPoint
impl RefUnwindSafe for PositionPnlPoint
impl Send for PositionPnlPoint
impl Sync for PositionPnlPoint
impl Unpin for PositionPnlPoint
impl UnsafeUnpin for PositionPnlPoint
impl UnwindSafe for PositionPnlPoint
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