pub struct GetPortfolioStatsResponse {Show 14 fields
pub fees_paid: Option<String>,
pub max_drawdown: Option<String>,
pub period: Option<String>,
pub perps_equity: Option<String>,
pub pnl: Option<String>,
pub pnl_breakdown: Option<PnlBreakdown>,
pub spot_equity: Option<String>,
pub total_equity: Option<String>,
pub total_orders: Option<String>,
pub total_pnl: Option<String>,
pub total_trades: Option<String>,
pub unrealized_pnl: Option<String>,
pub volume: Option<String>,
pub win_loss_ratio: Option<f64>,
}Expand description
GetPortfolioStatsResponse
JSON schema
{
"type": "object",
"properties": {
"feesPaid": {
"description": "Total fees paid by user",
"examples": [
"0.12"
],
"type": [
"string",
"null"
]
},
"maxDrawdown": {
"description": "Maximum peak-to-trough drawdown on running PnL",
"examples": [
"0.00"
],
"type": [
"string",
"null"
]
},
"period": {
"description": "Period used for this query",
"examples": [
"30d"
],
"type": [
"string",
"null"
]
},
"perpsEquity": {
"description": "Perpetuals account equity",
"examples": [
"0.00"
],
"type": [
"string",
"null"
]
},
"pnl": {
"description": "Legacy realized PnL over the period, average-cost basis: gains/losses booked only when a position is reduced or closed, net of fees, with funding folded in. Excludes unrealized PnL on open positions. For the full PnL picture use totalPnl and pnlBreakdown, whose components follow the gross-of-fees convention instead.",
"examples": [
"-0.01"
],
"type": [
"string",
"null"
]
},
"pnlBreakdown": {
"$ref": "#/components/schemas/PnlBreakdown"
},
"spotEquity": {
"description": "Spot account equity",
"examples": [
"280.93"
],
"type": [
"string",
"null"
]
},
"totalEquity": {
"description": "Total equity (sum of all balances)",
"examples": [
"280.93"
],
"type": [
"string",
"null"
]
},
"totalOrders": {
"description": "Number of orders in period",
"examples": [
"56"
],
"type": [
"string",
"null"
]
},
"totalPnl": {
"description": "Current lifetime total PnL: realized + unrealized - fundingPaid - fees, with realized components gross of fees. A live value, independent of the period parameter; the addends are in pnlBreakdown.",
"examples": [
"10.11"
],
"type": [
"string",
"null"
]
},
"totalTrades": {
"description": "Number of trades in period",
"examples": [
"42"
],
"type": [
"string",
"null"
]
},
"unrealizedPnl": {
"description": "Current unrealized PnL across open spot holdings (cost basis vs latest close) and open perp positions (entry vs mark). A live value, independent of the period parameter.",
"examples": [
"12.34"
],
"type": [
"string",
"null"
]
},
"volume": {
"description": "Total trade volume (sum of quoteVolume)",
"examples": [
"231.81"
],
"type": [
"string",
"null"
]
},
"winLossRatio": {
"description": "Ratio of profitable trades to total trades",
"examples": [
0.65
],
"type": [
"number",
"null"
],
"format": "double"
}
}
}Fields§
§fees_paid: Option<String>Total fees paid by user
max_drawdown: Option<String>Maximum peak-to-trough drawdown on running PnL
period: Option<String>Period used for this query
perps_equity: Option<String>Perpetuals account equity
pnl: Option<String>Legacy realized PnL over the period, average-cost basis: gains/losses booked only when a position is reduced or closed, net of fees, with funding folded in. Excludes unrealized PnL on open positions. For the full PnL picture use totalPnl and pnlBreakdown, whose components follow the gross-of-fees convention instead.
pnl_breakdown: Option<PnlBreakdown>§spot_equity: Option<String>Spot account equity
total_equity: Option<String>Total equity (sum of all balances)
total_orders: Option<String>Number of orders in period
total_pnl: Option<String>Current lifetime total PnL: realized + unrealized - fundingPaid - fees, with realized components gross of fees. A live value, independent of the period parameter; the addends are in pnlBreakdown.
total_trades: Option<String>Number of trades in period
unrealized_pnl: Option<String>Current unrealized PnL across open spot holdings (cost basis vs latest close) and open perp positions (entry vs mark). A live value, independent of the period parameter.
volume: Option<String>Total trade volume (sum of quoteVolume)
win_loss_ratio: Option<f64>Ratio of profitable trades to total trades
Trait Implementations§
Source§impl Clone for GetPortfolioStatsResponse
impl Clone for GetPortfolioStatsResponse
Source§fn clone(&self) -> GetPortfolioStatsResponse
fn clone(&self) -> GetPortfolioStatsResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more