pub struct Position {
pub symbol: String,
pub quantity: f64,
pub cost_basis: f64,
pub market_value: f64,
pub unrealized_profit_loss: f64,
pub unrealized_profit_loss_percentage: f64,
pub current_price: f64,
pub opened_at: DateTime<Utc>,
}Expand description
Position in an account.
Fields§
§symbol: StringSymbol of the position
quantity: f64Quantity of shares
cost_basis: f64Average cost basis
market_value: f64Current market value
unrealized_profit_loss: f64Unrealized profit/loss
unrealized_profit_loss_percentage: f64Unrealized profit/loss percentage
current_price: f64Current price
opened_at: DateTime<Utc>When the position was opened
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Position
impl<'de> Deserialize<'de> for Position
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
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
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