Class AggregatePositionResponse

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class AggregatePositionResponse extends Object implements Serializable
AggregatePositionResponse
See Also:
  • Field Details

  • Constructor Details

    • AggregatePositionResponse

      public AggregatePositionResponse()
  • Method Details

    • assetType

      public AggregatePositionResponse assetType(@Nullable AssetClass assetType)
    • getAssetType

      @Nullable public AssetClass getAssetType()
      Get assetType
      Returns:
      assetType
    • setAssetType

      public void setAssetType(@Nullable AssetClass assetType)
    • closingPrice

      public AggregatePositionResponse closingPrice(@Nullable BigDecimal closingPrice)
    • getClosingPrice

      @Nullable public BigDecimal getClosingPrice()
      EOD asset price per share at session close
      Returns:
      closingPrice
    • setClosingPrice

      public void setClosingPrice(@Nullable BigDecimal closingPrice)
    • cusip

      public AggregatePositionResponse cusip(@Nullable BigDecimal cusip)
    • getCusip

      @Nullable public BigDecimal getCusip()
      Cusip (9 digits, can start with 0's)
      Returns:
      cusip
    • setCusip

      public void setCusip(@Nullable BigDecimal cusip)
    • longMarketValue

      public AggregatePositionResponse longMarketValue(@Nullable BigDecimal longMarketValue)
    • getLongMarketValue

      @Nullable public BigDecimal getLongMarketValue()
      Aggregate notional dollar amount of the partner's long positions
      Returns:
      longMarketValue
    • setLongMarketValue

      public void setLongMarketValue(@Nullable BigDecimal longMarketValue)
    • longQty

      public AggregatePositionResponse longQty(@Nullable BigDecimal longQty)
    • getLongQty

      @Nullable public BigDecimal getLongQty()
      Aggregate number of shares that the partner is long
      Returns:
      longQty
    • setLongQty

      public void setLongQty(@Nullable BigDecimal longQty)
    • numAccounts

      public AggregatePositionResponse numAccounts(@Nullable Integer numAccounts)
    • getNumAccounts

      @Nullable public Integer getNumAccounts()
      Number of accounts that have a position in this asset (either long or short)
      Returns:
      numAccounts
    • setNumAccounts

      public void setNumAccounts(@Nullable Integer numAccounts)
    • shortMarketValue

      public AggregatePositionResponse shortMarketValue(@Nullable BigDecimal shortMarketValue)
    • getShortMarketValue

      @Nullable public BigDecimal getShortMarketValue()
      Aggregate notional dollar amount of the partner's short positions
      Returns:
      shortMarketValue
    • setShortMarketValue

      public void setShortMarketValue(@Nullable BigDecimal shortMarketValue)
    • shortQty

      public AggregatePositionResponse shortQty(@Nullable BigDecimal shortQty)
    • getShortQty

      @Nullable public BigDecimal getShortQty()
      Aggregate number of shares that the partner is short
      Returns:
      shortQty
    • setShortQty

      public void setShortQty(@Nullable BigDecimal shortQty)
    • symbol

      public AggregatePositionResponse symbol(@Nullable String symbol)
    • getSymbol

      @Nullable public String getSymbol()
      Symbol of asset
      Returns:
      symbol
    • setSymbol

      public void setSymbol(@Nullable String symbol)
    • putAdditionalProperty

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

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

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