Class USDPositionValues
java.lang.Object
markets.alpaca.client.openapi.trading.model.USDPositionValues
- All Implemented Interfaces:
Serializable
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class USDPositionValues
extends Object
implements Serializable
Position values in USD. This is returned for LCT (non-USD) accounts only.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavgEntryPrice(BigDecimal avgEntryPrice) changeToday(BigDecimal changeToday) costBasis(BigDecimal costBasis) currentPrice(BigDecimal currentPrice) booleanstatic USDPositionValuesCreate an instance of USDPositionValues given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Average entry price of the position in USDPercent change from last day price (by a factor of 1)Total cost basis in USDCurrent asset price per share in USDLast day's asset price per share based on the closing value of the last trading day in USDTotal market value of the position in USDUnrealized profit/loss in USD for the dayUnrealized intraday profit/loss percent (by a factor of 1)Unrealized profit/loss in USDUnrealized profit/loss percent (by a factor of 1)inthashCode()lastdayPrice(BigDecimal lastdayPrice) marketValue(BigDecimal marketValue) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.voidsetAvgEntryPrice(BigDecimal avgEntryPrice) voidsetChangeToday(BigDecimal changeToday) voidsetCostBasis(BigDecimal costBasis) voidsetCurrentPrice(BigDecimal currentPrice) voidsetLastdayPrice(BigDecimal lastdayPrice) voidsetMarketValue(BigDecimal marketValue) voidsetUnrealizedIntradayPl(BigDecimal unrealizedIntradayPl) voidsetUnrealizedIntradayPlpc(BigDecimal unrealizedIntradayPlpc) voidsetUnrealizedPl(BigDecimal unrealizedPl) voidsetUnrealizedPlpc(BigDecimal unrealizedPlpc) toJson()Convert an instance of USDPositionValues to an JSON stringtoString()unrealizedIntradayPl(BigDecimal unrealizedIntradayPl) unrealizedIntradayPlpc(BigDecimal unrealizedIntradayPlpc) unrealizedPl(BigDecimal unrealizedPl) unrealizedPlpc(BigDecimal unrealizedPlpc) static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_AVG_ENTRY_PRICE
- See Also:
-
SERIALIZED_NAME_CHANGE_TODAY
- See Also:
-
SERIALIZED_NAME_COST_BASIS
- See Also:
-
SERIALIZED_NAME_CURRENT_PRICE
- See Also:
-
SERIALIZED_NAME_LASTDAY_PRICE
- See Also:
-
SERIALIZED_NAME_MARKET_VALUE
- See Also:
-
SERIALIZED_NAME_UNREALIZED_INTRADAY_PL
- See Also:
-
SERIALIZED_NAME_UNREALIZED_INTRADAY_PLPC
- See Also:
-
SERIALIZED_NAME_UNREALIZED_PL
- See Also:
-
SERIALIZED_NAME_UNREALIZED_PLPC
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
USDPositionValues
public USDPositionValues()
-
-
Method Details
-
avgEntryPrice
-
getAvgEntryPrice
Average entry price of the position in USD- Returns:
- avgEntryPrice
-
setAvgEntryPrice
-
changeToday
-
getChangeToday
Percent change from last day price (by a factor of 1)- Returns:
- changeToday
-
setChangeToday
-
costBasis
-
getCostBasis
Total cost basis in USD- Returns:
- costBasis
-
setCostBasis
-
currentPrice
-
getCurrentPrice
Current asset price per share in USD- Returns:
- currentPrice
-
setCurrentPrice
-
lastdayPrice
-
getLastdayPrice
Last day's asset price per share based on the closing value of the last trading day in USD- Returns:
- lastdayPrice
-
setLastdayPrice
-
marketValue
-
getMarketValue
Total market value of the position in USD- Returns:
- marketValue
-
setMarketValue
-
unrealizedIntradayPl
-
getUnrealizedIntradayPl
Unrealized profit/loss in USD for the day- Returns:
- unrealizedIntradayPl
-
setUnrealizedIntradayPl
-
unrealizedIntradayPlpc
-
getUnrealizedIntradayPlpc
Unrealized intraday profit/loss percent (by a factor of 1)- Returns:
- unrealizedIntradayPlpc
-
setUnrealizedIntradayPlpc
-
unrealizedPl
-
getUnrealizedPl
Unrealized profit/loss in USD- Returns:
- unrealizedPl
-
setUnrealizedPl
-
unrealizedPlpc
-
getUnrealizedPlpc
Unrealized profit/loss percent (by a factor of 1)- Returns:
- unrealizedPlpc
-
setUnrealizedPlpc
-
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 USDPositionValues 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 USDPositionValues
-
fromJson
Create an instance of USDPositionValues given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of USDPositionValues
- Throws:
IOException- if the JSON string is invalid with respect to USDPositionValues
-
toJson
Convert an instance of USDPositionValues to an JSON string- Returns:
- JSON string
-