Class ActivityEventV2

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class ActivityEventV2 extends Object implements Serializable
Represents an account activity, sent over the Event Streaming API.
See Also:
  • Field Details

  • Constructor Details

    • ActivityEventV2

      public ActivityEventV2()
  • Method Details

    • accountId

      public ActivityEventV2 accountId(@Nonnull UUID accountId)
    • getAccountId

      @Nonnull public UUID getAccountId()
      Account UUID
      Returns:
      accountId
    • setAccountId

      public void setAccountId(@Nonnull UUID accountId)
    • activitySubtype

      public ActivityEventV2 activitySubtype(@Nullable String activitySubtype)
    • getActivitySubtype

      @Nullable public String getActivitySubtype()
      Sub category for activity type, if any
      Returns:
      activitySubtype
    • setActivitySubtype

      public void setActivitySubtype(@Nullable String activitySubtype)
    • activityType

      public ActivityEventV2 activityType(@Nonnull String activityType)
    • getActivityType

      @Nonnull public String getActivityType()
      The type of the activity, which can be trade or any of the non trade activities
      Returns:
      activityType
    • setActivityType

      public void setActivityType(@Nonnull String activityType)
    • at

      public ActivityEventV2 at(@Nonnull OffsetDateTime at)
    • getAt

      @Nonnull public OffsetDateTime getAt()
      Timestamp of event
      Returns:
      at
    • setAt

      public void setAt(@Nonnull OffsetDateTime at)
    • currency

      public ActivityEventV2 currency(@Nonnull String currency)
    • getCurrency

      @Nonnull public String getCurrency()
      Currency code in ISO format
      Returns:
      currency
    • setCurrency

      public void setCurrency(@Nonnull String currency)
    • eventId

      public ActivityEventV2 eventId(@Nonnull String eventId)
    • getEventId

      @Nonnull public String getEventId()
      Lexically sortable, monotonically increasing character string
      Returns:
      eventId
    • setEventId

      public void setEventId(@Nonnull String eventId)
    • executedAt

      public ActivityEventV2 executedAt(@Nonnull OffsetDateTime executedAt)
    • getExecutedAt

      @Nonnull public OffsetDateTime getExecutedAt()
      Execution time for the activity event
      Returns:
      executedAt
    • setExecutedAt

      public void setExecutedAt(@Nonnull OffsetDateTime executedAt)
    • netAmount

      public ActivityEventV2 netAmount(@Nullable BigDecimal netAmount)
    • getNetAmount

      @Nullable public BigDecimal getNetAmount()
      The net amount of money (positive or negative) associated with the activity
      Returns:
      netAmount
    • setNetAmount

      public void setNetAmount(@Nullable BigDecimal netAmount)
    • previousId

      public ActivityEventV2 previousId(@Nullable UUID previousId)
    • getPreviousId

      @Nullable public UUID getPreviousId()
      Previous ID is presented if this activity corrects or cancels a previous trade or non trade activity. It contains execution_id or trns_id respectively
      Returns:
      previousId
    • setPreviousId

      public void setPreviousId(@Nullable UUID previousId)
    • price

      public ActivityEventV2 price(@Nullable BigDecimal price)
    • getPrice

      @Nullable public BigDecimal getPrice()
      The price of the security involved with the activity
      Returns:
      price
    • setPrice

      public void setPrice(@Nullable BigDecimal price)
    • qty

      public ActivityEventV2 qty(@Nullable BigDecimal qty)
    • getQty

      @Nullable public BigDecimal getQty()
      The quantity of the security involved with the activity
      Returns:
      qty
    • setQty

      public void setQty(@Nullable BigDecimal qty)
    • refId

      public ActivityEventV2 refId(@Nonnull UUID refId)
    • getRefId

      @Nonnull public UUID getRefId()
      The unique identifier for the activity. For trades, the execution_id is used, for other activities the trns_id is used.
      Returns:
      refId
    • setRefId

      public void setRefId(@Nonnull UUID refId)
    • settleDate

      public ActivityEventV2 settleDate(@Nonnull LocalDate settleDate)
    • getSettleDate

      @Nonnull public LocalDate getSettleDate()
      Date when the activity settled
      Returns:
      settleDate
    • setSettleDate

      public void setSettleDate(@Nonnull LocalDate settleDate)
    • status

      public ActivityEventV2 status(@Nonnull String status)
    • getStatus

      @Nonnull public String getStatus()
      Status of the activity
      Returns:
      status
    • setStatus

      public void setStatus(@Nonnull String status)
    • swapFeeBps

      public ActivityEventV2 swapFeeBps(@Nullable BigDecimal swapFeeBps)
    • getSwapFeeBps

      @Nullable public BigDecimal getSwapFeeBps()
      Currency conversion fee rate base-point in case of local currency activity
      Returns:
      swapFeeBps
    • setSwapFeeBps

      public void setSwapFeeBps(@Nullable BigDecimal swapFeeBps)
    • swapRate

      public ActivityEventV2 swapRate(@Nullable BigDecimal swapRate)
    • getSwapRate

      @Nullable public BigDecimal getSwapRate()
      Conversion rate for local currency activities
      Returns:
      swapRate
    • setSwapRate

      public void setSwapRate(@Nullable BigDecimal swapRate)
    • details

      public ActivityEventV2 details(@Nonnull ActivityEventV2AllOfDetails details)
    • getDetails

      @Nonnull public ActivityEventV2AllOfDetails getDetails()
      Get details
      Returns:
      details
    • setDetails

      public void setDetails(@Nonnull ActivityEventV2AllOfDetails details)
    • putAdditionalProperty

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

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

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