Class OptionContract

java.lang.Object
markets.alpaca.client.openapi.trading.model.OptionContract
All Implemented Interfaces:
Serializable

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

  • Constructor Details

    • OptionContract

      public OptionContract()
  • Method Details

    • closePrice

      public OptionContract closePrice(@Nullable String closePrice)
    • getClosePrice

      @Nullable public String getClosePrice()
      The close price of the option contract.
      Returns:
      closePrice
    • setClosePrice

      public void setClosePrice(@Nullable String closePrice)
    • closePriceDate

      public OptionContract closePriceDate(@Nullable LocalDate closePriceDate)
    • getClosePriceDate

      @Nullable public LocalDate getClosePriceDate()
      The date of the close price data.
      Returns:
      closePriceDate
    • setClosePriceDate

      public void setClosePriceDate(@Nullable LocalDate closePriceDate)
    • deliverables

      public OptionContract deliverables(@Nullable List<OptionDeliverable> deliverables)
    • addDeliverablesItem

      public OptionContract addDeliverablesItem(OptionDeliverable deliverablesItem)
    • getDeliverables

      @Nullable public List<OptionDeliverable> getDeliverables()
      Represents the deliverables tied to the option contract. While standard contracts entail a single deliverable, non-standard ones can encompass multiple deliverables, each potentially customized with distinct parameters. This array is included in the list contracts response only if the query parameter show_deliverables=true is provided.
      Returns:
      deliverables
    • setDeliverables

      public void setDeliverables(@Nullable List<OptionDeliverable> deliverables)
    • expirationDate

      public OptionContract expirationDate(@Nonnull LocalDate expirationDate)
    • getExpirationDate

      @Nonnull public LocalDate getExpirationDate()
      The expiration date of the option contract.
      Returns:
      expirationDate
    • setExpirationDate

      public void setExpirationDate(@Nonnull LocalDate expirationDate)
    • id

      public OptionContract id(@Nonnull UUID id)
    • getId

      @Nonnull public UUID getId()
      The unique identifier of the option contract.
      Returns:
      id
    • setId

      public void setId(@Nonnull UUID id)
    • multiplier

      public OptionContract multiplier(@Nonnull BigDecimal multiplier)
    • getMultiplier

      @Nonnull public BigDecimal getMultiplier()
      The multiplier of the option contract is crucial for calculating both the trade premium and the extended strike price. In standard contracts, the multiplier is always set to 100. For instance, if a contract is traded at $1.50 and the multiplier is 100, the total amount debited when buying the contract would be $150.00. Similarly, when exercising a call contract, the total cost will be equal to the strike price times the multiplier.
      Returns:
      multiplier
    • setMultiplier

      public void setMultiplier(@Nonnull BigDecimal multiplier)
    • name

      public OptionContract name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      The name of the option contract.
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • openInterest

      public OptionContract openInterest(@Nullable String openInterest)
    • getOpenInterest

      @Nullable public String getOpenInterest()
      The open interest of the option contract.
      Returns:
      openInterest
    • setOpenInterest

      public void setOpenInterest(@Nullable String openInterest)
    • openInterestDate

      public OptionContract openInterestDate(@Nullable LocalDate openInterestDate)
    • getOpenInterestDate

      @Nullable public LocalDate getOpenInterestDate()
      The date of the open interest data.
      Returns:
      openInterestDate
    • setOpenInterestDate

      public void setOpenInterestDate(@Nullable LocalDate openInterestDate)
    • rootSymbol

      public OptionContract rootSymbol(@Nullable String rootSymbol)
    • getRootSymbol

      @Nullable public String getRootSymbol()
      The root symbol of the option contract.
      Returns:
      rootSymbol
    • setRootSymbol

      public void setRootSymbol(@Nullable String rootSymbol)
    • size

      public OptionContract size(@Nonnull String size)
    • getSize

      @Nonnull public String getSize()
      Represents the number of underlying shares to be delivered in case the contract is exercised/assigned. For standard contracts, this is always 100. This field should **not** be used as a multiplier, specially for non-standard contracts.
      Returns:
      size
    • setSize

      public void setSize(@Nonnull String size)
    • status

      public OptionContract status(@Nonnull OptionContract.StatusEnum status)
    • getStatus

      @Nonnull public OptionContract.StatusEnum getStatus()
      The status of the option contract.
      Returns:
      status
    • setStatus

      public void setStatus(@Nonnull OptionContract.StatusEnum status)
    • strikePrice

      public OptionContract strikePrice(@Nonnull BigDecimal strikePrice)
    • getStrikePrice

      @Nonnull public BigDecimal getStrikePrice()
      The strike price of the option contract.
      Returns:
      strikePrice
    • setStrikePrice

      public void setStrikePrice(@Nonnull BigDecimal strikePrice)
    • style

      public OptionContract style(@Nonnull OptionContractStyle style)
    • getStyle

      @Nonnull public OptionContractStyle getStyle()
      Get style
      Returns:
      style
    • setStyle

      public void setStyle(@Nonnull OptionContractStyle style)
    • symbol

      public OptionContract symbol(@Nonnull String symbol)
    • getSymbol

      @Nonnull public String getSymbol()
      The symbol representing the option contract.
      Returns:
      symbol
    • setSymbol

      public void setSymbol(@Nonnull String symbol)
    • tradable

      public OptionContract tradable(@Nonnull Boolean tradable)
    • getTradable

      @Nonnull public Boolean getTradable()
      Indicates whether the option contract is tradable.
      Returns:
      tradable
    • setTradable

      public void setTradable(@Nonnull Boolean tradable)
    • type

      public OptionContract type(@Nonnull OptionContractType type)
    • getType

      @Nonnull public OptionContractType getType()
      Get type
      Returns:
      type
    • setType

      public void setType(@Nonnull OptionContractType type)
    • underlyingAssetId

      public OptionContract underlyingAssetId(@Nonnull UUID underlyingAssetId)
    • getUnderlyingAssetId

      @Nonnull public UUID getUnderlyingAssetId()
      The unique identifier of the underlying asset.
      Returns:
      underlyingAssetId
    • setUnderlyingAssetId

      public void setUnderlyingAssetId(@Nonnull UUID underlyingAssetId)
    • underlyingSymbol

      public OptionContract underlyingSymbol(@Nonnull String underlyingSymbol)
    • getUnderlyingSymbol

      @Nonnull public String getUnderlyingSymbol()
      The underlying symbol of the option contract.
      Returns:
      underlyingSymbol
    • setUnderlyingSymbol

      public void setUnderlyingSymbol(@Nonnull String underlyingSymbol)
    • putAdditionalProperty

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

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

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