Class Account
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumThe options trading level that was approved for this account.static enumThe effective options trading level of the account. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccountBlocked(Boolean accountBlocked) accountNumber(String accountNumber) accruedFees(String accruedFees) balanceAsof(String balanceAsof) buyingPower(String buyingPower) createdAt(OffsetDateTime createdAt) cryptoStatus(AccountStatus cryptoStatus) booleanstatic AccountCreate an instance of Account given an JSON stringIf true, the account activity by user is prohibited.Account number.The fees collected.Return the additional (undeclared) property.Return the additional (undeclared) property with the specified name.The date of the snapshot for `last_*` fieldsCurrent 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 = cashgetCash()Cash BalanceTimestamp this account was created atGet cryptoStatusUSDCash + long_market_value + short_market_valuegetId()Account Id.Reg T initial margin requirement (continuously updated value)The intraday adjustment by non_trade_activities such as fund deposit/withdraw.Equity as of previous trading day at 16:00:00 ETYour maintenance margin requirement on the previous trading dayReal-time MtM value of all long positions held in the accountMaintenance margin requirement (continuously updated value)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)Current available non-margin dollar buying powerThe options trading level that was approved for this account.Your buying power for options tradingThe effective options trading level of the account.Pending regulatory fees for the account.Cash pending transfer in.Cash pending transfer out.Total value of cash + holding positions (This field is deprecated.Your buying power under Regulation T (your excess equity - equity minus margin value - times your margin multiplier)Flag to denote whether or not the account is permitted to shortReal-time MtM value of all short positions held in the accountgetSma()Value of special memorandum account (will be used at a later date to provide additional buying_power)Get statusUser setting.If true, the account is not allowed to place orders.If true, the account is not allowed to request money transfers.inthashCode()initialMargin(String initialMargin) intradayAdjustments(String intradayAdjustments) lastEquity(String lastEquity) lastMaintenanceMargin(String lastMaintenanceMargin) longMarketValue(String longMarketValue) maintenanceMargin(String maintenanceMargin) multiplier(String multiplier) nonMarginableBuyingPower(String nonMarginableBuyingPower) optionsApprovedLevel(Account.OptionsApprovedLevelEnum optionsApprovedLevel) optionsBuyingPower(String optionsBuyingPower) optionsTradingLevel(Account.OptionsTradingLevelEnum optionsTradingLevel) pendingRegTafFees(String pendingRegTafFees) pendingTransferIn(String pendingTransferIn) pendingTransferOut(String pendingTransferOut) portfolioValue(String portfolioValue) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.regtBuyingPower(String regtBuyingPower) voidsetAccountBlocked(Boolean accountBlocked) voidsetAccountNumber(String accountNumber) voidsetAccruedFees(String accruedFees) voidsetBalanceAsof(String balanceAsof) voidsetBuyingPower(String buyingPower) voidvoidsetCreatedAt(OffsetDateTime createdAt) voidsetCryptoStatus(AccountStatus cryptoStatus) voidsetCurrency(String currency) voidvoidvoidsetInitialMargin(String initialMargin) voidsetIntradayAdjustments(String intradayAdjustments) voidsetLastEquity(String lastEquity) voidsetLastMaintenanceMargin(String lastMaintenanceMargin) voidsetLongMarketValue(String longMarketValue) voidsetMaintenanceMargin(String maintenanceMargin) voidsetMultiplier(String multiplier) voidsetNonMarginableBuyingPower(String nonMarginableBuyingPower) voidsetOptionsApprovedLevel(Account.OptionsApprovedLevelEnum optionsApprovedLevel) voidsetOptionsBuyingPower(String optionsBuyingPower) voidsetOptionsTradingLevel(Account.OptionsTradingLevelEnum optionsTradingLevel) voidsetPendingRegTafFees(String pendingRegTafFees) voidsetPendingTransferIn(String pendingTransferIn) voidsetPendingTransferOut(String pendingTransferOut) voidsetPortfolioValue(String portfolioValue) voidsetRegtBuyingPower(String regtBuyingPower) voidsetShortingEnabled(Boolean shortingEnabled) voidsetShortMarketValue(String shortMarketValue) voidvoidsetStatus(AccountStatus status) voidsetTradeSuspendedByUser(Boolean tradeSuspendedByUser) voidsetTradingBlocked(Boolean tradingBlocked) voidsetTransfersBlocked(Boolean transfersBlocked) shortingEnabled(Boolean shortingEnabled) shortMarketValue(String shortMarketValue) status(AccountStatus status) toJson()Convert an instance of Account to an JSON stringtoString()tradeSuspendedByUser(Boolean tradeSuspendedByUser) tradingBlocked(Boolean tradingBlocked) transfersBlocked(Boolean transfersBlocked) static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ACCOUNT_BLOCKED
- See Also:
-
SERIALIZED_NAME_ACCOUNT_NUMBER
- See Also:
-
SERIALIZED_NAME_ACCRUED_FEES
- See Also:
-
SERIALIZED_NAME_BALANCE_ASOF
- See Also:
-
SERIALIZED_NAME_BUYING_POWER
- See Also:
-
SERIALIZED_NAME_CASH
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_CRYPTO_STATUS
- See Also:
-
SERIALIZED_NAME_CURRENCY
- See Also:
-
SERIALIZED_NAME_EQUITY
- See Also:
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_INITIAL_MARGIN
- See Also:
-
SERIALIZED_NAME_INTRADAY_ADJUSTMENTS
- See Also:
-
SERIALIZED_NAME_LAST_EQUITY
- See Also:
-
SERIALIZED_NAME_LAST_MAINTENANCE_MARGIN
- See Also:
-
SERIALIZED_NAME_LONG_MARKET_VALUE
- See Also:
-
SERIALIZED_NAME_MAINTENANCE_MARGIN
- See Also:
-
SERIALIZED_NAME_MULTIPLIER
- See Also:
-
SERIALIZED_NAME_NON_MARGINABLE_BUYING_POWER
- See Also:
-
SERIALIZED_NAME_OPTIONS_APPROVED_LEVEL
- See Also:
-
SERIALIZED_NAME_OPTIONS_BUYING_POWER
- See Also:
-
SERIALIZED_NAME_OPTIONS_TRADING_LEVEL
- See Also:
-
SERIALIZED_NAME_PENDING_REG_TAF_FEES
- See Also:
-
SERIALIZED_NAME_PENDING_TRANSFER_IN
- See Also:
-
SERIALIZED_NAME_PENDING_TRANSFER_OUT
- See Also:
-
SERIALIZED_NAME_PORTFOLIO_VALUE
- See Also:
-
SERIALIZED_NAME_REGT_BUYING_POWER
- See Also:
-
SERIALIZED_NAME_SHORT_MARKET_VALUE
- See Also:
-
SERIALIZED_NAME_SHORTING_ENABLED
- See Also:
-
SERIALIZED_NAME_SMA
- See Also:
-
SERIALIZED_NAME_STATUS
- See Also:
-
SERIALIZED_NAME_TRADE_SUSPENDED_BY_USER
- See Also:
-
SERIALIZED_NAME_TRADING_BLOCKED
- See Also:
-
SERIALIZED_NAME_TRANSFERS_BLOCKED
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
Account
public Account()
-
-
Method Details
-
accountBlocked
-
getAccountBlocked
If true, the account activity by user is prohibited.- Returns:
- accountBlocked
-
setAccountBlocked
-
accountNumber
-
getAccountNumber
Account number.- Returns:
- accountNumber
-
setAccountNumber
-
accruedFees
-
getAccruedFees
The fees collected.- Returns:
- accruedFees
-
setAccruedFees
-
balanceAsof
-
getBalanceAsof
The date of the snapshot for `last_*` fields- Returns:
- balanceAsof
-
setBalanceAsof
-
buyingPower
-
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
-
cash
-
getCash
Cash Balance- Returns:
- cash
-
setCash
-
createdAt
-
getCreatedAt
Timestamp this account was created at- Returns:
- createdAt
-
setCreatedAt
-
cryptoStatus
-
getCryptoStatus
Get cryptoStatus- Returns:
- cryptoStatus
-
setCryptoStatus
-
currency
-
getCurrency
USD- Returns:
- currency
-
setCurrency
-
equity
-
getEquity
Cash + long_market_value + short_market_value- Returns:
- equity
-
setEquity
-
id
-
getId
Account Id.- Returns:
- id
-
setId
-
initialMargin
-
getInitialMargin
Reg T initial margin requirement (continuously updated value)- Returns:
- initialMargin
-
setInitialMargin
-
intradayAdjustments
-
getIntradayAdjustments
The intraday adjustment by non_trade_activities such as fund deposit/withdraw.- Returns:
- intradayAdjustments
-
setIntradayAdjustments
-
lastEquity
-
getLastEquity
Equity as of previous trading day at 16:00:00 ET- Returns:
- lastEquity
-
setLastEquity
-
lastMaintenanceMargin
-
getLastMaintenanceMargin
Your maintenance margin requirement on the previous trading day- Returns:
- lastMaintenanceMargin
-
setLastMaintenanceMargin
-
longMarketValue
-
getLongMarketValue
Real-time MtM value of all long positions held in the account- Returns:
- longMarketValue
-
setLongMarketValue
-
maintenanceMargin
-
getMaintenanceMargin
Maintenance margin requirement (continuously updated value)- Returns:
- maintenanceMargin
-
setMaintenanceMargin
-
multiplier
-
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
-
nonMarginableBuyingPower
-
getNonMarginableBuyingPower
Current available non-margin dollar buying power- Returns:
- nonMarginableBuyingPower
-
setNonMarginableBuyingPower
-
optionsApprovedLevel
public Account optionsApprovedLevel(@Nullable Account.OptionsApprovedLevelEnum optionsApprovedLevel) -
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
-
getOptionsBuyingPower
Your buying power for options trading- Returns:
- optionsBuyingPower
-
setOptionsBuyingPower
-
optionsTradingLevel
-
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
-
pendingRegTafFees
-
getPendingRegTafFees
Pending regulatory fees for the account.- Returns:
- pendingRegTafFees
-
setPendingRegTafFees
-
pendingTransferIn
-
getPendingTransferIn
Cash pending transfer in.- Returns:
- pendingTransferIn
-
setPendingTransferIn
-
pendingTransferOut
-
getPendingTransferOut
Cash pending transfer out.- Returns:
- pendingTransferOut
-
setPendingTransferOut
-
portfolioValue
-
getPortfolioValue
Total value of cash + holding positions (This field is deprecated. It is equivalent to the equity field.)- Returns:
- portfolioValue
-
setPortfolioValue
-
regtBuyingPower
-
getRegtBuyingPower
Your buying power under Regulation T (your excess equity - equity minus margin value - times your margin multiplier)- Returns:
- regtBuyingPower
-
setRegtBuyingPower
-
shortMarketValue
-
getShortMarketValue
Real-time MtM value of all short positions held in the account- Returns:
- shortMarketValue
-
setShortMarketValue
-
shortingEnabled
-
getShortingEnabled
Flag to denote whether or not the account is permitted to short- Returns:
- shortingEnabled
-
setShortingEnabled
-
sma
-
getSma
Value of special memorandum account (will be used at a later date to provide additional buying_power)- Returns:
- sma
-
setSma
-
status
-
getStatus
Get status- Returns:
- status
-
setStatus
-
tradeSuspendedByUser
-
getTradeSuspendedByUser
User setting. If true, the account is not allowed to place orders.- Returns:
- tradeSuspendedByUser
-
setTradeSuspendedByUser
-
tradingBlocked
-
getTradingBlocked
If true, the account is not allowed to place orders.- Returns:
- tradingBlocked
-
setTradingBlocked
-
transfersBlocked
-
getTransfersBlocked
If true, the account is not allowed to request money transfers.- Returns:
- transfersBlocked
-
setTransfersBlocked
-
putAdditionalProperty
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 propertyvalue- value of the property- Returns:
- the Account instance itself
-
getAdditionalProperties
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
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
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
Convert an instance of Account to an JSON string- Returns:
- JSON string
-