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. More…
Name | |
---|---|
enum class byte | PutOrCall { Unknown = (byte)’Z’, Call = (byte)’C’, Put = (byte)’P’} |
enum class byte | ExerciseStyle { Unknown = (byte)’Z’, American = (byte)’A’, European = (byte)’E’, Capped = (byte)’C’} |
Name | |
---|---|
MamdaOptionContract(string symbol, string exchange, DateTime expireDate, double strikePrice, PutOrCall putCall) Constructor from expiration date, strike price, and put/call indicator. |
|
void | setOpenInterest(long openInterest) Set the open interest size. |
void | setExerciseStyle(ExerciseStyle exerciseStyle) Set the exercise style. |
string | getSymbol() Return the OPRA contract symbol. |
string | getExchange() Return the exchange. |
DateTime | getExpireDate() Return the expiration date. |
string | getExpireDateStr() Return the expiration date as a commonly formatted string (MMyy). |
double | getStrikePrice() Return the strike price. |
PutOrCall | getPutCall() Return the put/call indicator. |
long | getOpenInterest() Return the open interest. |
ExerciseStyle | getExerciseStyle() Return the exercise style. |
void | addTradeHandler(MamdaTradeHandler handler) Add a MamdaTradeHandler for handling trade updates to this option contract. |
void | addQuoteHandler(MamdaQuoteHandler handler) Add a MamdaQuoteHandler for handling quote updates to this option contract. |
void | addFundamentalHandler(MamdaFundamentalHandler handler) Add a MamdaFundamentalHandler for handling fundamental updates to this option contract. |
void | setCustomObject(object obj) Add a custom object to this option contract. Such an object might contain customer per-contract data. |
MamdaTradeRecap | getTradeInfo() Return the current trade fields. |
MamdaQuoteRecap | getQuoteInfo() Return the current quote fields. |
MamdaFundamentals | getFundamentalsInfo() Return the current fundamental fields. |
object | getCustomObject() Return the custom object. |
MamdaTradeListener | getTradeListener() Return the trade listener. |
MamdaQuoteListener | getQuoteListener() Return the current quote listener. |
MamdaFundamentalListener | getFundamentalListener() Return the current fundamental listener. |
void | setInView(bool inView) Set whether this contract is in the “view” within the option chain. MamdaOptionChain |
bool | getInView() Return whether this contract is in the “view” within the option chain. MamdaOptionChain |
class Wombat::MamdaOptionContract;
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.
Enumerator | Value | Description |
---|---|---|
Unknown | (byte)’Z’ | |
Call | (byte)’C’ | |
Put | (byte)’P’ |
Enumerator | Value | Description |
---|---|---|
Unknown | (byte)’Z’ | |
American | (byte)’A’ | |
European | (byte)’E’ | |
Capped | (byte)’C’ |
MamdaOptionContract(
string symbol,
string exchange,
DateTime expireDate,
double strikePrice,
PutOrCall putCall
)
Constructor from expiration date, strike price, and put/call indicator.
Parameters:
void setOpenInterest(
long openInterest
)
Set the open interest size.
Parameters:
void setExerciseStyle(
ExerciseStyle exerciseStyle
)
Set the exercise style.
Parameters:
string getSymbol()
Return the OPRA contract symbol.
Return:
string getExchange()
Return the exchange.
Return:
DateTime getExpireDate()
Return the expiration date.
Return:
string getExpireDateStr()
Return the expiration date as a commonly formatted string (MMyy).
Return:
double getStrikePrice()
Return the strike price.
Return:
PutOrCall getPutCall()
Return the put/call indicator.
Return:
long getOpenInterest()
Return the open interest.
Return:
ExerciseStyle getExerciseStyle()
Return the exercise style.
Return:
void addTradeHandler(
MamdaTradeHandler handler
)
Add a MamdaTradeHandler for handling trade updates to this option contract.
Parameters:
void addQuoteHandler(
MamdaQuoteHandler handler
)
Add a MamdaQuoteHandler for handling quote updates to this option contract.
Parameters:
void addFundamentalHandler(
MamdaFundamentalHandler handler
)
Add a MamdaFundamentalHandler for handling fundamental updates to this option contract.
Parameters:
void setCustomObject(
object obj
)
Add a custom object to this option contract. Such an object might contain customer per-contract data.
Parameters:
MamdaTradeRecap getTradeInfo()
Return the current trade fields.
Return:
MamdaQuoteRecap getQuoteInfo()
Return the current quote fields.
Return:
MamdaFundamentals getFundamentalsInfo()
Return the current fundamental fields.
Return:
object getCustomObject()
Return the custom object.
Return:
MamdaTradeListener getTradeListener()
Return the trade listener.
Return:
MamdaQuoteListener getQuoteListener()
Return the current quote listener.
Return:
MamdaFundamentalListener getFundamentalListener()
Return the current fundamental listener.
Return:
void setInView(
bool inView
)
Set whether this contract is in the “view” within the option chain. MamdaOptionChain
Parameters:
bool getInView()
Return whether this contract is in the “view” within the option chain. MamdaOptionChain
Return:
Updated on 2023-03-31 at 15:30:16 +0100