Class OptionBar

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

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

  • Constructor Details

    • OptionBar

      public OptionBar()
  • Method Details

    • c

      public OptionBar c(@Nonnull Double c)
    • getC

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

      public void setC(@Nonnull Double c)
    • h

      public OptionBar h(@Nonnull Double h)
    • getH

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

      public void setH(@Nonnull Double h)
    • l

      public OptionBar l(@Nonnull Double l)
    • getL

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

      public void setL(@Nonnull Double l)
    • n

      public OptionBar 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 OptionBar o(@Nonnull Double o)
    • getO

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

      public void setO(@Nonnull Double o)
    • t

      public OptionBar 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 OptionBar v(@Nonnull Long v)
    • getV

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

      public void setV(@Nonnull Long v)
    • vw

      public OptionBar vw(@Nonnull Double vw)
    • getVw

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

      public void setVw(@Nonnull Double vw)
    • putAdditionalProperty

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

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

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