Class MamdaOptionContract


  • public class MamdaOptionContract
    extends java.lang.Object
    A class that represents a single option contract. Instances of this object are typically created by the MamdaOptionChainListener. Applications may attach a custom object to each instance of MamdaOptionContract. Note: User applications can be notified of creation of MamdaOptionContract instances via the MamdaOptionChainListener.onOptionContractCreate() method. Note: It is possible to provide individual MamdaTradeHandler and MamdaQuoteHandler handlers for trades and quotes, even though the MamdaOptionChainHandler also provides a general callback interface for updates to individual contracts.
    • Constructor Detail

      • MamdaOptionContract

        public MamdaOptionContract​(java.lang.String symbol,
                                   java.lang.String exchange,
                                   java.util.Date expireDate,
                                   double strikePrice,
                                   char putCall)
        Constructor from expiration date, strike price, and put/call indicator.
    • Method Detail

      • setOpenInterest

        public void setOpenInterest​(long openInterest)
        Set the open interest size.
      • setExerciseStyle

        public void setExerciseStyle​(char exerciseStyle)
        Set the exercise style.
      • getSymbol

        public java.lang.String getSymbol()
        Return the OPRA contract symbol.
      • getExchange

        public java.lang.String getExchange()
        Return the exchange.
      • getExpireDate

        public java.util.Date getExpireDate()
        Return the expiration date.
      • getExpireDateStr

        public java.lang.String getExpireDateStr()
        Return the expiration date as a commonly formatted string (MMMyy).
      • getStrikePrice

        public double getStrikePrice()
        Return the strike price.
      • getPutCall

        public char getPutCall()
        Return the put/call indicator.
      • getOpenInterest

        public long getOpenInterest()
        Return the open interest.
      • getExerciseStyle

        public char getExerciseStyle()
        Return the exercise style.
      • addTradeHandler

        public void addTradeHandler​(MamdaTradeHandler handler)
        Add a MamdaTradeHandler for handling trade updates to this option contract.
      • addQuoteHandler

        public void addQuoteHandler​(MamdaQuoteHandler handler)
        Add a MamdaQuoteHandler for handling quote updates to this option contract.
      • addFundamentalHandler

        public void addFundamentalHandler​(MamdaFundamentalHandler handler)
        Add a MamdaFundamentalHandler for handling fundamental updates to this option contract.
      • setCustomObject

        public void setCustomObject​(java.lang.Object object)
        Add a custom object to this option contract. Such an object might contain customer per-contract data.
      • getTradeInfo

        public MamdaTradeRecap getTradeInfo()
        Return the current trade fields.
      • getQuoteInfo

        public MamdaQuoteRecap getQuoteInfo()
        Return the current quote fields.
      • getFundamentalsInfo

        public MamdaFundamentals getFundamentalsInfo()
        Return the current fundamental fields.
      • getCustomObject

        public java.lang.Object getCustomObject()
        Return the custom object.
      • getTradeListener

        public MamdaTradeListener getTradeListener()
        Return the trade listener.
      • getQuoteListener

        public MamdaQuoteListener getQuoteListener()
        Return the current quote listener.
      • getFundamentalListener

        public MamdaFundamentalListener getFundamentalListener()
        Return the current fundamental listener.
      • setInView

        public void setInView​(boolean inView)
        Set whether this contract is in the "view" within the option chain.
        See Also:
        MamdaOptionChain
      • getInView

        public boolean getInView()
        Return whether this contract is in the "view" within the option chain.
        See Also:
        MamdaOptionChain