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

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

  • Constructor Details

    • Activity

      public Activity()
  • Method Details

    • accountId

      public Activity accountId(@Nullable UUID accountId)
    • getAccountId

      @Nullable public UUID getAccountId()
      Get accountId
      Returns:
      accountId
    • setAccountId

      public void setAccountId(@Nullable UUID accountId)
    • activityType

      public Activity activityType(@Nonnull ActivityType activityType)
    • getActivityType

      @Nonnull public ActivityType getActivityType()
      Get activityType
      Returns:
      activityType
    • setActivityType

      public void setActivityType(@Nonnull ActivityType activityType)
    • id

      public Activity id(@Nonnull String id)
    • getId

      @Nonnull public String getId()
      Get id
      Returns:
      id
    • setId

      public void setId(@Nonnull String id)
    • cumQty

      public Activity cumQty(@Nullable BigDecimal cumQty)
    • getCumQty

      @Nullable public BigDecimal getCumQty()
      Valid only for trading activity types. Null for non-trading activites.
      Returns:
      cumQty
    • setCumQty

      public void setCumQty(@Nullable BigDecimal cumQty)
    • leavesQty

      public Activity leavesQty(@Nullable BigDecimal leavesQty)
    • getLeavesQty

      @Nullable public BigDecimal getLeavesQty()
      Valid only for trading activity types. Null for non-trading activites.
      Returns:
      leavesQty
    • setLeavesQty

      public void setLeavesQty(@Nullable BigDecimal leavesQty)
    • orderId

      public Activity orderId(@Nullable UUID orderId)
    • getOrderId

      @Nullable public UUID getOrderId()
      Valid only for trading activity types. Null for non-trading activites.
      Returns:
      orderId
    • setOrderId

      public void setOrderId(@Nullable UUID orderId)
    • orderStatus

      public Activity orderStatus(@Nullable OrderStatus orderStatus)
    • getOrderStatus

      @Nullable public OrderStatus getOrderStatus()
      Get orderStatus
      Returns:
      orderStatus
    • setOrderStatus

      public void setOrderStatus(@Nullable OrderStatus orderStatus)
    • price

      public Activity price(@Nullable BigDecimal price)
    • getPrice

      @Nullable public BigDecimal getPrice()
      Valid only for trading activity types. Null for non-trading activites.
      Returns:
      price
    • setPrice

      public void setPrice(@Nullable BigDecimal price)
    • qty

      public Activity qty(@Nullable BigDecimal qty)
    • getQty

      @Nullable public BigDecimal getQty()
      Valid only for non-trading activity types. Null for trading activites.
      Returns:
      qty
    • setQty

      public void setQty(@Nullable BigDecimal qty)
    • side

      public Activity side(@Nullable OrderSide side)
    • getSide

      @Nullable public OrderSide getSide()
      Get side
      Returns:
      side
    • setSide

      public void setSide(@Nullable OrderSide side)
    • symbol

      public Activity symbol(@Nullable String symbol)
    • getSymbol

      @Nullable public String getSymbol()
      Valid only for non-trading activity types. Null for trading activites.
      Returns:
      symbol
    • setSymbol

      public void setSymbol(@Nullable String symbol)
    • transactionTime

      public Activity transactionTime(@Nullable OffsetDateTime transactionTime)
    • getTransactionTime

      @Nullable public OffsetDateTime getTransactionTime()
      Valid only for trading activity types. Null for non-trading activites.
      Returns:
      transactionTime
    • setTransactionTime

      public void setTransactionTime(@Nullable OffsetDateTime transactionTime)
    • type

      public Activity type(@Nullable Activity.TypeEnum type)
    • getType

      @Nullable public Activity.TypeEnum getType()
      Valid only for trading activity types. Null for non-trading activites.
      Returns:
      type
    • setType

      public void setType(@Nullable Activity.TypeEnum type)
    • activitySubType

      public Activity activitySubType(@Nullable String activitySubType)
    • getActivitySubType

      @Nullable public String getActivitySubType()
      Represents a more specific classification to the `activity_type`. This field is optional and may not always be populated, depending on the activity type and the available data. Each `activity_type` has a set of valid `activity_sub_type` values. Full mapping of `activity_type` to `activity_sub_type`: - **DIV**: Dividend activity sub-types: - **CDIV**: Cash Dividend - **SDIV**: Stock Dividend - **SPD**: Substitute Payment In Lieu Of Dividend - **FEE**: Fee-related activity sub-types: - **REG**: Regulatory Fee - **TAF**: Trading Activity Fee - **LCT**: Local Currency Trading Fee - **ORF**: Options Regulatory Fee - **OCC**: Options Clearing Corporation Fee - **NRC**: Non-Retail Commission Fee - **NRV**: Non-Retail Venue Fee - **COM**: Commission - **CAT**: Consolidated Audit Trail Fee - **INT**: Interest-related activity sub-types: - **MGN**: Margin Interest - **CDT**: Credit Interest - **SWP**: Sweep Interest - **QII**: Qualified Interest - **MA**: Merger and Acquisition activity sub-types: - **CMA**: Cash Merger - **SMA**: Stock Merger - **SCMA**: Stock & Cash Merger - **NC**: Name Change activity sub types - **SNC**: Symbol Name Change - **CNC**: CUSIP Name Change - **SCNC**: Symbol & CUSIP Name Change - **OPCA**: Option Corporate Action activity sub-types: - **DIV.CDIV**: Cash Dividend - **DIV.SDIV**: Stock Dividend - **MA.CMA**: Cash Merger - **MA.SMA**: Stock Merger - **MA.SCMA**: Stock & Cash Merger - **NC.CNC**: CUSIP Name Change - **NC.SNC**: Symbol Name Change - **NC.SCNC**: Symbol & CUSIP Name Change - **SPIN**: Spin-off - **SPLIT.FSPLIT**: Forward Stock Split - **SPLIT.RSPLIT**: Reverse Stock Split - **SPLIT.USPLIT**: Unit Split - **REORG**: Reorganization activity sub-types: - **WRM**: Worthless Removal - **SPLIT**: Stock Split activity sub-types: - **FSPLIT**: Forward Stock Split - **RSPLIT**: Reverse Stock Split - **USPLIT**: Unit Split - **VOF**: Voluntary Offering activity sub-types: - **VTND**: Tender Offer - **VWRT**: Warrant Exercise - **VRGT**: Rights Offer - **VEXH**: Exchange Offer - **WH**: Withholding activity sub-types: - **SWH**: State Withholding - **FWH**: Federal Withholding - **SLWH**: Sales Withholding
      Returns:
      activitySubType
    • setActivitySubType

      public void setActivitySubType(@Nullable String activitySubType)
    • createdAt

      public Activity createdAt(@Nullable OffsetDateTime createdAt)
    • getCreatedAt

      @Nullable public OffsetDateTime getCreatedAt()
      Valid only for non-trading activity types. Null for trading activites.
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nullable OffsetDateTime createdAt)
    • currency

      public Activity currency(@Nullable String currency)
    • getCurrency

      @Nullable public String getCurrency()
      Currency denomination of the activity. USD by default.
      Returns:
      currency
    • setCurrency

      public void setCurrency(@Nullable String currency)
    • cusip

      public Activity cusip(@Nullable String cusip)
    • getCusip

      @Nullable public String getCusip()
      Valid only for non-trading activity types. Null for trading activites.
      Returns:
      cusip
    • setCusip

      public void setCusip(@Nullable String cusip)
    • date

      public Activity date(@Nullable LocalDate date)
    • getDate

      @Nullable public LocalDate getDate()
      Valid only for non-trading activity types. Null for trading activites.
      Returns:
      date
    • setDate

      public void setDate(@Nullable LocalDate date)
    • description

      public Activity description(@Nullable String description)
    • getDescription

      @Nullable public String getDescription()
      Valid only for non-trading activity types. Null for trading activites.
      Returns:
      description
    • setDescription

      public void setDescription(@Nullable String description)
    • groupId

      public Activity groupId(@Nullable UUID groupId)
    • getGroupId

      @Nullable public UUID getGroupId()
      ID used to link activities who share a sibling relationship
      Returns:
      groupId
    • setGroupId

      public void setGroupId(@Nullable UUID groupId)
    • netAmount

      public Activity netAmount(@Nullable BigDecimal netAmount)
    • getNetAmount

      @Nullable public BigDecimal getNetAmount()
      Valid only for non-trading activity types. Null for trading activites.
      Returns:
      netAmount
    • setNetAmount

      public void setNetAmount(@Nullable BigDecimal netAmount)
    • perShareAmount

      public Activity perShareAmount(@Nullable BigDecimal perShareAmount)
    • getPerShareAmount

      @Nullable public BigDecimal getPerShareAmount()
      Valid only for non-trading activity types. Null for trading activites.
      Returns:
      perShareAmount
    • setPerShareAmount

      public void setPerShareAmount(@Nullable BigDecimal perShareAmount)
    • status

      public Activity status(@Nullable Activity.StatusEnum status)
    • getStatus

      @Nullable public Activity.StatusEnum getStatus()
      Valid only for non-trading activity types. Null for trading activites.
      Returns:
      status
    • setStatus

      public void setStatus(@Nullable Activity.StatusEnum status)
    • putAdditionalProperty

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

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

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