Class OptionSnapshot

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class OptionSnapshot extends Object implements Serializable
A snapshot provides the latest trade and latest quote.
See Also:
  • Field Details

  • Constructor Details

    • OptionSnapshot

      public OptionSnapshot()
  • Method Details

    • dailyBar

      public OptionSnapshot dailyBar(@Nullable OptionBar dailyBar)
    • getDailyBar

      @Nullable public OptionBar getDailyBar()
      Get dailyBar
      Returns:
      dailyBar
    • setDailyBar

      public void setDailyBar(@Nullable OptionBar dailyBar)
    • greeks

      public OptionSnapshot greeks(@Nullable OptionGreeks greeks)
    • getGreeks

      @Nullable public OptionGreeks getGreeks()
      Get greeks
      Returns:
      greeks
    • setGreeks

      public void setGreeks(@Nullable OptionGreeks greeks)
    • impliedVolatility

      public OptionSnapshot impliedVolatility(@Nullable Double impliedVolatility)
    • getImpliedVolatility

      @Nullable public Double getImpliedVolatility()
      Implied volatility calculated using the Black-Scholes model.
      Returns:
      impliedVolatility
    • setImpliedVolatility

      public void setImpliedVolatility(@Nullable Double impliedVolatility)
    • latestQuote

      public OptionSnapshot latestQuote(@Nullable OptionQuote latestQuote)
    • getLatestQuote

      @Nullable public OptionQuote getLatestQuote()
      Get latestQuote
      Returns:
      latestQuote
    • setLatestQuote

      public void setLatestQuote(@Nullable OptionQuote latestQuote)
    • latestTrade

      public OptionSnapshot latestTrade(@Nullable OptionTrade latestTrade)
    • getLatestTrade

      @Nullable public OptionTrade getLatestTrade()
      Get latestTrade
      Returns:
      latestTrade
    • setLatestTrade

      public void setLatestTrade(@Nullable OptionTrade latestTrade)
    • minuteBar

      public OptionSnapshot minuteBar(@Nullable OptionBar minuteBar)
    • getMinuteBar

      @Nullable public OptionBar getMinuteBar()
      Get minuteBar
      Returns:
      minuteBar
    • setMinuteBar

      public void setMinuteBar(@Nullable OptionBar minuteBar)
    • prevDailyBar

      public OptionSnapshot prevDailyBar(@Nullable OptionBar prevDailyBar)
    • getPrevDailyBar

      @Nullable public OptionBar getPrevDailyBar()
      Get prevDailyBar
      Returns:
      prevDailyBar
    • setPrevDailyBar

      public void setPrevDailyBar(@Nullable OptionBar prevDailyBar)
    • putAdditionalProperty

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

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

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