[−][src]Struct alpaca_finance::Account
Important information related to an account.
Including account status, funds available for trade, funds available for withdrawal, and various flags relevant to an account’s ability to trade.
An account maybe be blocked for just for trades (trades_blocked flag) or for both trades and transfers (account_blocked flag) if Alpaca identifies the account to engaging in any suspicious activity.
Also, in accordance with FINRA’s pattern day trading rule, an account may be flagged for pattern day trading (pattern_day_trader flag), which would inhibit an account from placing any further day-trades.
Fields
id: String
Account ID - a UUID
number: String
Account number - a string different from the account ID
cash: f64
Cash balance
equity: f64
The total equity in the account = cash + long_market_value + short_market_value
long_market_value: f64
Real-time MtM value of all long positions held in the account
short_market_value: f64
Real-time MtM value of all short positions held in the account
buying_power: f64
Current available $ buying power
created: DateTime<Utc>
Timestamp this account was created at
is_account_blocked: bool
If true, the account activity by user is prohibited.
is_pattern_day_trader: bool
If true, the account has been flagged as a pattern day trader
is_trade_suspended: bool
If true, the account is not allowed to place orders due to customer request.
is_trading_blocked: bool
If true, the account is not allowed to place orders.
is_transfers_blocked: bool
If true, the account is not allowed to request money transfers.
status: AccountStatus
Account status
Implementations
impl Account
[src]
pub async fn get<'_>(alpaca: &'_ Alpaca) -> Result<Account>
[src]
Gets the current account information
Example
To get your current account information:
let alpaca = Alpaca::live("KEY_ID", "SECRET").await.unwrap();
let account = Account::get(&alpaca).await.unwrap();
Trait Implementations
impl Debug for Account
[src]
impl<'de> Deserialize<'de> for Account
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnwindSafe for Account
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,