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
,CommoditiesSettlementTrade
,DrawdownTrade
,EditStrategyRequest
,EditStrategyTrade
,ESPTrade
,MMCapitalIncreaseTrade
,MMPostTradeTrade
,MMRFSTrade
,MMSalesInterventionTrade
,MMSettlementTrade
,MotifOrderStrategy
,OrderCancelTrade
,OrderChangeStateTrade
,OrderDeletionTrade
,OrderSubmissionTrade
,PostTradeAllocationList
,PostTradeAllocationTrade
,RFSTrade
,SalesInterventionTrade
,SettlementInstructionTrade
,SettlementTrade
,ValidateTrade
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
ConstructorDescriptionUserTrade
(com.caplin.trading.Trade backingTrade, ScheduledExecutorService executorService) Constructor used by the generated code. -
Method Summary
Modifier and TypeMethodDescriptioncom.caplin.trading.Trade
Returns the trade created by the logged in user.Returns the FXIntegrationAPI's executor service for this trade.Returns the ID generated from the client.Returns the username of the logged in user that created this trade.toString()
-
Constructor Details
-
UserTrade
Constructor used by the generated code.
- Parameters:
backingTrade
- - A single Trade active in the systemexecutorService
- - Sets executorService
-
-
Method Details
-
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
Returns the ID generated from the client. The combination of user and trade is unique.- Returns:
- the request ID.
-
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.
-
toString
-