Package com.wombat.mamda.options
Class MamdaOptionContract
- java.lang.Object
-
- com.wombat.mamda.options.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.
-
-
Field Summary
Fields Modifier and Type Field Description static char
EXERCISE_STYLE_AMERICAN
static char
EXERCISE_STYLE_CAPPED
static char
EXERCISE_STYLE_EUROPEAN
static char
EXERCISE_STYLE_UNKNOWN
static char
PC_CALL
static char
PC_PUT
static char
PC_UNKNOWN
-
Constructor Summary
Constructors Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFundamentalHandler(MamdaFundamentalHandler handler)
Add a MamdaFundamentalHandler for handling fundamental updates to this option contract.void
addQuoteHandler(MamdaQuoteHandler handler)
Add a MamdaQuoteHandler for handling quote updates to this option contract.void
addTradeHandler(MamdaTradeHandler handler)
Add a MamdaTradeHandler for handling trade updates to this option contract.java.lang.Object
getCustomObject()
Return the custom object.java.lang.String
getExchange()
Return the exchange.char
getExerciseStyle()
Return the exercise style.java.util.Date
getExpireDate()
Return the expiration date.java.lang.String
getExpireDateStr()
Return the expiration date as a commonly formatted string (MMMyy).MamdaFundamentalListener
getFundamentalListener()
Return the current fundamental listener.MamdaFundamentals
getFundamentalsInfo()
Return the current fundamental fields.boolean
getInView()
Return whether this contract is in the "view" within the option chain.long
getOpenInterest()
Return the open interest.char
getPutCall()
Return the put/call indicator.MamdaQuoteRecap
getQuoteInfo()
Return the current quote fields.MamdaQuoteListener
getQuoteListener()
Return the current quote listener.double
getStrikePrice()
Return the strike price.java.lang.String
getSymbol()
Return the OPRA contract symbol.MamdaTradeRecap
getTradeInfo()
Return the current trade fields.MamdaTradeListener
getTradeListener()
Return the trade listener.void
setCustomObject(java.lang.Object object)
Add a custom object to this option contract.void
setExerciseStyle(char exerciseStyle)
Set the exercise style.void
setInView(boolean inView)
Set whether this contract is in the "view" within the option chain.void
setOpenInterest(long openInterest)
Set the open interest size.
-
-
-
Field Detail
-
PC_UNKNOWN
public static final char PC_UNKNOWN
- See Also:
- Constant Field Values
-
PC_CALL
public static final char PC_CALL
- See Also:
- Constant Field Values
-
PC_PUT
public static final char PC_PUT
- See Also:
- Constant Field Values
-
EXERCISE_STYLE_AMERICAN
public static final char EXERCISE_STYLE_AMERICAN
- See Also:
- Constant Field Values
-
EXERCISE_STYLE_EUROPEAN
public static final char EXERCISE_STYLE_EUROPEAN
- See Also:
- Constant Field Values
-
EXERCISE_STYLE_CAPPED
public static final char EXERCISE_STYLE_CAPPED
- See Also:
- Constant Field Values
-
EXERCISE_STYLE_UNKNOWN
public static final char EXERCISE_STYLE_UNKNOWN
- See Also:
- Constant Field Values
-
-
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
-
-