Class StockTrade

java.lang.Object
markets.alpaca.client.openapi.data.model.StockTrade
All Implemented Interfaces:
Serializable

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

  • Constructor Details

    • StockTrade

      public StockTrade()
  • Method Details

    • c

      public StockTrade c(@Nonnull List<String> c)
    • addCItem

      public StockTrade addCItem(String cItem)
    • getC

      @Nonnull public List<String> getC()
      Condition flags. See `v2/stocks/meta/conditions/trade` for more details.
      Returns:
      c
    • setC

      public void setC(@Nonnull List<String> c)
    • i

      public StockTrade i(@Nonnull Integer i)
    • getI

      @Nonnull public Integer getI()
      Trade ID sent by the exchange.
      Returns:
      i
    • setI

      public void setI(@Nonnull Integer i)
    • p

      public StockTrade p(@Nonnull Double p)
    • getP

      @Nonnull public Double getP()
      Trade price.
      Returns:
      p
    • setP

      public void setP(@Nonnull Double p)
    • s

      public StockTrade s(@Nonnull Integer s)
    • getS

      @Nonnull public Integer getS()
      Trade size.
      Returns:
      s
    • setS

      public void setS(@Nonnull Integer s)
    • t

      public StockTrade t(@Nonnull OffsetDateTime t)
    • getT

      @Nonnull public OffsetDateTime getT()
      Timestamp in RFC-3339 format with nanosecond precision.
      Returns:
      t
    • setT

      public void setT(@Nonnull OffsetDateTime t)
    • u

      public StockTrade u(@Nullable String u)
    • getU

      @Nullable public String getU()
      Update to the trade. This field is optional, if it's missing, the trade is valid. Otherwise, it can have these values: - canceled: indicates that the trade has been canceled - incorrect: indicates that the trade has been corrected and the given trade is no longer valid - corrected: indicates that this trade is the correction of a previous (incorrect) trade
      Returns:
      u
    • setU

      public void setU(@Nullable String u)
    • x

      public StockTrade x(@Nonnull String x)
    • getX

      @Nonnull public String getX()
      Exchange code. See `v2/stocks/meta/exchanges` for more details.
      Returns:
      x
    • setX

      public void setX(@Nonnull String x)
    • z

      public StockTrade z(@Nonnull StockTape z)
    • getZ

      @Nonnull public StockTape getZ()
      Get z
      Returns:
      z
    • setZ

      public void setZ(@Nonnull StockTape z)
    • putAdditionalProperty

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

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

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