java.lang.Object
markets.alpaca.client.openapi.trading.model.Account
All Implemented Interfaces:
Serializable

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class Account extends Object implements Serializable
The account API serves 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. Please note that cryptocurrencies are not eligible assets to be used as collateral for margin accounts and will require the asset be traded using cash only.
See Also:
  • Field Details

  • Constructor Details

    • Account

      public Account()
  • Method Details

    • accountBlocked

      public Account accountBlocked(@Nullable Boolean accountBlocked)
    • getAccountBlocked

      @Nullable public Boolean getAccountBlocked()
      If true, the account activity by user is prohibited.
      Returns:
      accountBlocked
    • setAccountBlocked

      public void setAccountBlocked(@Nullable Boolean accountBlocked)
    • accountNumber

      public Account accountNumber(@Nullable String accountNumber)
    • getAccountNumber

      @Nullable public String getAccountNumber()
      Account number.
      Returns:
      accountNumber
    • setAccountNumber

      public void setAccountNumber(@Nullable String accountNumber)
    • accruedFees

      public Account accruedFees(@Nullable String accruedFees)
    • getAccruedFees

      @Nullable public String getAccruedFees()
      The fees collected.
      Returns:
      accruedFees
    • setAccruedFees

      public void setAccruedFees(@Nullable String accruedFees)
    • balanceAsof

      public Account balanceAsof(@Nullable String balanceAsof)
    • getBalanceAsof

      @Nullable public String getBalanceAsof()
      The date of the snapshot for `last_*` fields
      Returns:
      balanceAsof
    • setBalanceAsof

      public void setBalanceAsof(@Nullable String balanceAsof)
    • buyingPower

      public Account buyingPower(@Nullable String buyingPower)
    • getBuyingPower

      @Nullable public String getBuyingPower()
      Current available $ buying power; If multiplier = 4, this is your daytrade buying power which is calculated as (last_equity - (last) maintenance_margin) * 4; If multiplier = 2, buying_power = max(equity - initial_margin,0) * 2; If multiplier = 1, buying_power = cash
      Returns:
      buyingPower
    • setBuyingPower

      public void setBuyingPower(@Nullable String buyingPower)
    • cash

      public Account cash(@Nullable String cash)
    • getCash

      @Nullable public String getCash()
      Cash Balance
      Returns:
      cash
    • setCash

      public void setCash(@Nullable String cash)
    • createdAt

      public Account createdAt(@Nullable OffsetDateTime createdAt)
    • getCreatedAt

      @Nullable public OffsetDateTime getCreatedAt()
      Timestamp this account was created at
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nullable OffsetDateTime createdAt)
    • cryptoStatus

      public Account cryptoStatus(@Nullable AccountStatus cryptoStatus)
    • getCryptoStatus

      @Nullable public AccountStatus getCryptoStatus()
      Get cryptoStatus
      Returns:
      cryptoStatus
    • setCryptoStatus

      public void setCryptoStatus(@Nullable AccountStatus cryptoStatus)
    • currency

      public Account currency(@Nullable String currency)
    • getCurrency

      @Nullable public String getCurrency()
      USD
      Returns:
      currency
    • setCurrency

      public void setCurrency(@Nullable String currency)
    • equity

      public Account equity(@Nullable String equity)
    • getEquity

      @Nullable public String getEquity()
      Cash + long_market_value + short_market_value
      Returns:
      equity
    • setEquity

      public void setEquity(@Nullable String equity)
    • id

      public Account id(@Nonnull UUID id)
    • getId

      @Nonnull public UUID getId()
      Account Id.
      Returns:
      id
    • setId

      public void setId(@Nonnull UUID id)
    • initialMargin

      public Account initialMargin(@Nullable String initialMargin)
    • getInitialMargin

      @Nullable public String getInitialMargin()
      Reg T initial margin requirement (continuously updated value)
      Returns:
      initialMargin
    • setInitialMargin

      public void setInitialMargin(@Nullable String initialMargin)
    • intradayAdjustments

      public Account intradayAdjustments(@Nullable String intradayAdjustments)
    • getIntradayAdjustments

      @Nullable public String getIntradayAdjustments()
      The intraday adjustment by non_trade_activities such as fund deposit/withdraw.
      Returns:
      intradayAdjustments
    • setIntradayAdjustments

      public void setIntradayAdjustments(@Nullable String intradayAdjustments)
    • lastEquity

      public Account lastEquity(@Nullable String lastEquity)
    • getLastEquity

      @Nullable public String getLastEquity()
      Equity as of previous trading day at 16:00:00 ET
      Returns:
      lastEquity
    • setLastEquity

      public void setLastEquity(@Nullable String lastEquity)
    • lastMaintenanceMargin

      public Account lastMaintenanceMargin(@Nullable String lastMaintenanceMargin)
    • getLastMaintenanceMargin

      @Nullable public String getLastMaintenanceMargin()
      Your maintenance margin requirement on the previous trading day
      Returns:
      lastMaintenanceMargin
    • setLastMaintenanceMargin

      public void setLastMaintenanceMargin(@Nullable String lastMaintenanceMargin)
    • longMarketValue

      public Account longMarketValue(@Nullable String longMarketValue)
    • getLongMarketValue

      @Nullable public String getLongMarketValue()
      Real-time MtM value of all long positions held in the account
      Returns:
      longMarketValue
    • setLongMarketValue

      public void setLongMarketValue(@Nullable String longMarketValue)
    • maintenanceMargin

      public Account maintenanceMargin(@Nullable String maintenanceMargin)
    • getMaintenanceMargin

      @Nullable public String getMaintenanceMargin()
      Maintenance margin requirement (continuously updated value)
      Returns:
      maintenanceMargin
    • setMaintenanceMargin

      public void setMaintenanceMargin(@Nullable String maintenanceMargin)
    • multiplier

      public Account multiplier(@Nullable String multiplier)
    • getMultiplier

      @Nullable public String getMultiplier()
      Buying power multiplier that represents account margin classification; valid values 1 (standard limited margin account with 1x buying power), 2 (reg T margin account with 2x intraday and overnight buying power; this is the default for all non-PDT accounts with $2,000 or more equity), 4 (PDT account with 4x intraday buying power and 2x reg T overnight buying power)
      Returns:
      multiplier
    • setMultiplier

      public void setMultiplier(@Nullable String multiplier)
    • nonMarginableBuyingPower

      public Account nonMarginableBuyingPower(@Nullable String nonMarginableBuyingPower)
    • getNonMarginableBuyingPower

      @Nullable public String getNonMarginableBuyingPower()
      Current available non-margin dollar buying power
      Returns:
      nonMarginableBuyingPower
    • setNonMarginableBuyingPower

      public void setNonMarginableBuyingPower(@Nullable String nonMarginableBuyingPower)
    • optionsApprovedLevel

      public Account optionsApprovedLevel(@Nullable Account.OptionsApprovedLevelEnum optionsApprovedLevel)
    • getOptionsApprovedLevel

      @Nullable public Account.OptionsApprovedLevelEnum getOptionsApprovedLevel()
      The options trading level that was approved for this account. 0=disabled, 1=Covered Call/Cash-Secured Put, 2=Long Call/Put, 3=Spreads/Straddles.
      Returns:
      optionsApprovedLevel
    • setOptionsApprovedLevel

      public void setOptionsApprovedLevel(@Nullable Account.OptionsApprovedLevelEnum optionsApprovedLevel)
    • optionsBuyingPower

      public Account optionsBuyingPower(@Nullable String optionsBuyingPower)
    • getOptionsBuyingPower

      @Nullable public String getOptionsBuyingPower()
      Your buying power for options trading
      Returns:
      optionsBuyingPower
    • setOptionsBuyingPower

      public void setOptionsBuyingPower(@Nullable String optionsBuyingPower)
    • optionsTradingLevel

      public Account optionsTradingLevel(@Nullable Account.OptionsTradingLevelEnum optionsTradingLevel)
    • getOptionsTradingLevel

      @Nullable public Account.OptionsTradingLevelEnum getOptionsTradingLevel()
      The effective options trading level of the account. This is the minimum between account options_approved_level and account configurations max_options_trading_level. 0=disabled, 1=Covered Call/Cash-Secured Put, 2=Long Call/Put, 3=Spreads/Straddles.
      Returns:
      optionsTradingLevel
    • setOptionsTradingLevel

      public void setOptionsTradingLevel(@Nullable Account.OptionsTradingLevelEnum optionsTradingLevel)
    • pendingRegTafFees

      public Account pendingRegTafFees(@Nullable String pendingRegTafFees)
    • getPendingRegTafFees

      @Nullable public String getPendingRegTafFees()
      Pending regulatory fees for the account.
      Returns:
      pendingRegTafFees
    • setPendingRegTafFees

      public void setPendingRegTafFees(@Nullable String pendingRegTafFees)
    • pendingTransferIn

      public Account pendingTransferIn(@Nullable String pendingTransferIn)
    • getPendingTransferIn

      @Nullable public String getPendingTransferIn()
      Cash pending transfer in.
      Returns:
      pendingTransferIn
    • setPendingTransferIn

      public void setPendingTransferIn(@Nullable String pendingTransferIn)
    • pendingTransferOut

      public Account pendingTransferOut(@Nullable String pendingTransferOut)
    • getPendingTransferOut

      @Nullable public String getPendingTransferOut()
      Cash pending transfer out.
      Returns:
      pendingTransferOut
    • setPendingTransferOut

      public void setPendingTransferOut(@Nullable String pendingTransferOut)
    • portfolioValue

      public Account portfolioValue(@Nullable String portfolioValue)
    • getPortfolioValue

      @Nullable public String getPortfolioValue()
      Total value of cash + holding positions (This field is deprecated. It is equivalent to the equity field.)
      Returns:
      portfolioValue
    • setPortfolioValue

      public void setPortfolioValue(@Nullable String portfolioValue)
    • regtBuyingPower

      public Account regtBuyingPower(@Nullable String regtBuyingPower)
    • getRegtBuyingPower

      @Nullable public String getRegtBuyingPower()
      Your buying power under Regulation T (your excess equity - equity minus margin value - times your margin multiplier)
      Returns:
      regtBuyingPower
    • setRegtBuyingPower

      public void setRegtBuyingPower(@Nullable String regtBuyingPower)
    • shortMarketValue

      public Account shortMarketValue(@Nullable String shortMarketValue)
    • getShortMarketValue

      @Nullable public String getShortMarketValue()
      Real-time MtM value of all short positions held in the account
      Returns:
      shortMarketValue
    • setShortMarketValue

      public void setShortMarketValue(@Nullable String shortMarketValue)
    • shortingEnabled

      public Account shortingEnabled(@Nullable Boolean shortingEnabled)
    • getShortingEnabled

      @Nullable public Boolean getShortingEnabled()
      Flag to denote whether or not the account is permitted to short
      Returns:
      shortingEnabled
    • setShortingEnabled

      public void setShortingEnabled(@Nullable Boolean shortingEnabled)
    • sma

      public Account sma(@Nullable String sma)
    • getSma

      @Nullable public String getSma()
      Value of special memorandum account (will be used at a later date to provide additional buying_power)
      Returns:
      sma
    • setSma

      public void setSma(@Nullable String sma)
    • status

      public Account status(@Nonnull AccountStatus status)
    • getStatus

      @Nonnull public AccountStatus getStatus()
      Get status
      Returns:
      status
    • setStatus

      public void setStatus(@Nonnull AccountStatus status)
    • tradeSuspendedByUser

      public Account tradeSuspendedByUser(@Nullable Boolean tradeSuspendedByUser)
    • getTradeSuspendedByUser

      @Nullable public Boolean getTradeSuspendedByUser()
      User setting. If true, the account is not allowed to place orders.
      Returns:
      tradeSuspendedByUser
    • setTradeSuspendedByUser

      public void setTradeSuspendedByUser(@Nullable Boolean tradeSuspendedByUser)
    • tradingBlocked

      public Account tradingBlocked(@Nullable Boolean tradingBlocked)
    • getTradingBlocked

      @Nullable public Boolean getTradingBlocked()
      If true, the account is not allowed to place orders.
      Returns:
      tradingBlocked
    • setTradingBlocked

      public void setTradingBlocked(@Nullable Boolean tradingBlocked)
    • transfersBlocked

      public Account transfersBlocked(@Nullable Boolean transfersBlocked)
    • getTransfersBlocked

      @Nullable public Boolean getTransfersBlocked()
      If true, the account is not allowed to request money transfers.
      Returns:
      transfersBlocked
    • setTransfersBlocked

      public void setTransfersBlocked(@Nullable Boolean transfersBlocked)
    • putAdditionalProperty

      public Account putAdditionalProperty(String key, Object value)
      Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.
      Parameters:
      key - name of the property
      value - value of the property
      Returns:
      the Account instance itself
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Return the additional (undeclared) property.
      Returns:
      a map of objects
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Return the additional (undeclared) property with the specified name.
      Parameters:
      key - name of the property
      Returns:
      an object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to Account
    • fromJson

      public static Account fromJson(String jsonString) throws IOException
      Create an instance of Account given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of Account
      Throws:
      IOException - if the JSON string is invalid with respect to Account
    • toJson

      public String toJson()
      Convert an instance of Account to an JSON string
      Returns:
      JSON string