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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class StockBar extends Object implements Serializable
OHLC aggregate of all the trades in a given interval.
See Also:
  • Field Details

  • Constructor Details

    • StockBar

      public StockBar()
  • Method Details

    • c

      public StockBar c(@Nonnull Double c)
    • getC

      @Nonnull public Double getC()
      Closing price.
      Returns:
      c
    • setC

      public void setC(@Nonnull Double c)
    • h

      public StockBar h(@Nonnull Double h)
    • getH

      @Nonnull public Double getH()
      High price.
      Returns:
      h
    • setH

      public void setH(@Nonnull Double h)
    • l

      public StockBar l(@Nonnull Double l)
    • getL

      @Nonnull public Double getL()
      Low price.
      Returns:
      l
    • setL

      public void setL(@Nonnull Double l)
    • n

      public StockBar n(@Nonnull Long n)
    • getN

      @Nonnull public Long getN()
      Trade count in the bar.
      Returns:
      n
    • setN

      public void setN(@Nonnull Long n)
    • o

      public StockBar o(@Nonnull Double o)
    • getO

      @Nonnull public Double getO()
      Opening price.
      Returns:
      o
    • setO

      public void setO(@Nonnull Double o)
    • t

      public StockBar 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)
    • v

      public StockBar v(@Nonnull Long v)
    • getV

      @Nonnull public Long getV()
      Bar volume.
      Returns:
      v
    • setV

      public void setV(@Nonnull Long v)
    • vw

      public StockBar vw(@Nonnull Double vw)
    • getVw

      @Nonnull public Double getVw()
      Volume weighted average price.
      Returns:
      vw
    • setVw

      public void setVw(@Nonnull Double vw)
    • putAdditionalProperty

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

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

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