Class OptionContract
java.lang.Object
markets.alpaca.client.openapi.broker.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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumThe status of the option contract.static enumThe style of the option contract.static enumThe type of the option contract. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDeliverablesItem(OptionDeliverable deliverablesItem) closePrice(String closePrice) closePriceDate(LocalDate closePriceDate) deliverables(List<OptionDeliverable> deliverables) booleanexpirationDate(LocalDate expirationDate) static OptionContractCreate an instance of OptionContract given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.The close price of the option contract.The date of the close price data.Represents the deliverables tied to the option contract.The expiration date of the option contract.getId()The unique identifier of the option contract.The multiplier of the option contract is crucial for calculating both the trade premium and the extended strike price.getName()The name of the option contract.The open interest of the option contract.The date of the open interest data.The root symbol of the option contract.getSize()Represents the number of underlying shares to be delivered in case the contract is exercised/assigned.The status of the option contract.The strike price of the option contract.getStyle()The style of the option contract.The symbol representing the option contract.Indicates whether the option contract is tradable.getType()The type of the option contract.The unique identifier of the underlying asset.The underlying symbol of the option contract.inthashCode()multiplier(String multiplier) openInterest(String openInterest) openInterestDate(LocalDate openInterestDate) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.rootSymbol(String rootSymbol) voidsetClosePrice(String closePrice) voidsetClosePriceDate(LocalDate closePriceDate) voidsetDeliverables(List<OptionDeliverable> deliverables) voidsetExpirationDate(LocalDate expirationDate) voidvoidsetMultiplier(String multiplier) voidvoidsetOpenInterest(String openInterest) voidsetOpenInterestDate(LocalDate openInterestDate) voidsetRootSymbol(String rootSymbol) voidvoidsetStatus(OptionContract.StatusEnum status) voidsetStrikePrice(String strikePrice) voidsetStyle(OptionContract.StyleEnum style) voidvoidsetTradable(Boolean tradable) voidvoidsetUnderlyingAssetId(String underlyingAssetId) voidsetUnderlyingSymbol(String underlyingSymbol) status(OptionContract.StatusEnum status) strikePrice(String strikePrice) style(OptionContract.StyleEnum style) toJson()Convert an instance of OptionContract to an JSON stringtoString()type(OptionContract.TypeEnum type) underlyingAssetId(String underlyingAssetId) underlyingSymbol(String underlyingSymbol) static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_CLOSE_PRICE
- See Also:
-
SERIALIZED_NAME_CLOSE_PRICE_DATE
- See Also:
-
SERIALIZED_NAME_DELIVERABLES
- See Also:
-
SERIALIZED_NAME_EXPIRATION_DATE
- See Also:
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_MULTIPLIER
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_OPEN_INTEREST
- See Also:
-
SERIALIZED_NAME_OPEN_INTEREST_DATE
- See Also:
-
SERIALIZED_NAME_ROOT_SYMBOL
- See Also:
-
SERIALIZED_NAME_SIZE
- See Also:
-
SERIALIZED_NAME_STATUS
- See Also:
-
SERIALIZED_NAME_STRIKE_PRICE
- See Also:
-
SERIALIZED_NAME_STYLE
- See Also:
-
SERIALIZED_NAME_SYMBOL
- See Also:
-
SERIALIZED_NAME_TRADABLE
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_UNDERLYING_ASSET_ID
- See Also:
-
SERIALIZED_NAME_UNDERLYING_SYMBOL
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
OptionContract
public OptionContract()
-
-
Method Details
-
closePrice
-
getClosePrice
The close price of the option contract.- Returns:
- closePrice
-
setClosePrice
-
closePriceDate
-
getClosePriceDate
The date of the close price data.- Returns:
- closePriceDate
-
setClosePriceDate
-
deliverables
-
addDeliverablesItem
-
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
-
expirationDate
-
getExpirationDate
The expiration date of the option contract.- Returns:
- expirationDate
-
setExpirationDate
-
id
-
getId
The unique identifier of the option contract.- Returns:
- id
-
setId
-
multiplier
-
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
-
name
-
getName
The name of the option contract.- Returns:
- name
-
setName
-
openInterest
-
getOpenInterest
The open interest of the option contract.- Returns:
- openInterest
-
setOpenInterest
-
openInterestDate
-
getOpenInterestDate
The date of the open interest data.- Returns:
- openInterestDate
-
setOpenInterestDate
-
rootSymbol
-
getRootSymbol
The root symbol of the option contract.- Returns:
- rootSymbol
-
setRootSymbol
-
size
-
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
-
status
-
getStatus
The status of the option contract.- Returns:
- status
-
setStatus
-
strikePrice
-
getStrikePrice
The strike price of the option contract.- Returns:
- strikePrice
-
setStrikePrice
-
style
-
getStyle
The style of the option contract.- Returns:
- style
-
setStyle
-
symbol
-
getSymbol
The symbol representing the option contract.- Returns:
- symbol
-
setSymbol
-
tradable
-
getTradable
Indicates whether the option contract is tradable.- Returns:
- tradable
-
setTradable
-
type
-
getType
The type of the option contract.- Returns:
- type
-
setType
-
underlyingAssetId
-
getUnderlyingAssetId
The unique identifier of the underlying asset.- Returns:
- underlyingAssetId
-
setUnderlyingAssetId
-
underlyingSymbol
-
getUnderlyingSymbol
The underlying symbol of the option contract.- Returns:
- underlyingSymbol
-
setUnderlyingSymbol
-
putAdditionalProperty
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 propertyvalue- value of the property- Returns:
- the OptionContract instance itself
-
getAdditionalProperties
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
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
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
Convert an instance of OptionContract to an JSON string- Returns:
- JSON string
-