Classes Files

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. More…

Public Types

  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’}

Public Functions

  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

Detailed Description

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.

Public Types Documentation

enum PutOrCall

Enumerator Value Description
Unknown (byte)’Z’  
Call (byte)’C’  
Put (byte)’P’  

enum ExerciseStyle

Enumerator Value Description
Unknown (byte)’Z’  
American (byte)’A’  
European (byte)’E’  
Capped (byte)’C’  

Public Functions Documentation

function MamdaOptionContract

MamdaOptionContract(
    string symbol,
    string exchange,
    DateTime expireDate,
    double strikePrice,
    PutOrCall putCall
)

Constructor from expiration date, strike price, and put/call indicator.

Parameters:

  • symbol
  • exchange
  • expireDate
  • strikePrice
  • putCall

function setOpenInterest

void setOpenInterest(
    long openInterest
)

Set the open interest size.

Parameters:

  • openInterest

function setExerciseStyle

void setExerciseStyle(
    ExerciseStyle exerciseStyle
)

Set the exercise style.

Parameters:

  • exerciseStyle

function getSymbol

string getSymbol()

Return the OPRA contract symbol.

Return:

function getExchange

string getExchange()

Return the exchange.

Return:

function getExpireDate

DateTime getExpireDate()

Return the expiration date.

Return:

function getExpireDateStr

string getExpireDateStr()

Return the expiration date as a commonly formatted string (MMyy).

Return:

function getStrikePrice

double getStrikePrice()

Return the strike price.

Return:

function getPutCall

PutOrCall getPutCall()

Return the put/call indicator.

Return:

function getOpenInterest

long getOpenInterest()

Return the open interest.

Return:

function getExerciseStyle

ExerciseStyle getExerciseStyle()

Return the exercise style.

Return:

function addTradeHandler

void addTradeHandler(
    MamdaTradeHandler handler
)

Add a MamdaTradeHandler for handling trade updates to this option contract.

Parameters:

  • handler

function addQuoteHandler

void addQuoteHandler(
    MamdaQuoteHandler handler
)

Add a MamdaQuoteHandler for handling quote updates to this option contract.

Parameters:

  • handler

function addFundamentalHandler

void addFundamentalHandler(
    MamdaFundamentalHandler handler
)

Add a MamdaFundamentalHandler for handling fundamental updates to this option contract.

Parameters:

  • handler

function setCustomObject

void setCustomObject(
    object obj
)

Add a custom object to this option contract. Such an object might contain customer per-contract data.

Parameters:

  • obj

function getTradeInfo

MamdaTradeRecap getTradeInfo()

Return the current trade fields.

Return:

function getQuoteInfo

MamdaQuoteRecap getQuoteInfo()

Return the current quote fields.

Return:

function getFundamentalsInfo

MamdaFundamentals getFundamentalsInfo()

Return the current fundamental fields.

Return:

function getCustomObject

object getCustomObject()

Return the custom object.

Return:

function getTradeListener

MamdaTradeListener getTradeListener()

Return the trade listener.

Return:

function getQuoteListener

MamdaQuoteListener getQuoteListener()

Return the current quote listener.

Return:

function getFundamentalListener

MamdaFundamentalListener getFundamentalListener()

Return the current fundamental listener.

Return:

function setInView

void setInView(
    bool inView
)

Set whether this contract is in the “view” within the option chain. MamdaOptionChain

Parameters:

  • inView

function getInView

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