Class TradeUpdateEventV2Leg

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class TradeUpdateEventV2Leg extends Object implements Serializable
Represents filled qty/price of legs.
See Also:
  • Field Details

  • Constructor Details

    • TradeUpdateEventV2Leg

      public TradeUpdateEventV2Leg()
  • Method Details

    • executionId

      public TradeUpdateEventV2Leg executionId(@Nullable UUID executionId)
    • getExecutionId

      @Nullable public UUID getExecutionId()
      Corresponding execution of an order. If an order gets filled over two executions (a partial_fill for example), you will receive two events with different IDs.
      Returns:
      executionId
    • setExecutionId

      public void setExecutionId(@Nullable UUID executionId)
    • orderId

      public TradeUpdateEventV2Leg orderId(@Nullable UUID orderId)
    • getOrderId

      @Nullable public UUID getOrderId()
      Order UUID
      Returns:
      orderId
    • setOrderId

      public void setOrderId(@Nullable UUID orderId)
    • price

      public TradeUpdateEventV2Leg price(@Nullable String price)
    • getPrice

      @Nullable public String getPrice()
      The average price per share for this event.
      Returns:
      price
    • setPrice

      public void setPrice(@Nullable String price)
    • qty

      public TradeUpdateEventV2Leg qty(@Nullable String qty)
    • getQty

      @Nullable public String getQty()
      The amount of shares filled for this event
      Returns:
      qty
    • setQty

      public void setQty(@Nullable String qty)
    • symbol

      public TradeUpdateEventV2Leg symbol(@Nullable String symbol)
    • getSymbol

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

      public void setSymbol(@Nullable String symbol)
    • timestamp

      public TradeUpdateEventV2Leg timestamp(@Nullable OffsetDateTime timestamp)
    • getTimestamp

      @Nullable public OffsetDateTime getTimestamp()
      Timestamp of this event leg
      Returns:
      timestamp
    • setTimestamp

      public void setTimestamp(@Nullable OffsetDateTime timestamp)
    • putAdditionalProperty

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

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

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