[][src]Struct alpaca_client::position::Position

pub struct Position {
    pub asset_id: Uuid,
    pub symbol: String,
    pub exchange: String,
    pub asset_class: String,
    pub avg_entry_price: Decimal,
    pub qty: String,
    pub side: String,
    pub market_value: Decimal,
    pub cost_basis: Decimal,
    pub unrealized_pl: Decimal,
    pub unrealized_plpc: Decimal,
    pub unrealized_intraday_pl: Decimal,
    pub unrealized_intraday_plpc: Decimal,
    pub current_price: Decimal,
    pub lastday_price: Decimal,
    pub change_today: Decimal,
}

Fields

asset_id: Uuidsymbol: Stringexchange: Stringasset_class: Stringavg_entry_price: Decimalqty: Stringside: Stringmarket_value: Decimalcost_basis: Decimalunrealized_pl: Decimalunrealized_plpc: Decimalunrealized_intraday_pl: Decimalunrealized_intraday_plpc: Decimalcurrent_price: Decimallastday_price: Decimalchange_today: Decimal

Implementations

impl Position[src]

pub fn get_all(client: &Client) -> Vec<Position>[src]

pub fn get(client: &Client, symbol: String) -> Position[src]

pub fn close_all(client: &Client)[src]

pub fn close(client: &Client, symbol: String)[src]

Trait Implementations

impl Clone for Position[src]

impl Debug for Position[src]

impl<'de> Deserialize<'de> for Position[src]

impl Serialize for Position[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,