pub struct PnlDetailItem {Show 31 fields
pub avg_buy_price_in_usd: String,
pub avg_profit_per_trade_in_usd: String,
pub avg_sell_price_in_usd: String,
pub balance: String,
pub buy_amount: String,
pub buy_amount_in_usd: String,
pub buys: String,
pub current_value: String,
pub decimals: Option<i32>,
pub first_buy_at: Option<i64>,
pub is_closed: bool,
pub last_sell_at: Option<i64>,
pub logo_uri: Option<String>,
pub losses: Option<String>,
pub name: Option<String>,
pub price_in_usd: String,
pub realized_profit_in_usd: String,
pub realized_profit_ratio: String,
pub sell_amount: String,
pub sell_amount_in_usd: String,
pub sells: String,
pub symbol: Option<String>,
pub token_address: String,
pub total_cost_in_usd: Option<String>,
pub total_profit_in_usd: String,
pub total_profit_ratio: String,
pub total_trades: String,
pub unrealized_profit_in_usd: String,
pub unrealized_profit_ratio: String,
pub wallet_address: String,
pub wins: Option<String>,
}Expand description
PnL detail for a single wallet-token pair (mirrors TS PnlDetailItemDTO).
JSON schema
{
"description": "PnL detail for a single wallet-token pair (mirrors TS PnlDetailItemDTO).",
"type": "object",
"required": [
"avgBuyPriceInUsd",
"avgProfitPerTradeInUsd",
"avgSellPriceInUsd",
"balance",
"buyAmount",
"buyAmountInUsd",
"buys",
"currentValue",
"isClosed",
"priceInUsd",
"realizedProfitInUsd",
"realizedProfitRatio",
"sellAmount",
"sellAmountInUsd",
"sells",
"tokenAddress",
"totalProfitInUsd",
"totalProfitRatio",
"totalTrades",
"unrealizedProfitInUsd",
"unrealizedProfitRatio",
"walletAddress"
],
"properties": {
"avgBuyPriceInUsd": {
"description": "Average buy price in USD",
"examples": [
"0.00003324391014165111"
],
"type": "string"
},
"avgProfitPerTradeInUsd": {
"description": "Average profit per trade in USD",
"examples": [
"3206068.5728287027967835484926836364"
],
"type": "string"
},
"avgSellPriceInUsd": {
"description": "Average sell price in USD",
"examples": [
"0.00003185807445122603"
],
"type": "string"
},
"balance": {
"description": "Current token balance",
"examples": [
"1254982158.7106050000000000"
],
"type": "string"
},
"buyAmount": {
"description": "Total buy amount in token units",
"examples": [
"1457986404.2130240000000000"
],
"type": "string"
},
"buyAmountInUsd": {
"description": "Total buy amount in USD",
"examples": [
"48469.1690094067802589"
],
"type": "string"
},
"buys": {
"description": "Number of buy trades",
"examples": [
"275"
],
"type": "string"
},
"currentValue": {
"description": "Current holding value in USD",
"examples": [
"1062513957.429816153652557077014"
],
"type": "string"
},
"decimals": {
"description": "Token decimal places",
"examples": [
6
],
"type": "integer",
"format": "int32"
},
"firstBuyAt": {
"description": "Timestamp of first buy (ms since epoch)",
"type": "integer",
"format": "int64"
},
"isClosed": {
"description": "Whether the position is fully closed (balance == 0)",
"type": "boolean"
},
"lastSellAt": {
"description": "Timestamp of last sell (ms since epoch)",
"type": "integer",
"format": "int64"
},
"logoUri": {
"description": "Token logo URI",
"examples": [
"https://s1.chainstream.io/tokens/images/example.webp"
],
"type": "string"
},
"losses": {
"description": "ENTITY.PNL_DETAIL_ITEM.LOSSES",
"examples": [
"5"
],
"type": "string"
},
"name": {
"description": "Token display name",
"examples": [
"The Real World"
],
"type": "string"
},
"priceInUsd": {
"description": "Current token price in USD",
"examples": [
"0.8466367032033868"
],
"type": "string"
},
"realizedProfitInUsd": {
"description": "Realized profit in USD",
"examples": [
"67.1297848453256596"
],
"type": "string"
},
"realizedProfitRatio": {
"description": "Realized profit ratio",
"examples": [
"0.00138499970635554473"
],
"type": "string"
},
"sellAmount": {
"description": "Total sell amount in token units",
"examples": [
"203004245.5024190000000000"
],
"type": "string"
},
"sellAmountInUsd": {
"description": "Total sell amount in USD",
"examples": [
"6467.3243671310312402"
],
"type": "string"
},
"sells": {
"description": "Number of sell trades",
"examples": [
"110"
],
"type": "string"
},
"symbol": {
"description": "Token ticker symbol",
"examples": [
"TRW"
],
"type": "string"
},
"tokenAddress": {
"description": "Token contract address",
"examples": [
"4MbgMQGvXBWyxKsTfrvkcRgh5FNLg1VxLnzWqbsdPh7p"
],
"type": "string"
},
"totalCostInUsd": {
"description": "ENTITY.PNL_DETAIL_ITEM.TOTAL_COST_IN_USD",
"examples": [
"48469.17"
],
"type": "string"
},
"totalProfitInUsd": {
"description": "Total profit (realized + unrealized) in USD",
"examples": [
"1234336400.539050576761666169683200000000"
],
"type": "string"
},
"totalProfitRatio": {
"description": "Total profit ratio",
"examples": [
"25466.423827061972608618047859693225"
],
"type": "string"
},
"totalTrades": {
"description": "Total number of trades",
"examples": [
"385"
],
"type": "string"
},
"unrealizedProfitInUsd": {
"description": "Unrealized profit in USD",
"examples": [
"1234336333.409265731436006569683200000000"
],
"type": "string"
},
"unrealizedProfitRatio": {
"description": "Unrealized profit ratio",
"examples": [
"25466.422442062266253073315832775971"
],
"type": "string"
},
"walletAddress": {
"description": "Wallet address",
"examples": [
"54Pz1e35z9uoFdnxtzjp7xZQoFiofqhdayQWBMN7dsuy"
],
"type": "string"
},
"wins": {
"description": "ENTITY.PNL_DETAIL_ITEM.WINS",
"examples": [
"12"
],
"type": "string"
}
}
}Fields§
§avg_buy_price_in_usd: StringAverage buy price in USD
avg_profit_per_trade_in_usd: StringAverage profit per trade in USD
avg_sell_price_in_usd: StringAverage sell price in USD
balance: StringCurrent token balance
buy_amount: StringTotal buy amount in token units
buy_amount_in_usd: StringTotal buy amount in USD
buys: StringNumber of buy trades
current_value: StringCurrent holding value in USD
decimals: Option<i32>Token decimal places
first_buy_at: Option<i64>Timestamp of first buy (ms since epoch)
is_closed: boolWhether the position is fully closed (balance == 0)
last_sell_at: Option<i64>Timestamp of last sell (ms since epoch)
logo_uri: Option<String>Token logo URI
losses: Option<String>ENTITY.PNL_DETAIL_ITEM.LOSSES
name: Option<String>Token display name
price_in_usd: StringCurrent token price in USD
realized_profit_in_usd: StringRealized profit in USD
realized_profit_ratio: StringRealized profit ratio
sell_amount: StringTotal sell amount in token units
sell_amount_in_usd: StringTotal sell amount in USD
sells: StringNumber of sell trades
symbol: Option<String>Token ticker symbol
token_address: StringToken contract address
total_cost_in_usd: Option<String>ENTITY.PNL_DETAIL_ITEM.TOTAL_COST_IN_USD
total_profit_in_usd: StringTotal profit (realized + unrealized) in USD
total_profit_ratio: StringTotal profit ratio
total_trades: StringTotal number of trades
unrealized_profit_in_usd: StringUnrealized profit in USD
unrealized_profit_ratio: StringUnrealized profit ratio
wallet_address: StringWallet address
wins: Option<String>ENTITY.PNL_DETAIL_ITEM.WINS
Implementations§
Source§impl PnlDetailItem
impl PnlDetailItem
pub fn builder() -> PnlDetailItem
Trait Implementations§
Source§impl Clone for PnlDetailItem
impl Clone for PnlDetailItem
Source§fn clone(&self) -> PnlDetailItem
fn clone(&self) -> PnlDetailItem
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more