Attributes | Name and Description |
---|---|
|
caplin.fx.trademodel.FxTrade(caplin.trading.trademodel.TradeLegFactory oFactory, caplin.trading.statemachine.StateMachine oStateMachine, caplin.trading.trademodel.TradeMessageService oTradeMessageService, String sTradingProtocol, String sTradingType)
Constructs a |
Attributes | Name and Description |
---|---|
|
void
afterLegAdded(caplin.trading.trademodel.TradeLeg oLeg, int nLegId)
Checks if this is a second leg being added to the trade, and if so sets the instrument to the same value as the first leg. |
|
int
getInitialLegCount(String sTradeType)
Returns the initial number of legs to be completed in a trade based on the trade type. |
|
int
getMaxLegCount(String sTradeType)
Returns the maximum number of legs to be completed in a trade based on the trade type. |
►
caplin.fx.trademodel.FxTrade(caplin.trading.trademodel.TradeLegFactory oFactory, caplin.trading.statemachine.StateMachine oStateMachine, caplin.trading.trademodel.TradeMessageService oTradeMessageService, String sTradingProtocol, String sTradingType)
Constructs a FxTrade
.
caplin.trading.trademodel.TradeLegFactory | oFactory | The Trade leg factory use to create trade legs. Must not be null. |
caplin.trading.statemachine.StateMachine | oStateMachine | A StateMachine suitable for the trading protocol. Must not be null. |
caplin.trading.trademodel.TradeMessageService | oTradeMessageService | A TradeMessageService responsible for sending trade data to and from the trading system. Must not be null. |
String | sTradingProtocol | The protocol used for trading, for example ESP, RFQ or RFS. |
String | sTradingType | The type of trading this instance will perform, for example SPOT, FORWARD or SWAP. |
►
void
afterLegAdded(caplin.trading.trademodel.TradeLeg oLeg, int nLegId)
Checks if this is a second leg being added to the trade, and if so sets the instrument to the same value as the first leg. This assumes that a two legged FX trade represents a swap.
caplin.trading.trademodel.TradeLeg | oLeg | The leg about to be added to the trade. |
int | nLegId | The identifier of the leg being added. |
►
int
getInitialLegCount(String sTradeType)
Returns the initial number of legs to be completed in a trade based on the trade type.
String | sTradeType | A string representation of the trade type (SPOT, FWD, SWAP or FWDFWDSWAP). |
►
int
getMaxLegCount(String sTradeType)
Returns the maximum number of legs to be completed in a trade based on the trade type.
String | sTradeType | A string representation of the trade type (SPOT, FWD, SWAP or FWDFWDSWAP). |