Class CryptoBar

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

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

  • Constructor Details

    • CryptoBar

      public CryptoBar()
  • Method Details

    • c

      public CryptoBar c(@Nonnull Double c)
    • getC

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

      public void setC(@Nonnull Double c)
    • h

      public CryptoBar h(@Nonnull Double h)
    • getH

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

      public void setH(@Nonnull Double h)
    • l

      public CryptoBar l(@Nonnull Double l)
    • getL

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

      public void setL(@Nonnull Double l)
    • n

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

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

      public void setO(@Nonnull Double o)
    • t

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

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

      public void setV(@Nonnull Double v)
    • vw

      public CryptoBar vw(@Nonnull Double vw)
    • getVw

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

      public void setVw(@Nonnull Double vw)
    • putAdditionalProperty

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

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

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