T
- An object that extends FXTradeLeg
.public abstract class FXExecution<T extends FXTradeLeg> extends FXTrade
Base class for trade objects within the FX Integration API.
All FX trades which can be executed extend this class.
trade
Constructor and Description |
---|
FXExecution(com.caplin.trading.Trade trade,
T nearLeg,
T farLeg)
Constructs the FXExecution that extends wraps around the
trade object and provides convenience methods for obtaining fields
and sending messages.
|
Modifier and Type | Method and Description |
---|---|
Account |
getAccount()
Returns the account that this trade should be booked against.
|
String |
getBaseCurrency()
Returns the base currency of the currency pair.
|
String |
getCaption()
Returns the caption for the currency pair
|
String |
getCurrencyPair()
Returns the currency pair that this trade should be executed against.
|
String |
getDealtCurrency()
Returns the currency that the amount denominates.
|
T |
getFarLeg()
Returns the far leg for swap trades, or null if this is not a swap trade.
|
T |
getNearLeg()
Returns the near leg of the trade.
|
FXSwapType |
getSwapType()
If the submitted trade is a swap trade, this method will return the swap
type (either Spot Fwd Swap or Fwd Fwd Swap).
|
String |
getTermCurrency()
Returns the term currency of the currency pair.
|
FXTradingType |
getTradingType()
Returns the type of trade that should be executed.
|
String |
toString() |
getTradingProtocol, getTradingSubProtocol
getCurrentState, getField, getRequestID, getTradeChannelSubject, getUsername
public FXExecution(com.caplin.trading.Trade trade, T nearLeg, T farLeg)
trade
- The underlying trading datasource trade object.nearLeg
- The near leg of the trade.farLeg
- The far leg of the trade.public T getNearLeg()
public T getFarLeg()
public FXTradingType getTradingType()
public FXSwapType getSwapType()
public String getCurrencyPair()
public String getCaption()
public String getBaseCurrency()
public String getTermCurrency()
public String getDealtCurrency()
public Account getAccount()
public String toString()
toString
in class MotifTrade
Copyright © 2015 Caplin Systems.