pub struct PnlDetailSummary {Show 16 fields
pub avg_profit_per_trade_in_usd: String,
pub buy_amount_in_usd: String,
pub buys: String,
pub current_value: String,
pub losses: String,
pub realized_profit_in_usd: String,
pub realized_profit_ratio: String,
pub sell_amount_in_usd: String,
pub sells: String,
pub tokens: String,
pub total_cost_in_usd: String,
pub total_profit_in_usd: String,
pub total_trades: String,
pub unrealized_profit_in_usd: String,
pub win_rate: String,
pub wins: String,
}Expand description
Aggregated PnL summary across all items (mirrors TS PnlDetailSummaryDTO).
JSON schema
{
"description": "Aggregated PnL summary across all items (mirrors TS PnlDetailSummaryDTO).",
"type": "object",
"required": [
"avgProfitPerTradeInUsd",
"buyAmountInUsd",
"buys",
"currentValue",
"losses",
"realizedProfitInUsd",
"realizedProfitRatio",
"sellAmountInUsd",
"sells",
"tokens",
"totalCostInUsd",
"totalProfitInUsd",
"totalTrades",
"unrealizedProfitInUsd",
"winRate",
"wins"
],
"properties": {
"avgProfitPerTradeInUsd": {
"description": "Average profit per trade in USD",
"examples": [
"3206068.5728287027967835484926836364"
],
"type": "string"
},
"buyAmountInUsd": {
"description": "Total buy amount in USD",
"examples": [
"48469.1690094067802589"
],
"type": "string"
},
"buys": {
"description": "Total buy trades",
"examples": [
"275"
],
"type": "string"
},
"currentValue": {
"description": "Current total holding value in USD",
"examples": [
"1062513957.429816153652557077014"
],
"type": "string"
},
"losses": {
"description": "Number of losing trades",
"examples": [
"69"
],
"type": "string"
},
"realizedProfitInUsd": {
"description": "Total realized profit in USD",
"examples": [
"67.1297848453256596"
],
"type": "string"
},
"realizedProfitRatio": {
"description": "Total realized profit ratio",
"examples": [
"0.0013849997063555447320269173"
],
"type": "string"
},
"sellAmountInUsd": {
"description": "Total sell amount in USD",
"examples": [
"6467.3243671310312402"
],
"type": "string"
},
"sells": {
"description": "Total sell trades",
"examples": [
"110"
],
"type": "string"
},
"tokens": {
"description": "Total number of traded tokens",
"examples": [
"1"
],
"type": "string"
},
"totalCostInUsd": {
"description": "Total cost basis in USD",
"examples": [
"48469.1690094067802589"
],
"type": "string"
},
"totalProfitInUsd": {
"description": "Total profit in USD",
"examples": [
"1234336400.5390505767616661696832"
],
"type": "string"
},
"totalTrades": {
"description": "Total number of trades",
"examples": [
"385"
],
"type": "string"
},
"unrealizedProfitInUsd": {
"description": "Total unrealized profit in USD",
"examples": [
"1234336333.4092657314360065696832"
],
"type": "string"
},
"winRate": {
"description": "Win rate ratio",
"examples": [
"0.5688"
],
"type": "string"
},
"wins": {
"description": "Number of profitable trades",
"examples": [
"91"
],
"type": "string"
}
}
}Fields§
§avg_profit_per_trade_in_usd: StringAverage profit per trade in USD
buy_amount_in_usd: StringTotal buy amount in USD
buys: StringTotal buy trades
current_value: StringCurrent total holding value in USD
losses: StringNumber of losing trades
realized_profit_in_usd: StringTotal realized profit in USD
realized_profit_ratio: StringTotal realized profit ratio
sell_amount_in_usd: StringTotal sell amount in USD
sells: StringTotal sell trades
tokens: StringTotal number of traded tokens
total_cost_in_usd: StringTotal cost basis in USD
total_profit_in_usd: StringTotal profit in USD
total_trades: StringTotal number of trades
unrealized_profit_in_usd: StringTotal unrealized profit in USD
win_rate: StringWin rate ratio
wins: StringNumber of profitable trades
Implementations§
Source§impl PnlDetailSummary
impl PnlDetailSummary
pub fn builder() -> PnlDetailSummary
Trait Implementations§
Source§impl Clone for PnlDetailSummary
impl Clone for PnlDetailSummary
Source§fn clone(&self) -> PnlDetailSummary
fn clone(&self) -> PnlDetailSummary
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 PnlDetailSummary
impl Debug for PnlDetailSummary
Source§impl<'de> Deserialize<'de> for PnlDetailSummary
impl<'de> Deserialize<'de> for PnlDetailSummary
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
Source§impl From<&PnlDetailSummary> for PnlDetailSummary
impl From<&PnlDetailSummary> for PnlDetailSummary
Source§fn from(value: &PnlDetailSummary) -> Self
fn from(value: &PnlDetailSummary) -> Self
Converts to this type from the input type.
Source§impl From<PnlDetailSummary> for PnlDetailSummary
impl From<PnlDetailSummary> for PnlDetailSummary
Source§fn from(value: PnlDetailSummary) -> Self
fn from(value: PnlDetailSummary) -> Self
Converts to this type from the input type.
Source§impl Serialize for PnlDetailSummary
impl Serialize for PnlDetailSummary
Source§impl TryFrom<PnlDetailSummary> for PnlDetailSummary
impl TryFrom<PnlDetailSummary> for PnlDetailSummary
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: PnlDetailSummary) -> Result<Self, ConversionError>
fn try_from(value: PnlDetailSummary) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for PnlDetailSummary
impl RefUnwindSafe for PnlDetailSummary
impl Send for PnlDetailSummary
impl Sync for PnlDetailSummary
impl Unpin for PnlDetailSummary
impl UnsafeUnpin for PnlDetailSummary
impl UnwindSafe for PnlDetailSummary
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