public interface RFSCoreTrade
A single RFSCoreTrade 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.
Modifier and Type | Method and Description |
---|---|
AcceptWarningAckTradeEvent |
createAcceptWarningAckTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the AcceptWarningAck state. |
ClientCloseAckTradeEvent |
createClientCloseAckTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the ClientCloseAck state. |
ErrorTradeEvent |
createErrorTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the Error state. |
ExecuteAckTradeEvent |
createExecuteAckTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the ExecuteAck state. |
ExpireTradeEvent |
createExpireTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the Expire state. |
HoldTradeEvent |
createHoldTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the Hold state. |
PickUpTradeEvent |
createPickUpTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the PickUp state. |
PriceUpdateTradeEvent |
createPriceUpdateTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the PriceUpdate state. |
PriceUpdateTradeEvent |
createPriceUpdateTradeEvent(Message message)
Create a
TradeEvent that can be used to trigger the trade to transition into the PriceUpdate state. |
RejectTradeEvent |
createRejectTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the Reject state. |
SubmitAckTradeEvent |
createSubmitAckTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the SubmitAck state. |
TradeConfirmationTradeEvent |
createTradeConfirmationTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the TradeConfirmation state. |
TradeConfirmationTradeEvent |
createTradeConfirmationTradeEvent(Message message)
Create a
TradeEvent that can be used to trigger the trade to transition into the TradeConfirmation state. |
WarningTradeEvent |
createWarningTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the Warning state. |
WithdrawTradeEvent |
createWithdrawTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the Withdraw state. |
com.caplin.trading.Trade |
getBackingTrade() |
String |
getRequestID()
Returns the ID generated from the client.
|
String |
getUsername()
Returns the username of the logged in user that created this trade.
|
void |
sendAcceptWarningAckEvent()
Send a
TradeEvent with no fields to trigger the trade to transition into the AcceptWarningAck state. |
void |
sendAcceptWarningAckEvent(AcceptWarningAckTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the AcceptWarningAck state. |
void |
sendClientCloseAckEvent()
Send a
TradeEvent with no fields to trigger the trade to transition into the ClientCloseAck state. |
void |
sendClientCloseAckEvent(ClientCloseAckTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the ClientCloseAck state. |
void |
sendErrorEvent(ErrorTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the Error state. |
void |
sendExecuteAckEvent()
Send a
TradeEvent with no fields to trigger the trade to transition into the ExecuteAck state. |
void |
sendExecuteAckEvent(ExecuteAckTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the ExecuteAck state. |
void |
sendExpireEvent()
Send a
TradeEvent with no fields to trigger the trade to transition into the Expire state. |
void |
sendExpireEvent(ExpireTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the Expire state. |
void |
sendHoldEvent()
Send a
TradeEvent with no fields to trigger the trade to transition into the Hold state. |
void |
sendHoldEvent(HoldTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the Hold state. |
void |
sendPickUpEvent()
Send a
TradeEvent with no fields to trigger the trade to transition into the PickUp state. |
void |
sendPickUpEvent(PickUpTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the PickUp state. |
void |
sendPriceUpdateEvent(PriceUpdateTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the PriceUpdate state. |
void |
sendRejectEvent(RejectTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the Reject state. |
void |
sendSubmitAckEvent()
Send a
TradeEvent with no fields to trigger the trade to transition into the SubmitAck state. |
void |
sendSubmitAckEvent(SubmitAckTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the SubmitAck state. |
void |
sendTradeConfirmationEvent(TradeConfirmationTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the TradeConfirmation state. |
void |
sendWarningEvent()
Send a
TradeEvent with no fields to trigger the trade to transition into the Warning state. |
void |
sendWarningEvent(WarningTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the Warning state. |
void |
sendWithdrawEvent()
Send a
TradeEvent with no fields to trigger the trade to transition into the Withdraw state. |
void |
sendWithdrawEvent(WithdrawTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the Withdraw state. |
ErrorTradeEvent createErrorTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the Error state.
void sendErrorEvent(ErrorTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the Error state.
event
- The event to send.SubmitAckTradeEvent createSubmitAckTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the SubmitAck state.
void sendSubmitAckEvent(SubmitAckTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the SubmitAck state.
event
- The event to send.void sendSubmitAckEvent()
Send a TradeEvent
with no fields to trigger the trade to transition into the SubmitAck state.
RejectTradeEvent createRejectTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the Reject state.
void sendRejectEvent(RejectTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the Reject state.
event
- The event to send.ClientCloseAckTradeEvent createClientCloseAckTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the ClientCloseAck state.
void sendClientCloseAckEvent(ClientCloseAckTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the ClientCloseAck state.
event
- The event to send.void sendClientCloseAckEvent()
Send a TradeEvent
with no fields to trigger the trade to transition into the ClientCloseAck state.
WithdrawTradeEvent createWithdrawTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the Withdraw state.
void sendWithdrawEvent(WithdrawTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the Withdraw state.
event
- The event to send.void sendWithdrawEvent()
Send a TradeEvent
with no fields to trigger the trade to transition into the Withdraw state.
ExecuteAckTradeEvent createExecuteAckTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the ExecuteAck state.
void sendExecuteAckEvent(ExecuteAckTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the ExecuteAck state.
event
- The event to send.void sendExecuteAckEvent()
Send a TradeEvent
with no fields to trigger the trade to transition into the ExecuteAck state.
PriceUpdateTradeEvent createPriceUpdateTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the PriceUpdate state.
void sendPriceUpdateEvent(PriceUpdateTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the PriceUpdate state.
event
- The event to send.PriceUpdateTradeEvent createPriceUpdateTradeEvent(Message message)
Create a TradeEvent
that can be used to trigger the trade to transition into the PriceUpdate state.
WarningTradeEvent createWarningTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the Warning state.
void sendWarningEvent(WarningTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the Warning state.
event
- The event to send.void sendWarningEvent()
Send a TradeEvent
with no fields to trigger the trade to transition into the Warning state.
HoldTradeEvent createHoldTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the Hold state.
void sendHoldEvent(HoldTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the Hold state.
event
- The event to send.void sendHoldEvent()
Send a TradeEvent
with no fields to trigger the trade to transition into the Hold state.
ExpireTradeEvent createExpireTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the Expire state.
void sendExpireEvent(ExpireTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the Expire state.
event
- The event to send.void sendExpireEvent()
Send a TradeEvent
with no fields to trigger the trade to transition into the Expire state.
PickUpTradeEvent createPickUpTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the PickUp state.
void sendPickUpEvent(PickUpTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the PickUp state.
event
- The event to send.void sendPickUpEvent()
Send a TradeEvent
with no fields to trigger the trade to transition into the PickUp state.
TradeConfirmationTradeEvent createTradeConfirmationTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the TradeConfirmation state.
void sendTradeConfirmationEvent(TradeConfirmationTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the TradeConfirmation state.
event
- The event to send.TradeConfirmationTradeEvent createTradeConfirmationTradeEvent(Message message)
Create a TradeEvent
that can be used to trigger the trade to transition into the TradeConfirmation state.
AcceptWarningAckTradeEvent createAcceptWarningAckTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the AcceptWarningAck state.
void sendAcceptWarningAckEvent(AcceptWarningAckTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the AcceptWarningAck state.
event
- The event to send.void sendAcceptWarningAckEvent()
Send a TradeEvent
with no fields to trigger the trade to transition into the AcceptWarningAck state.
String getRequestID()
String getUsername()
com.caplin.trading.Trade getBackingTrade()
Copyright © 2020 Caplin Systems.