Interface MamdaTradeHandler


  • public interface 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.
    • Method Detail

      • onTradeRecap

        void onTradeRecap​(MamdaSubscription subscription,
                          MamdaTradeListener listener,
                          com.wombat.mama.MamaMsg msg,
                          MamdaTradeRecap recap)
        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.
        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.
      • onTradeReport

        void onTradeReport​(MamdaSubscription subscription,
                           MamdaTradeListener listener,
                           com.wombat.mama.MamaMsg msg,
                           MamdaTradeReport event,
                           MamdaTradeRecap recap)
        Method invoked when a trade is reported.
        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.
      • onTradeGap

        void onTradeGap​(MamdaSubscription subscription,
                        MamdaTradeListener listener,
                        com.wombat.mama.MamaMsg msg,
                        MamdaTradeGap event,
                        MamdaTradeRecap recap)
        Method invoked when a gap in trade reports is discovered.
        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.
      • onTradeCancelOrError

        void onTradeCancelOrError​(MamdaSubscription subscription,
                                  MamdaTradeListener listener,
                                  com.wombat.mama.MamaMsg msg,
                                  MamdaTradeCancelOrError event,
                                  MamdaTradeRecap recap)
        Method invoked when a trade cancel or error is reported.
        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.
      • onTradeCorrection

        void onTradeCorrection​(MamdaSubscription subscription,
                               MamdaTradeListener listener,
                               com.wombat.mama.MamaMsg msg,
                               MamdaTradeCorrection event,
                               MamdaTradeRecap recap)
        Method invoked when a trade correction is reported.
        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.
      • onTradeClosing

        void onTradeClosing​(MamdaSubscription subscription,
                            MamdaTradeListener listener,
                            com.wombat.mama.MamaMsg msg,
                            MamdaTradeClosing event,
                            MamdaTradeRecap recap)
        Method invoked for a closing report.
        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.