Classes Files

com::wombat::mamda::MamdaTradeHandler

More…

Public Functions

  Name
void onTradeRecap(MamdaSubscription subscription, MamdaTradeListener listener, MamaMsg msg, MamdaTradeRecap recap)
void onTradeReport(MamdaSubscription subscription, MamdaTradeListener listener, MamaMsg msg, MamdaTradeReport event, MamdaTradeRecap recap)
void onTradeGap(MamdaSubscription subscription, MamdaTradeListener listener, MamaMsg msg, MamdaTradeGap event, MamdaTradeRecap recap)
void onTradeCancelOrError(MamdaSubscription subscription, MamdaTradeListener listener, MamaMsg msg, MamdaTradeCancelOrError event, MamdaTradeRecap recap)
void onTradeCorrection(MamdaSubscription subscription, MamdaTradeListener listener, MamaMsg msg, MamdaTradeCorrection event, MamdaTradeRecap recap)
void onTradeClosing(MamdaSubscription subscription, MamdaTradeListener listener, MamaMsg msg, MamdaTradeClosing event, MamdaTradeRecap recap)

Detailed Description

class com::wombat::mamda::MamdaTradeHandler;

MamdaTradeHandler is an interface for applications that want to have an easy way to handle trade updates. The interface defines callback methods for different types of trade-related events: trades, errors/cancels, corrections, recaps and closing reports.

Public Functions Documentation

function onTradeRecap

void onTradeRecap(
    MamdaSubscription subscription,
    MamdaTradeListener listener,
    MamaMsg msg,
    MamdaTradeRecap recap
)

Parameters:

  • subscription The subscription which received the update.
  • listener The listener which invoked this callback.
  • msg The MamaMsg that triggered this invocation.
  • recap Access to the trade fields in the recap update.

Method invoked when the current last-trade information for the security is available. The reason for the invocation may be any of the following:

  • Initial image.
  • Recap update (e.g., after server fault tolerant event or data quality event.)
  • After stale status removed.

function onTradeReport

void onTradeReport(
    MamdaSubscription subscription,
    MamdaTradeListener listener,
    MamaMsg msg,
    MamdaTradeReport event,
    MamdaTradeRecap recap
)

Parameters:

  • subscription The subscription which received the update.
  • listener The listener which invoked the callback.
  • msg The MamaMsg that triggered this invocation.
  • event Access to the trade data from the update.
  • recap Access to complete trade data.

Method invoked when a trade is reported.

function onTradeGap

void onTradeGap(
    MamdaSubscription subscription,
    MamdaTradeListener listener,
    MamaMsg msg,
    MamdaTradeGap event,
    MamdaTradeRecap recap
)

Parameters:

  • subscription The subscription which received the update.
  • listener The listener which invoked this callback.
  • msg The MamaMsg that triggered this invocation.
  • event Access to details from the trade gap event.
  • recap Access to complete trade data.

Method invoked when a gap in trade reports is discovered.

function onTradeCancelOrError

void onTradeCancelOrError(
    MamdaSubscription subscription,
    MamdaTradeListener listener,
    MamaMsg msg,
    MamdaTradeCancelOrError event,
    MamdaTradeRecap recap
)

Parameters:

  • subscription The subscription which received the update.
  • listener The listener which invoked this callback.
  • msg The MamaMsg that triggered this invocation.
  • event Access to the details from the cancel/error event.
  • recap Access to the complete trade data.

Method invoked when a trade cancel or error is reported.

function onTradeCorrection

void onTradeCorrection(
    MamdaSubscription subscription,
    MamdaTradeListener listener,
    MamaMsg msg,
    MamdaTradeCorrection event,
    MamdaTradeRecap recap
)

Parameters:

  • subscription The subscription which received the update.
  • listener The listener which invoked this callback.
  • msg The MamaMsg that triggered this invocation.
  • event Access to the details from the trade correction event.
  • recap Access to the complete trade data.

Method invoked when a trade correction is reported.

function onTradeClosing

void onTradeClosing(
    MamdaSubscription subscription,
    MamdaTradeListener listener,
    MamaMsg msg,
    MamdaTradeClosing event,
    MamdaTradeRecap recap
)

Parameters:

  • subscription The subscription which received the update.
  • listener The listener which invoked this callback.
  • msg The MamaMsg that triggered this invocation.
  • event Access to the details from the trade closing event.
  • recap Access to the complete trade data.

Method invoked for a closing report.


Updated on 2023-03-31 at 15:30:35 +0100