public interface TradeChannelListener
Trade
lifecycle.
When a client initiates a new Trade the TradeChannelListener is notified with a call to tradeCreated(Trade)
.
When a trade has been closed (either due to a successful completion or any other exit case),
the TradeChannelListener is notified with a call to tradeClosed(Trade)
.
Modifier and Type | Method and Description |
---|---|
void |
tradeClosed(Trade trade)
Called when a trade has closed due to it reaching a terminal state, or the channel is being closed
while the trade is in progress.
|
void |
tradeCreated(Trade trade)
Called when a new trade is initiated by a client.
|
void tradeCreated(Trade trade) throws TradeException
trade
- The Trade object representing the trade conversation that has been initiated. This
object should be used for subsequent events relating to the trade conversation.TradeException
- Throw this if it is not possible to start this trade, for example if the trading system
is unavailable or cannot accept this trade conversion for some reason.void tradeClosed(Trade trade)
trade
- The Trade object representing this trade conversation.Please send bug reports and comments to Caplin support