Package com.longbridge.quote
Class OptionChainContract
- java.lang.Object
-
- com.longbridge.quote.OptionChainContract
-
public class OptionChainContract extends Object
A single option contract of an option chain.Every contract is an independent entry: calls and puts are not paired, so a strike price that is listed on one side only yields a single entry.
-
-
Constructor Summary
Constructors Constructor Description OptionChainContract()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDaysToExpiry()Returns the number of days remaining until the option expires, updated daily at midnight ET.OptionDirectiongetDirection()Returns the contract direction.LocalDategetExpiryDate()Returns the expiry date, in US Eastern time.OptionExpiryCycleTypegetOptionType()Returns the special expiration cycle of the contract.OptionStandardAttrgetStandardAttr()Returns whether the contract is a legacy contract left over from a corporate action.BigDecimalgetStrikePrice()Returns the strike price.StringgetSymbol()Returns the option contract code, inticker.regionformat.StringtoString()
-
-
-
Method Detail
-
getSymbol
public String getSymbol()
Returns the option contract code, inticker.regionformat.- Returns:
- the option contract code
-
getExpiryDate
public LocalDate getExpiryDate()
Returns the expiry date, in US Eastern time.- Returns:
- the expiry date
-
getStrikePrice
public BigDecimal getStrikePrice()
Returns the strike price.- Returns:
- the strike price
-
getDirection
public OptionDirection getDirection()
Returns the contract direction.- Returns:
- the contract direction
-
getOptionType
public OptionExpiryCycleType getOptionType()
Returns the special expiration cycle of the contract.- Returns:
- the expiration cycle
-
getStandardAttr
public OptionStandardAttr getStandardAttr()
Returns whether the contract is a legacy contract left over from a corporate action.- Returns:
- the standard attribute
-
getDaysToExpiry
public int getDaysToExpiry()
Returns the number of days remaining until the option expires, updated daily at midnight ET.The value is
0for options expiring today, and negative for already-expired options.- Returns:
- the number of days remaining until expiry
-
-