pub struct NetWorthByTokensItem {Show 17 fields
pub amount: String,
pub avg_cost_usd: Option<String>,
pub chain: String,
pub decimals: i32,
pub is_active: bool,
pub last_active_at: Option<i64>,
pub logo_uri: Option<String>,
pub name: String,
pub price_in_native: String,
pub price_in_usd: String,
pub realized_pnl_in_usd: Option<String>,
pub symbol: String,
pub token_address: String,
pub unrealized_pnl_in_usd: Option<String>,
pub value_in_native: String,
pub value_in_usd: String,
pub wallet_token_tags: Vec<String>,
}Expand description
Single token net-worth item (mirrors TS WalletNetWorthItemDTO).
JSON schema
{
"description": "Single token net-worth item (mirrors TS WalletNetWorthItemDTO).",
"type": "object",
"required": [
"amount",
"chain",
"decimals",
"isActive",
"name",
"priceInNative",
"priceInUsd",
"symbol",
"tokenAddress",
"valueInNative",
"valueInUsd"
],
"properties": {
"amount": {
"description": "Token holding amount",
"examples": [
"1000.50"
],
"type": "string"
},
"avgCostUsd": {
"description": "Average cost per token in USD (balance_cost_avg_in_usd; sparse ~0.2% fill rate)",
"type": "string"
},
"chain": {
"description": "Blockchain network identifier",
"examples": [
"sol"
],
"type": "string"
},
"decimals": {
"description": "Token decimal places",
"examples": [
6
],
"type": "integer",
"format": "int32"
},
"isActive": {
"description": "Whether the wallet currently holds a non-zero balance",
"type": "boolean"
},
"lastActiveAt": {
"description": "Last active timestamp (ms since epoch)",
"type": "integer",
"format": "int64"
},
"logoUri": {
"description": "Token logo URI",
"examples": [
"https://s1.chainstream.io/tokens/images/usdc.webp"
],
"type": "string"
},
"name": {
"description": "Token display name",
"examples": [
"USD Coin"
],
"type": "string"
},
"priceInNative": {
"description": "Token price in native token",
"examples": [
"0.00000667"
],
"type": "string"
},
"priceInUsd": {
"description": "Token price in USD",
"examples": [
"1.0001"
],
"type": "string"
},
"realizedPnlInUsd": {
"description": "Realized PnL in USD (all-time cumulative)",
"type": "string"
},
"symbol": {
"description": "Token ticker symbol",
"examples": [
"USDC"
],
"type": "string"
},
"tokenAddress": {
"description": "Token contract address",
"examples": [
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
],
"type": "string"
},
"unrealizedPnlInUsd": {
"description": "Unrealized PnL in USD (current open position)",
"type": "string"
},
"valueInNative": {
"description": "Holding value in native token",
"examples": [
"6.67"
],
"type": "string"
},
"valueInUsd": {
"description": "Holding value in USD",
"examples": [
"1000.60"
],
"type": "string"
},
"walletTokenTags": {
"description": "Trader classification tags",
"type": "array",
"items": {
"type": "string"
}
}
}
}Fields§
§amount: StringToken holding amount
avg_cost_usd: Option<String>Average cost per token in USD (balance_cost_avg_in_usd; sparse ~0.2% fill rate)
chain: StringBlockchain network identifier
decimals: i32Token decimal places
is_active: boolWhether the wallet currently holds a non-zero balance
last_active_at: Option<i64>Last active timestamp (ms since epoch)
logo_uri: Option<String>Token logo URI
name: StringToken display name
price_in_native: StringToken price in native token
price_in_usd: StringToken price in USD
realized_pnl_in_usd: Option<String>Realized PnL in USD (all-time cumulative)
symbol: StringToken ticker symbol
token_address: StringToken contract address
unrealized_pnl_in_usd: Option<String>Unrealized PnL in USD (current open position)
value_in_native: StringHolding value in native token
value_in_usd: StringHolding value in USD
Trader classification tags
Implementations§
Source§impl NetWorthByTokensItem
impl NetWorthByTokensItem
pub fn builder() -> NetWorthByTokensItem
Trait Implementations§
Source§impl Clone for NetWorthByTokensItem
impl Clone for NetWorthByTokensItem
Source§fn clone(&self) -> NetWorthByTokensItem
fn clone(&self) -> NetWorthByTokensItem
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 NetWorthByTokensItem
impl Debug for NetWorthByTokensItem
Source§impl<'de> Deserialize<'de> for NetWorthByTokensItem
impl<'de> Deserialize<'de> for NetWorthByTokensItem
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<&NetWorthByTokensItem> for NetWorthByTokensItem
impl From<&NetWorthByTokensItem> for NetWorthByTokensItem
Source§fn from(value: &NetWorthByTokensItem) -> Self
fn from(value: &NetWorthByTokensItem) -> Self
Converts to this type from the input type.
Source§impl From<NetWorthByTokensItem> for NetWorthByTokensItem
impl From<NetWorthByTokensItem> for NetWorthByTokensItem
Source§fn from(value: NetWorthByTokensItem) -> Self
fn from(value: NetWorthByTokensItem) -> Self
Converts to this type from the input type.
Source§impl Serialize for NetWorthByTokensItem
impl Serialize for NetWorthByTokensItem
Source§impl TryFrom<NetWorthByTokensItem> for NetWorthByTokensItem
impl TryFrom<NetWorthByTokensItem> for NetWorthByTokensItem
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: NetWorthByTokensItem) -> Result<Self, ConversionError>
fn try_from(value: NetWorthByTokensItem) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for NetWorthByTokensItem
impl RefUnwindSafe for NetWorthByTokensItem
impl Send for NetWorthByTokensItem
impl Sync for NetWorthByTokensItem
impl Unpin for NetWorthByTokensItem
impl UnsafeUnpin for NetWorthByTokensItem
impl UnwindSafe for NetWorthByTokensItem
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