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
,MMRFSTrade
,MMSalesInterventionTrade
,MMSettlementTrade
,MotifOrderStrategy
,OrderCancelTrade
,OrderChangeStateTrade
,OrderDeletionTrade
,OrderSubmissionTrade
,PostTradeAllocationList
,PostTradeAllocationTrade
,RFSTrade
,SalesInterventionTrade
,SettlementInstructionTrade
,SettlementTrade
,ValidateTrade
public class UserTrade extends java.lang.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, java.util.concurrent.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.java.util.concurrent.ScheduledExecutorService
getExecutorService()
Returns the FXIntegrationAPI's executor service for this trade.java.lang.String
getRequestID()
Returns the ID generated from the client.java.lang.String
getUsername()
Returns the username of the logged in user that created this trade.java.lang.String
toString()
-
-
-
Method Detail
-
getUsername
public java.lang.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 java.lang.String getRequestID()
Returns the ID generated from the client. The combination of user and trade is unique.- Returns:
- the request ID.
-
getExecutorService
public java.util.concurrent.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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-