Class TradeAccount
java.lang.Object
markets.alpaca.client.openapi.broker.model.TradeAccount
- All Implemented Interfaces:
Serializable
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class TradeAccount
extends Object
implements Serializable
This is an extended version of the Account model found [in the trading api](https://alpaca.markets/docs/api-references/trading-api/account/#account-entity). Extra data has been added that would be useful for brokers.
- 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 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(BigDecimal accruedFees) adminConfigurations(AdminConfigurations adminConfigurations) balanceAsof(String balanceAsof) buyingPower(BigDecimal buyingPower) cash(BigDecimal cash) cashTransferable(String cashTransferable) cashWithdrawable(BigDecimal cashWithdrawable) clearingBroker(String clearingBroker) cryptoStatus(AccountStatus cryptoStatus) effectiveBuyingPower(BigDecimal effectiveBuyingPower) booleanequity(BigDecimal equity) static TradeAccountCreate an instance of TradeAccount given an JSON stringIf true, the account activity by user is prohibited.The account numberAccrued feesReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Get adminConfigurationsThe date of the snapshot for `last_*` fieldsCurrent available cash buying power.getCash()Cash balanceCash available for transfer (JNLC)Cash available for withdrawalClearing brokerTimestamp this account was created atGet cryptoStatusAlways USDEffective buying power (duplicate of buying power)cash + long_market_value + short_market_valuegetId()The account IDReg T initial margin requirement (continuously updated value)The intraday adjustment by non_trade_activities such as fund deposit/withdraw.Value of buying_power as of previous trading day at 16:00:00 ETValue of all cash as of previous trading day at 16:00:00 ETEquity as of previous trading day at 16:00:00 ETValue of Reg T margin as of previous trading day at 16:00:00 ETValue of all long positions as of previous trading day at 16:00:00 ETMaintenance margin requirement on the previous trading dayValue of option buying power as of previous trading day at 16:00:00 ETValue of Reg T buying power as of previous trading day at 16:00:00 ETValue of all short positions as of previous trading day at 16:00:00 ETReal-time MtM value of all long positions held in the accountMaintenance margin requirement (continuously updated value)Outstanding memopost value\"1\", \"2\", \"3\", or \"4\"Non-marginable buying power (currently used for only crypto trading)The 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 outTotal value of cash + holding positions.Real-time MtM value of all the positions held in the accountPrevious sessions close timeUser's buying power under Regulation T (excess equity - (equity - margin value) - * 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 statusIf true, the account is not allowed to place orders.If true, the account is not allowed to place orders.If true, the account is not allowed to request money transfers.Custom user-level configuration overrides for this account.inthashCode()initialMargin(BigDecimal initialMargin) intradayAdjustments(String intradayAdjustments) lastBuyingPower(String lastBuyingPower) lastEquity(BigDecimal lastEquity) lastInitialMargin(String lastInitialMargin) lastLongMarketValue(String lastLongMarketValue) lastMaintenanceMargin(BigDecimal lastMaintenanceMargin) lastOptionsBuyingPower(String lastOptionsBuyingPower) lastRegtBuyingPower(String lastRegtBuyingPower) lastShortMarketValue(String lastShortMarketValue) longMarketValue(BigDecimal longMarketValue) maintenanceMargin(BigDecimal maintenanceMargin) multiplier(BigDecimal multiplier) nonMarginableBuyingPower(BigDecimal nonMarginableBuyingPower) optionsApprovedLevel(TradeAccount.OptionsApprovedLevelEnum optionsApprovedLevel) optionsBuyingPower(BigDecimal optionsBuyingPower) optionsTradingLevel(TradeAccount.OptionsTradingLevelEnum optionsTradingLevel) pendingRegTafFees(String pendingRegTafFees) pendingTransferOut(String pendingTransferOut) portfolioValue(BigDecimal portfolioValue) positionMarketValue(BigDecimal positionMarketValue) previousClose(String previousClose) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.regtBuyingPower(BigDecimal regtBuyingPower) voidsetAccountBlocked(Boolean accountBlocked) voidsetAccountNumber(String accountNumber) voidsetAccruedFees(BigDecimal accruedFees) voidsetAdminConfigurations(AdminConfigurations adminConfigurations) voidsetBalanceAsof(String balanceAsof) voidsetBuyingPower(BigDecimal buyingPower) voidsetCash(BigDecimal cash) voidsetCashTransferable(String cashTransferable) voidsetCashWithdrawable(BigDecimal cashWithdrawable) voidsetClearingBroker(String clearingBroker) voidsetCreatedAt(String createdAt) voidsetCryptoStatus(AccountStatus cryptoStatus) voidsetCurrency(String currency) voidsetEffectiveBuyingPower(BigDecimal effectiveBuyingPower) voidsetEquity(BigDecimal equity) voidvoidsetInitialMargin(BigDecimal initialMargin) voidsetIntradayAdjustments(String intradayAdjustments) voidsetLastBuyingPower(String lastBuyingPower) voidsetLastCash(String lastCash) voidsetLastEquity(BigDecimal lastEquity) voidsetLastInitialMargin(String lastInitialMargin) voidsetLastLongMarketValue(String lastLongMarketValue) voidsetLastMaintenanceMargin(BigDecimal lastMaintenanceMargin) voidsetLastOptionsBuyingPower(String lastOptionsBuyingPower) voidsetLastRegtBuyingPower(String lastRegtBuyingPower) voidsetLastShortMarketValue(String lastShortMarketValue) voidsetLongMarketValue(BigDecimal longMarketValue) voidsetMaintenanceMargin(BigDecimal maintenanceMargin) voidsetMemoposts(String memoposts) voidsetMultiplier(BigDecimal multiplier) voidsetNonMarginableBuyingPower(BigDecimal nonMarginableBuyingPower) voidsetOptionsApprovedLevel(TradeAccount.OptionsApprovedLevelEnum optionsApprovedLevel) voidsetOptionsBuyingPower(BigDecimal optionsBuyingPower) voidsetOptionsTradingLevel(TradeAccount.OptionsTradingLevelEnum optionsTradingLevel) voidsetPendingRegTafFees(String pendingRegTafFees) voidsetPendingTransferOut(String pendingTransferOut) voidsetPortfolioValue(BigDecimal portfolioValue) voidsetPositionMarketValue(BigDecimal positionMarketValue) voidsetPreviousClose(String previousClose) voidsetRegtBuyingPower(BigDecimal regtBuyingPower) voidsetShortingEnabled(Boolean shortingEnabled) voidsetShortMarketValue(BigDecimal shortMarketValue) voidsetSma(BigDecimal sma) voidsetStatus(AccountStatus status) voidsetTradeSuspendedByUser(Boolean tradeSuspendedByUser) voidsetTradingBlocked(Boolean tradingBlocked) voidsetTransfersBlocked(Boolean transfersBlocked) voidsetUserConfigurations(AccountConfigurations userConfigurations) shortingEnabled(Boolean shortingEnabled) shortMarketValue(BigDecimal shortMarketValue) sma(BigDecimal sma) status(AccountStatus status) toJson()Convert an instance of TradeAccount to an JSON stringtoString()tradeSuspendedByUser(Boolean tradeSuspendedByUser) tradingBlocked(Boolean tradingBlocked) transfersBlocked(Boolean transfersBlocked) userConfigurations(AccountConfigurations userConfigurations) 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_ADMIN_CONFIGURATIONS
- See Also:
-
SERIALIZED_NAME_BALANCE_ASOF
- See Also:
-
SERIALIZED_NAME_BUYING_POWER
- See Also:
-
SERIALIZED_NAME_CASH
- See Also:
-
SERIALIZED_NAME_CASH_TRANSFERABLE
- See Also:
-
SERIALIZED_NAME_CASH_WITHDRAWABLE
- See Also:
-
SERIALIZED_NAME_CLEARING_BROKER
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_CRYPTO_STATUS
- See Also:
-
SERIALIZED_NAME_CURRENCY
- See Also:
-
SERIALIZED_NAME_EFFECTIVE_BUYING_POWER
- 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_BUYING_POWER
- See Also:
-
SERIALIZED_NAME_LAST_CASH
- See Also:
-
SERIALIZED_NAME_LAST_EQUITY
- See Also:
-
SERIALIZED_NAME_LAST_INITIAL_MARGIN
- See Also:
-
SERIALIZED_NAME_LAST_LONG_MARKET_VALUE
- See Also:
-
SERIALIZED_NAME_LAST_MAINTENANCE_MARGIN
- See Also:
-
SERIALIZED_NAME_LAST_OPTIONS_BUYING_POWER
- See Also:
-
SERIALIZED_NAME_LAST_REGT_BUYING_POWER
- See Also:
-
SERIALIZED_NAME_LAST_SHORT_MARKET_VALUE
- See Also:
-
SERIALIZED_NAME_LONG_MARKET_VALUE
- See Also:
-
SERIALIZED_NAME_MAINTENANCE_MARGIN
- See Also:
-
SERIALIZED_NAME_MEMOPOSTS
- 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_OUT
- See Also:
-
SERIALIZED_NAME_PORTFOLIO_VALUE
- See Also:
-
SERIALIZED_NAME_POSITION_MARKET_VALUE
- See Also:
-
SERIALIZED_NAME_PREVIOUS_CLOSE
- 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:
-
SERIALIZED_NAME_USER_CONFIGURATIONS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
TradeAccount
public TradeAccount()
-
-
Method Details
-
accountBlocked
-
getAccountBlocked
If true, the account activity by user is prohibited.- Returns:
- accountBlocked
-
setAccountBlocked
-
accountNumber
-
getAccountNumber
The account number- Returns:
- accountNumber
-
setAccountNumber
-
accruedFees
-
getAccruedFees
Accrued fees- Returns:
- accruedFees
-
setAccruedFees
-
adminConfigurations
-
getAdminConfigurations
Get adminConfigurations- Returns:
- adminConfigurations
-
setAdminConfigurations
-
balanceAsof
-
getBalanceAsof
The date of the snapshot for `last_*` fields- Returns:
- balanceAsof
-
setBalanceAsof
-
buyingPower
-
getBuyingPower
Current available cash buying power. If multiplier = 2 then buying_power = max(equity-initial_margin(0) * 2). If multiplier = 1 then buying_power = cash.- Returns:
- buyingPower
-
setBuyingPower
-
cash
-
getCash
Cash balance- Returns:
- cash
-
setCash
-
cashTransferable
-
getCashTransferable
Cash available for transfer (JNLC)- Returns:
- cashTransferable
-
setCashTransferable
-
cashWithdrawable
-
getCashWithdrawable
Cash available for withdrawal- Returns:
- cashWithdrawable
-
setCashWithdrawable
-
clearingBroker
-
getClearingBroker
Clearing broker- Returns:
- clearingBroker
-
setClearingBroker
-
createdAt
-
getCreatedAt
Timestamp this account was created at- Returns:
- createdAt
-
setCreatedAt
-
cryptoStatus
-
getCryptoStatus
Get cryptoStatus- Returns:
- cryptoStatus
-
setCryptoStatus
-
currency
-
getCurrency
Always USD- Returns:
- currency
-
setCurrency
-
effectiveBuyingPower
-
getEffectiveBuyingPower
Effective buying power (duplicate of buying power)- Returns:
- effectiveBuyingPower
-
setEffectiveBuyingPower
-
equity
-
getEquity
cash + long_market_value + short_market_value- Returns:
- equity
-
setEquity
-
id
-
getId
The 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
-
lastBuyingPower
-
getLastBuyingPower
Value of buying_power as of previous trading day at 16:00:00 ET- Returns:
- lastBuyingPower
-
setLastBuyingPower
-
lastCash
-
getLastCash
Value of all cash as of previous trading day at 16:00:00 ET- Returns:
- lastCash
-
setLastCash
-
lastEquity
-
getLastEquity
Equity as of previous trading day at 16:00:00 ET- Returns:
- lastEquity
-
setLastEquity
-
lastInitialMargin
-
getLastInitialMargin
Value of Reg T margin as of previous trading day at 16:00:00 ET- Returns:
- lastInitialMargin
-
setLastInitialMargin
-
lastLongMarketValue
-
getLastLongMarketValue
Value of all long positions as of previous trading day at 16:00:00 ET- Returns:
- lastLongMarketValue
-
setLastLongMarketValue
-
lastMaintenanceMargin
-
getLastMaintenanceMargin
Maintenance margin requirement on the previous trading day- Returns:
- lastMaintenanceMargin
-
setLastMaintenanceMargin
-
lastOptionsBuyingPower
-
getLastOptionsBuyingPower
Value of option buying power as of previous trading day at 16:00:00 ET- Returns:
- lastOptionsBuyingPower
-
setLastOptionsBuyingPower
-
lastRegtBuyingPower
-
getLastRegtBuyingPower
Value of Reg T buying power as of previous trading day at 16:00:00 ET- Returns:
- lastRegtBuyingPower
-
setLastRegtBuyingPower
-
lastShortMarketValue
-
getLastShortMarketValue
Value of all short positions as of previous trading day at 16:00:00 ET- Returns:
- lastShortMarketValue
-
setLastShortMarketValue
-
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
-
memoposts
-
getMemoposts
Outstanding memopost value- Returns:
- memoposts
-
setMemoposts
-
multiplier
-
getMultiplier
\"1\", \"2\", \"3\", or \"4\"- Returns:
- multiplier
-
setMultiplier
-
nonMarginableBuyingPower
-
getNonMarginableBuyingPower
Non-marginable buying power (currently used for only crypto trading)- Returns:
- nonMarginableBuyingPower
-
setNonMarginableBuyingPower
-
optionsApprovedLevel
public TradeAccount optionsApprovedLevel(@Nullable TradeAccount.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 TradeAccount.OptionsApprovedLevelEnum optionsApprovedLevel) -
optionsBuyingPower
-
getOptionsBuyingPower
Your buying power for options trading- Returns:
- optionsBuyingPower
-
setOptionsBuyingPower
-
optionsTradingLevel
public TradeAccount optionsTradingLevel(@Nullable TradeAccount.OptionsTradingLevelEnum 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
public void setOptionsTradingLevel(@Nullable TradeAccount.OptionsTradingLevelEnum optionsTradingLevel) -
pendingRegTafFees
-
getPendingRegTafFees
Pending regulatory fees for the account.- Returns:
- pendingRegTafFees
-
setPendingRegTafFees
-
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
-
positionMarketValue
-
getPositionMarketValue
Real-time MtM value of all the positions held in the account- Returns:
- positionMarketValue
-
setPositionMarketValue
-
previousClose
-
getPreviousClose
Previous sessions close time- Returns:
- previousClose
-
setPreviousClose
-
regtBuyingPower
-
getRegtBuyingPower
User's buying power under Regulation T (excess equity - (equity - margin value) - * 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
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
-
userConfigurations
-
getUserConfigurations
Custom user-level configuration overrides for this account. This field is always present in the response, but its value will be `null` until user-level configurations have been explicitly set for the account.- Returns:
- userConfigurations
-
setUserConfigurations
-
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 TradeAccount 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 TradeAccount
-
fromJson
Create an instance of TradeAccount given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of TradeAccount
- Throws:
IOException- if the JSON string is invalid with respect to TradeAccount
-
toJson
Convert an instance of TradeAccount to an JSON string- Returns:
- JSON string
-