Interface MMRFSCoreTrade

All Known Implementing Classes:
MMRFSTrade, MMRollOverTrade

public interface MMRFSCoreTrade

A single MMRFSCoreTrade active in the system.

A Trade is initiated by a client and is tied to a TradeChannel. The lifecycle of a Trade consists of a number of messages, represented by TradeEvents, being sent between the client and the Trading System in both directions. These messages cause the Trade to transition between a number of predefined states.

Trades are comprised of one or more trade legs, which each leg representing the exchange of a financial instrument and the resultant cash flow. It is possible to add, remove and update trades from the client or from the TradingDataSource.

A Trade is uniquely identified in two ways: by RequestId set by the client and a TradeId set by the Trading System.

  • Method Details

    • createErrorTradeEvent

      ErrorTradeEvent createErrorTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the Error transition in the trade model of the adapter and client application

      Returns:
      A new instance of ErrorTradeEvent.
    • sendErrorEvent

      void sendErrorEvent(ErrorTradeEvent event)

      Send a TradeEvent to trigger the Error transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • createSubmitAckTradeEvent

      SubmitAckTradeEvent createSubmitAckTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the SubmitAck transition in the trade model of the adapter and client application

      Returns:
      A new instance of SubmitAckTradeEvent.
    • sendSubmitAckEvent

      void sendSubmitAckEvent(SubmitAckTradeEvent event)

      Send a TradeEvent to trigger the SubmitAck transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • sendSubmitAckEvent

      void sendSubmitAckEvent()

      Send a TradeEvent with no fields to trigger the SubmitAck transition in the trade model of the adapter and client application

    • createTradeConfirmationTradeEvent

      TradeConfirmationTradeEvent createTradeConfirmationTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the TradeConfirmation transition in the trade model of the adapter and client application

      Returns:
      A new instance of TradeConfirmationTradeEvent.
    • sendTradeConfirmationEvent

      void sendTradeConfirmationEvent(TradeConfirmationTradeEvent event)

      Send a TradeEvent to trigger the TradeConfirmation transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • createTradeConfirmationTradeEvent

      TradeConfirmationTradeEvent createTradeConfirmationTradeEvent(Message message)

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the TradeConfirmation transition in the trade model of the adapter and client application

      Returns:
      A new instance of TradeConfirmationTradeEvent.
    • createRejectTradeEvent

      RejectTradeEvent createRejectTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the Reject transition in the trade model of the adapter and client application

      Returns:
      A new instance of RejectTradeEvent.
    • sendRejectEvent

      void sendRejectEvent(RejectTradeEvent event)

      Send a TradeEvent to trigger the Reject transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • createClientCloseAckTradeEvent

      ClientCloseAckTradeEvent createClientCloseAckTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the ClientCloseAck transition in the trade model of the adapter and client application

      Returns:
      A new instance of ClientCloseAckTradeEvent.
    • sendClientCloseAckEvent

      void sendClientCloseAckEvent(ClientCloseAckTradeEvent event)

      Send a TradeEvent to trigger the ClientCloseAck transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • sendClientCloseAckEvent

      void sendClientCloseAckEvent()

      Send a TradeEvent with no fields to trigger the ClientCloseAck transition in the trade model of the adapter and client application

    • createWithdrawTradeEvent

      WithdrawTradeEvent createWithdrawTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the Withdraw transition in the trade model of the adapter and client application

      Returns:
      A new instance of WithdrawTradeEvent.
    • sendWithdrawEvent

      void sendWithdrawEvent(WithdrawTradeEvent event)

      Send a TradeEvent to trigger the Withdraw transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • sendWithdrawEvent

      void sendWithdrawEvent()

      Send a TradeEvent with no fields to trigger the Withdraw transition in the trade model of the adapter and client application

    • createExecuteAckTradeEvent

      ExecuteAckTradeEvent createExecuteAckTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the ExecuteAck transition in the trade model of the adapter and client application

      Returns:
      A new instance of ExecuteAckTradeEvent.
    • sendExecuteAckEvent

      void sendExecuteAckEvent(ExecuteAckTradeEvent event)

      Send a TradeEvent to trigger the ExecuteAck transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • sendExecuteAckEvent

      void sendExecuteAckEvent()

      Send a TradeEvent with no fields to trigger the ExecuteAck transition in the trade model of the adapter and client application

    • createPriceUpdateTradeEvent

      PriceUpdateTradeEvent createPriceUpdateTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the PriceUpdate transition in the trade model of the adapter and client application

      Returns:
      A new instance of PriceUpdateTradeEvent.
    • sendPriceUpdateEvent

      void sendPriceUpdateEvent(PriceUpdateTradeEvent event)

      Send a TradeEvent to trigger the PriceUpdate transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • createPriceUpdateTradeEvent

      PriceUpdateTradeEvent createPriceUpdateTradeEvent(Message message)

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the PriceUpdate transition in the trade model of the adapter and client application

      Returns:
      A new instance of PriceUpdateTradeEvent.
    • createWarningTradeEvent

      WarningTradeEvent createWarningTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the Warning transition in the trade model of the adapter and client application

      Returns:
      A new instance of WarningTradeEvent.
    • sendWarningEvent

      void sendWarningEvent(WarningTradeEvent event)

      Send a TradeEvent to trigger the Warning transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • sendWarningEvent

      void sendWarningEvent()

      Send a TradeEvent with no fields to trigger the Warning transition in the trade model of the adapter and client application

    • createHoldTradeEvent

      HoldTradeEvent createHoldTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the Hold transition in the trade model of the adapter and client application

      Returns:
      A new instance of HoldTradeEvent.
    • sendHoldEvent

      void sendHoldEvent(HoldTradeEvent event)

      Send a TradeEvent to trigger the Hold transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • sendHoldEvent

      void sendHoldEvent()

      Send a TradeEvent with no fields to trigger the Hold transition in the trade model of the adapter and client application

    • createExpireTradeEvent

      ExpireTradeEvent createExpireTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the Expire transition in the trade model of the adapter and client application

      Returns:
      A new instance of ExpireTradeEvent.
    • sendExpireEvent

      void sendExpireEvent(ExpireTradeEvent event)

      Send a TradeEvent to trigger the Expire transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • sendExpireEvent

      void sendExpireEvent()

      Send a TradeEvent with no fields to trigger the Expire transition in the trade model of the adapter and client application

    • createPickUpTradeEvent

      PickUpTradeEvent createPickUpTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the PickUp transition in the trade model of the adapter and client application

      Returns:
      A new instance of PickUpTradeEvent.
    • sendPickUpEvent

      void sendPickUpEvent(PickUpTradeEvent event)

      Send a TradeEvent to trigger the PickUp transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • sendPickUpEvent

      void sendPickUpEvent()

      Send a TradeEvent with no fields to trigger the PickUp transition in the trade model of the adapter and client application

    • createAcceptWarningAckTradeEvent

      AcceptWarningAckTradeEvent createAcceptWarningAckTradeEvent()

      Create a TradeEvent that can be passed to Trade.sendEvent to trigger the AcceptWarningAck transition in the trade model of the adapter and client application

      Returns:
      A new instance of AcceptWarningAckTradeEvent.
    • sendAcceptWarningAckEvent

      void sendAcceptWarningAckEvent(AcceptWarningAckTradeEvent event)

      Send a TradeEvent to trigger the AcceptWarningAck transition in the trade model of the adapter and client application

      Parameters:
      event - The event to send.
    • sendAcceptWarningAckEvent

      void sendAcceptWarningAckEvent()

      Send a TradeEvent with no fields to trigger the AcceptWarningAck transition in the trade model of the adapter and client application

    • getRequestID

      String getRequestID()
      Returns the ID generated from the client. The combination of user and trade is unique.
      Returns:
      the request ID.
    • getUsername

      String getUsername()
      Returns the username of the logged in user that created this trade.
      Returns:
      the username of the logged in user.
    • getBackingTrade

      com.caplin.trading.Trade getBackingTrade()