A class that represents a single option contract. More...
#include <MamdaOptionContract.h>
Public Member Functions | |
MamdaOptionContract (const char *symbol, const char *exchange, const MamaDateTime &expireDate, double strikePrice, MamdaOptionPutCall putCall) | |
Constructor from expiration date, strike price, and put/call indicator. More... | |
MamdaOptionContract (const char *symbol, const char *exchange) | |
Constructor without expiration date, strike price, and put/call indicator. More... | |
~MamdaOptionContract () | |
Destructor. More... | |
void | setExpireDate (const MamaDateTime &expireDate) |
Set the expiration date. More... | |
void | setStrikePrice (double strikePrice) |
Set the strike price. More... | |
void | setPutCall (MamdaOptionPutCall putCall) |
Set the put/call indicator. More... | |
void | setOpenInterest (uint32_t openInterest) |
Set the open interest size. More... | |
void | setExerciseStyle (MamdaOptionExerciseStyle exerciseStyle) |
Set the exercise style. More... | |
void | setRecapRequired (bool recapRequired) |
Set the recap required field. More... | |
const char * | getSymbol () const |
Return the OPRA contract symbol. More... | |
const char * | getExchange () const |
Return the exchange. More... | |
const MamaDateTime & | getExpireDate () const |
Return the expiration date. More... | |
const char * | getExpireDateStr () const |
Return the expiration date as a string. More... | |
bool | gotExpireDate () const |
Return whether or not expiration date has been set. More... | |
double | getStrikePrice () const |
Return the strike price. More... | |
bool | gotStrikePrice () const |
Return whether or not strike price has been set. More... | |
MamdaOptionPutCall | getPutCall () const |
Return the put/call indicator. More... | |
bool | gotPutCall () const |
Return whether or not put call has been set. More... | |
uint32_t | getOpenInterest () const |
Return the level of interest at opening. More... | |
bool | gotOpenInterest () const |
Return whether or not open interest has been set. More... | |
MamdaOptionExerciseStyle | getExerciseStyle () const |
Return the style indicator - American(A)/European(E)/Capped(C). More... | |
bool | gotExerciseStyle () const |
Return whether or not exercise style has been set. More... | |
bool | getRecapRequired () const |
Get the recap required field. More... | |
void | addMsgListener (MamdaMsgListener *listener) |
Add a generic MamdaMsgListener to this option contract. More... | |
void | addTradeHandler (MamdaTradeHandler *handler) |
Add a MamdaTradeHandler for handling trade updates to this option contract. More... | |
void | addQuoteHandler (MamdaQuoteHandler *handler) |
Add a MamdaQuoteHandler for handling quote updates to this option contract. More... | |
void | addFundamentalHandler (MamdaFundamentalHandler *handler) |
Add a MamdaFundamentalHandler for handling fundamental data fields. More... | |
void | setCustomObject (void *object) |
Add a custom object to this option contract. More... | |
MamdaTradeRecap & | getTradeInfo () const |
Return the current trade fields. More... | |
MamdaQuoteRecap & | getQuoteInfo () const |
Return the current quote fields. More... | |
MamdaFundamentals & | getFundamentalsInfo () const |
Return the current fundamentals fields. More... | |
void * | getCustomObject () const |
Return the custom object. More... | |
std::vector< MamdaMsgListener * > & | getMsgListeners () |
Return the vector of message listeners. More... | |
MamdaTradeListener & | getTradeListener () |
Return the trade listener. More... | |
MamdaQuoteListener & | getQuoteListener () |
Return the quote listener. More... | |
MamdaFundamentalListener & | getFundamentalListener () |
Return the fundamental listener. More... | |
void | setInView (bool inView) |
Set whether this contract is in the "view" within the option chain. More... | |
bool | getInView () |
Return whether this contract is in the "view" within the option chain. More... | |
int64_t | getSeqNum () |
void | setSeqNum (int64_t num) |
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.
Wombat::MamdaOptionContract::MamdaOptionContract | ( | const char * | symbol, |
const char * | exchange, | ||
const MamaDateTime & | expireDate, | ||
double | strikePrice, | ||
MamdaOptionPutCall | putCall | ||
) |
Constructor from expiration date, strike price, and put/call indicator.
symbol | The option symbol. |
exchange | The exchange identifier. |
expireDate | The options expiration date. |
strikePrice | The options strike price. |
putCall | Whether this is a put or call option. |
Wombat::MamdaOptionContract::MamdaOptionContract | ( | const char * | symbol, |
const char * | exchange | ||
) |
Constructor without expiration date, strike price, and put/call indicator.
symbol | The option symbol. |
exchange | The exchange identifier. |
Wombat::MamdaOptionContract::~MamdaOptionContract | ( | ) |
Destructor.
void Wombat::MamdaOptionContract::setExpireDate | ( | const MamaDateTime & | expireDate) |
Set the expiration date.
expireDate | The options expiration date. |
void Wombat::MamdaOptionContract::setStrikePrice | ( | double | strikePrice) |
Set the strike price.
strikePrice | The options strike price. |
void Wombat::MamdaOptionContract::setPutCall | ( | MamdaOptionPutCall | putCall) |
Set the put/call indicator.
putCall | Whether this is a put or call option. |
void Wombat::MamdaOptionContract::setOpenInterest | ( | uint32_t | openInterest) |
Set the open interest size.
openInterest | The open interest for the option. |
void Wombat::MamdaOptionContract::setExerciseStyle | ( | MamdaOptionExerciseStyle | exerciseStyle) |
Set the exercise style.
exerciseStyle | The exercise style for the option. |
void Wombat::MamdaOptionContract::setRecapRequired | ( | bool | recapRequired) |
Set the recap required field.
Typically only used by the MamdaOptionChainListener
recapRequired | Whether a recap is required by the contract. |
const char* Wombat::MamdaOptionContract::getSymbol | ( | ) | const |
Return the OPRA contract symbol.
const char* Wombat::MamdaOptionContract::getExchange | ( | ) | const |
Return the exchange.
const MamaDateTime& Wombat::MamdaOptionContract::getExpireDate | ( | ) | const |
Return the expiration date.
const char* Wombat::MamdaOptionContract::getExpireDateStr | ( | ) | const |
Return the expiration date as a string.
bool Wombat::MamdaOptionContract::gotExpireDate | ( | ) | const |
Return whether or not expiration date has been set.
double Wombat::MamdaOptionContract::getStrikePrice | ( | ) | const |
Return the strike price.
bool Wombat::MamdaOptionContract::gotStrikePrice | ( | ) | const |
Return whether or not strike price has been set.
MamdaOptionPutCall Wombat::MamdaOptionContract::getPutCall | ( | ) | const |
Return the put/call indicator.
bool Wombat::MamdaOptionContract::gotPutCall | ( | ) | const |
Return whether or not put call has been set.
uint32_t Wombat::MamdaOptionContract::getOpenInterest | ( | ) | const |
Return the level of interest at opening.
bool Wombat::MamdaOptionContract::gotOpenInterest | ( | ) | const |
Return whether or not open interest has been set.
MamdaOptionExerciseStyle Wombat::MamdaOptionContract::getExerciseStyle | ( | ) | const |
Return the style indicator - American(A)/European(E)/Capped(C).
bool Wombat::MamdaOptionContract::gotExerciseStyle | ( | ) | const |
Return whether or not exercise style has been set.
bool Wombat::MamdaOptionContract::getRecapRequired | ( | ) | const |
Get the recap required field.
Reserved for use by the MamdaOptionChainListener
.
void Wombat::MamdaOptionContract::addMsgListener | ( | MamdaMsgListener * | listener) |
Add a generic MamdaMsgListener to this option contract.
listener | A instance of the listener interface. |
void Wombat::MamdaOptionContract::addTradeHandler | ( | MamdaTradeHandler * | handler) |
Add a MamdaTradeHandler for handling trade updates to this option contract.
handler | A trade handler. |
void Wombat::MamdaOptionContract::addQuoteHandler | ( | MamdaQuoteHandler * | handler) |
Add a MamdaQuoteHandler for handling quote updates to this option contract.
handler | A quote handler. |
void Wombat::MamdaOptionContract::addFundamentalHandler | ( | MamdaFundamentalHandler * | handler) |
Add a MamdaFundamentalHandler for handling fundamental data fields.
handler | A fundamental handler. |
void Wombat::MamdaOptionContract::setCustomObject | ( | void * | object) |
Add a custom object to this option contract.
Such an object might contain customer per-contract data.
object | Associate closure data with the option contract. |
MamdaTradeRecap& Wombat::MamdaOptionContract::getTradeInfo | ( | ) | const |
Return the current trade fields.
MamdaQuoteRecap& Wombat::MamdaOptionContract::getQuoteInfo | ( | ) | const |
Return the current quote fields.
MamdaFundamentals& Wombat::MamdaOptionContract::getFundamentalsInfo | ( | ) | const |
Return the current fundamentals fields.
void* Wombat::MamdaOptionContract::getCustomObject | ( | ) | const |
Return the custom object.
std::vector<MamdaMsgListener*>& Wombat::MamdaOptionContract::getMsgListeners | ( | ) |
Return the vector of message listeners.
MamdaTradeListener& Wombat::MamdaOptionContract::getTradeListener | ( | ) |
Return the trade listener.
MamdaQuoteListener& Wombat::MamdaOptionContract::getQuoteListener | ( | ) |
Return the quote listener.
MamdaFundamentalListener& Wombat::MamdaOptionContract::getFundamentalListener | ( | ) |
Return the fundamental listener.
void Wombat::MamdaOptionContract::setInView | ( | bool | inView) |
Set whether this contract is in the "view" within the option chain.
inView | Set whether this contract is in the "view" within the option chain. |
bool Wombat::MamdaOptionContract::getInView | ( | ) |
Return whether this contract is in the "view" within the option chain.
int64_t Wombat::MamdaOptionContract::getSeqNum | ( | ) |
void Wombat::MamdaOptionContract::setSeqNum | ( | int64_t | num) |