pub struct AccountPortfolioValue {
pub contract: Contract,
pub position: f64,
pub market_price: f64,
pub market_value: f64,
pub average_cost: f64,
pub unrealized_pnl: f64,
pub realized_pnl: f64,
pub account: Option<String>,
}Expand description
Aggregated valuation details for a single contract within the account.
Fields§
§contract: ContractContract for the position
position: f64Number of shares held
market_price: f64Current market price of the contract
market_value: f64Current market value of the position (shares * market price)
average_cost: f64Average cost per share
unrealized_pnl: f64Unrealized profit and loss
realized_pnl: f64Realized profit and loss
account: Option<String>Account holding the position
Trait Implementations§
Source§impl ComposeSchema for AccountPortfolioValue
impl ComposeSchema for AccountPortfolioValue
Source§impl Debug for AccountPortfolioValue
impl Debug for AccountPortfolioValue
Source§impl Default for AccountPortfolioValue
impl Default for AccountPortfolioValue
Source§fn default() -> AccountPortfolioValue
fn default() -> AccountPortfolioValue
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AccountPortfolioValue
impl<'de> Deserialize<'de> for AccountPortfolioValue
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 PartialEq for AccountPortfolioValue
impl PartialEq for AccountPortfolioValue
Source§impl Serialize for AccountPortfolioValue
impl Serialize for AccountPortfolioValue
Source§impl ToSchema for AccountPortfolioValue
impl ToSchema for AccountPortfolioValue
impl StructuralPartialEq for AccountPortfolioValue
Auto Trait Implementations§
impl Freeze for AccountPortfolioValue
impl RefUnwindSafe for AccountPortfolioValue
impl Send for AccountPortfolioValue
impl Sync for AccountPortfolioValue
impl Unpin for AccountPortfolioValue
impl UnsafeUnpin for AccountPortfolioValue
impl UnwindSafe for AccountPortfolioValue
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