Class USDPosition

java.lang.Object
markets.alpaca.client.openapi.broker.model.USDPosition
All Implemented Interfaces:
Serializable

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class USDPosition extends Object implements Serializable
Position values in USD. This is returned for LCT (non-USD) accounts only.
See Also:
  • Field Details

  • Constructor Details

    • USDPosition

      public USDPosition()
  • Method Details

    • avgEntryPrice

      public USDPosition avgEntryPrice(@Nullable BigDecimal avgEntryPrice)
    • getAvgEntryPrice

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

      public void setAvgEntryPrice(@Nullable BigDecimal avgEntryPrice)
    • changeToday

      public USDPosition 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 USDPosition costBasis(@Nullable BigDecimal costBasis)
    • getCostBasis

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

      public void setCostBasis(@Nullable BigDecimal costBasis)
    • currentPrice

      public USDPosition 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 USDPosition 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 USDPosition 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 USDPosition 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 USDPosition unrealizedIntradayPlpc(@Nullable BigDecimal unrealizedIntradayPlpc)
    • getUnrealizedIntradayPlpc

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

      public void setUnrealizedIntradayPlpc(@Nullable BigDecimal unrealizedIntradayPlpc)
    • unrealizedPl

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

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

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