Package com.caplin.motif
Class UserTrade
- java.lang.Object
-
- com.caplin.motif.UserTrade
-
- Direct Known Subclasses:
AllocateTrade
,AmendTrade
,BlockTrade
,BulkOrderActionTrade
,BulkOrderActionTrade
,BulkOrderSubmissionTrade
,CancelRequest
,CancelTrade
,ChangeActiveState
,EditStrategyRequest
,EditStrategyTrade
,ESPTrade
,MMRFSTrade
,MotifOrderStrategy
,OrderCancelTrade
,OrderChangeStateTrade
,OrderDeletionTrade
,OrderSubmissionTrade
,PostTradeAllocationList
,PostTradeAllocationTrade
,RFSTrade
,SalesInterventionTrade
,SettlementTrade
,ValidateTrade
public class UserTrade extends Object
A single UserTrade 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 cashflow. 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.
-
-
Constructor Summary
Constructors Constructor Description UserTrade(com.caplin.trading.Trade backingTrade, ScheduledExecutorService executorService)
Constructor used by the generated code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.caplin.trading.Trade
getBackingTrade()
Returns the trade created by the logged in user.ScheduledExecutorService
getExecutorService()
Returns the FXIntegrationAPI's executor service for this trade.String
getRequestID()
Returns the ID generated from the client.String
getUsername()
Returns the username of the logged in user that created this trade.String
toString()
-
-
-
Constructor Detail
-
UserTrade
public UserTrade(com.caplin.trading.Trade backingTrade, ScheduledExecutorService executorService)
Constructor used by the generated code.
- Parameters:
backingTrade
- - A single Trade active in the systemexecutorService
- - Sets executorService
-
-
Method Detail
-
getUsername
public String getUsername()
Returns the username of the logged in user that created this trade.- Returns:
- the username of the logged in user.
-
getBackingTrade
public com.caplin.trading.Trade getBackingTrade()
Returns the trade created by the logged in user.- Returns:
- the trade created by the logged in user.
-
getRequestID
public String getRequestID()
Returns the ID generated from the client. The combination of user and trade is unique.- Returns:
- the request ID.
-
getExecutorService
public ScheduledExecutorService getExecutorService()
Returns the FXIntegrationAPI's executor service for this trade. Client callbacks are already processed on this thread, and you may single thread your back end system callbacks on here to aid in processing events sequentially.- Returns:
- The FXIntegrationAPI's executor service for this trade.
-
-