public class ESPTrade extends FXExecution<FXExecutionTradeLeg>
An ESPTrade is a domain object that represents an Executable Streaming Price trade. These trades are generally executed from a trade tile.
You do not need to construct instances of this class yourself. Instances of
this class are created by the FX Integration API in response to ESP trade requests
from the client, and passed to your implementation of ESPTradeListenerFactory.createESPTradeListener(ESPTrade)
.
trade
Modifier and Type | Method and Description |
---|---|
String |
getAmount()
Returns the amount at which the ESP trade should be executed.
|
ClientCloseSentResponder |
getClientCloseSentResponder()
Returns the responder used for sending events from the ClientCloseSent state.
|
PickedUpResponder |
getPickedUpResponder()
Returns the responder used for sending events from the PickedUp state.
|
QueuedResponder |
getQueuedResponder()
Returns the responder used for sending events from the Queued state.
|
SubmittedResponder |
getSubmittedResponder()
Returns the responder used for sending events from the Submitted state.
|
FXTradingProtocol |
getTradingProtocol()
Returns the
FXTradingProtocol that was used to enter this trade. |
TradingSubProtocol |
getTradingSubProtocol()
Returns the
TradingSubProtocol that was used to enter this trade. |
getAccount, getBaseCurrency, getCaption, getCurrencyPair, getDealtCurrency, getFarLeg, getNearLeg, getSwapType, getTermCurrency, getTradingType, toString
getCurrentState, getField, getRequestID, getTradeChannelSubject, getUsername
public String getAmount()
public SubmittedResponder getSubmittedResponder()
Returns the responder used for sending events from the Submitted state.
This responder is the first one you should use after you receive the the ESPTradeListener.onSubmit(com.caplin.motif.fx.trading.esp.event.ESPSubmitEvent)
callback, and you should use it to send an acknowledgement that you have received the trade request by calling SubmittedResponder.sendSubmitAck(com.caplin.motif.fx.trading.esp.event.ESPSubmitAckEvent)
.
This is typically done immediately on receiving the event, before submitting anything to the trading system.
public QueuedResponder getQueuedResponder()
Returns the responder used for sending events from the Queued state.
When the backend system auto trader or a manual dealer picks up the trade,
this responder should be used to transition to the PickedUp state by calling
QueuedResponder.sendPickUp(com.caplin.motif.fx.trading.esp.event.ESPPickUpEvent)
.
public PickedUpResponder getPickedUpResponder()
Returns the responder used for sending events from the PickedUp state.
Once the trade has been confirmed or rejected, this responder should be used to represent those transitions.
public ClientCloseSentResponder getClientCloseSentResponder()
Returns the responder used for sending events from the ClientCloseSent state.
If a client attempts to close a trade, probably from the Queued state, the current state will be ClientCloseSent. Once the trade cancelation request has been confirmed or rejected, this responder should be used to represent those transitions.
ClientCloseSentResponder
instead
of the deprecated class ClientCloseSentResponder
.public FXTradingProtocol getTradingProtocol()
FXTrade
FXTradingProtocol
that was used to enter this trade.getTradingProtocol
in class FXTrade
FXTradingProtocol
used to enter this trade.public TradingSubProtocol getTradingSubProtocol()
FXTrade
TradingSubProtocol
that was used to enter this trade.
This defaults to TradingSubProtocol.NONE
if no protocol was provided.getTradingSubProtocol
in class FXTrade
TradingSubProtocol
that was use to enter this trade.Copyright © 2015 Caplin Systems.