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:
  • Field Details

  • Constructor Details

    • USDPositionValues

      public USDPositionValues()
  • Method Details

    • avgEntryPrice

      public USDPositionValues avgEntryPrice(@Nonnull BigDecimal avgEntryPrice)
    • getAvgEntryPrice

      @Nonnull public BigDecimal getAvgEntryPrice()
      Average entry price of the position in USD
      Returns:
      avgEntryPrice
    • setAvgEntryPrice

      public void setAvgEntryPrice(@Nonnull BigDecimal avgEntryPrice)
    • changeToday

      public USDPositionValues changeToday(@Nullable BigDecimal changeToday)
    • getChangeToday

      @Nullable public BigDecimal getChangeToday()
      Percent change from last day price (by a factor of 1)
      Returns:
      changeToday
    • setChangeToday

      public void setChangeToday(@Nullable BigDecimal changeToday)
    • costBasis

      public USDPositionValues costBasis(@Nonnull BigDecimal costBasis)
    • getCostBasis

      @Nonnull public BigDecimal getCostBasis()
      Total cost basis in USD
      Returns:
      costBasis
    • setCostBasis

      public void setCostBasis(@Nonnull BigDecimal costBasis)
    • currentPrice

      public USDPositionValues currentPrice(@Nullable BigDecimal currentPrice)
    • getCurrentPrice

      @Nullable public BigDecimal getCurrentPrice()
      Current asset price per share in USD
      Returns:
      currentPrice
    • setCurrentPrice

      public void setCurrentPrice(@Nullable BigDecimal currentPrice)
    • lastdayPrice

      public USDPositionValues lastdayPrice(@Nullable BigDecimal lastdayPrice)
    • getLastdayPrice

      @Nullable public BigDecimal getLastdayPrice()
      Last day's asset price per share based on the closing value of the last trading day in USD
      Returns:
      lastdayPrice
    • setLastdayPrice

      public void setLastdayPrice(@Nullable BigDecimal lastdayPrice)
    • marketValue

      public USDPositionValues marketValue(@Nullable BigDecimal marketValue)
    • getMarketValue

      @Nullable public BigDecimal getMarketValue()
      Total market value of the position in USD
      Returns:
      marketValue
    • setMarketValue

      public void setMarketValue(@Nullable BigDecimal marketValue)
    • unrealizedIntradayPl

      public USDPositionValues unrealizedIntradayPl(@Nullable BigDecimal unrealizedIntradayPl)
    • getUnrealizedIntradayPl

      @Nullable public BigDecimal getUnrealizedIntradayPl()
      Unrealized profit/loss in USD for the day
      Returns:
      unrealizedIntradayPl
    • setUnrealizedIntradayPl

      public void setUnrealizedIntradayPl(@Nullable BigDecimal unrealizedIntradayPl)
    • unrealizedIntradayPlpc

      public USDPositionValues unrealizedIntradayPlpc(@Nullable BigDecimal unrealizedIntradayPlpc)
    • getUnrealizedIntradayPlpc

      @Nullable public BigDecimal getUnrealizedIntradayPlpc()
      Unrealized intraday profit/loss percent (by a factor of 1)
      Returns:
      unrealizedIntradayPlpc
    • setUnrealizedIntradayPlpc

      public void setUnrealizedIntradayPlpc(@Nullable BigDecimal unrealizedIntradayPlpc)
    • unrealizedPl

      public USDPositionValues unrealizedPl(@Nullable BigDecimal unrealizedPl)
    • getUnrealizedPl

      @Nullable public BigDecimal getUnrealizedPl()
      Unrealized profit/loss in USD
      Returns:
      unrealizedPl
    • setUnrealizedPl

      public void setUnrealizedPl(@Nullable BigDecimal unrealizedPl)
    • unrealizedPlpc

      public USDPositionValues unrealizedPlpc(@Nullable BigDecimal unrealizedPlpc)
    • getUnrealizedPlpc

      @Nullable public BigDecimal getUnrealizedPlpc()
      Unrealized profit/loss percent (by a factor of 1)
      Returns:
      unrealizedPlpc
    • setUnrealizedPlpc

      public void setUnrealizedPlpc(@Nullable BigDecimal unrealizedPlpc)
    • putAdditionalProperty

      public USDPositionValues 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 USDPositionValues 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 USDPositionValues
    • fromJson

      public static USDPositionValues fromJson(String jsonString) throws IOException
      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

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