Class BlockTradeLeg
- java.lang.Object
-
- com.caplin.motif.fx.trading.block.BlockTradeLeg
-
public class BlockTradeLeg extends java.lang.Object
Represents a trade within an Block Trade
-
-
Constructor Summary
Constructors Constructor Description BlockTradeLeg(com.caplin.trading.Trade trade, java.lang.String legId, LegType legType, java.lang.String tradingType, BlockSwapType swapType)
Instantiates a BlockTrade leg.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Account
getAccount()
Returns the accountjava.lang.String
getAmount()
Returns the amountjava.lang.String
getBaseCurrency()
Returns the base currencyBuySell
getBuySell()
Returns theBuySell
direction of this leg.java.lang.String
getCurrencyPair()
Returns the currency pairjava.lang.String
getCustomField(java.lang.String fieldName)
Returns a field not provided by the getters that was set on the trade.java.lang.String
getDealtCurrency()
Returns the dealt currencyjava.lang.String
getLegId()
The Id of the legjava.lang.String
getSettlementDate()
Returns the settlement datejava.lang.String
getStartDate()
Tenor
getStartTenor()
BlockSwapType
getSwapType()
Returns the swap typeTenor
getTenor()
Returns the tenorjava.lang.String
getTermCurrency()
Returns the term currencyjava.lang.String
getTradingType()
Returns the trading typeboolean
isNetted()
Whether or not this block trade leg is netted.java.lang.String
toString()
Returns the BlockTrade leg as a String
-
-
-
Constructor Detail
-
BlockTradeLeg
public BlockTradeLeg(com.caplin.trading.Trade trade, java.lang.String legId, LegType legType, java.lang.String tradingType, BlockSwapType swapType)
Instantiates a BlockTrade leg.- Parameters:
trade
- the generic tradelegId
- the leg idlegType
- the leg type (NEAR or FAR)tradingType
- the trading type (FWD, SPOT, SWAP or TIME_OPTION)swapType
- the swap type (SPOTFWD or FWDFWD)
-
-
Method Detail
-
isNetted
public boolean isNetted()
Whether or not this block trade leg is netted.- Returns:
true
if this is a netted leg,false
otherwise.
-
getBuySell
public BuySell getBuySell()
Returns theBuySell
direction of this leg.- Returns:
- The
BuySell
direction of this leg.
-
getTenor
public Tenor getTenor()
Returns the tenor- Returns:
- the tenor
-
getStartTenor
public Tenor getStartTenor()
-
getStartDate
public java.lang.String getStartDate()
-
getSettlementDate
public java.lang.String getSettlementDate()
Returns the settlement date- Returns:
- the settlement date
-
getAmount
public java.lang.String getAmount()
Returns the amount- Returns:
- the amount
-
getTradingType
public java.lang.String getTradingType()
Returns the trading type- Returns:
- the trading type
-
getSwapType
public BlockSwapType getSwapType()
Returns the swap type- Returns:
- the swap type
-
getAccount
public Account getAccount()
Returns the account- Returns:
- the account
-
getCurrencyPair
public java.lang.String getCurrencyPair()
Returns the currency pair- Returns:
- the currency pair
-
getBaseCurrency
public java.lang.String getBaseCurrency()
Returns the base currency- Returns:
- the base currency
-
getTermCurrency
public java.lang.String getTermCurrency()
Returns the term currency- Returns:
- the term currency
-
getDealtCurrency
public java.lang.String getDealtCurrency()
Returns the dealt currency- Returns:
- the dealt currency
-
toString
public java.lang.String toString()
Returns the BlockTrade leg as a String- Overrides:
toString
in classjava.lang.Object
- Returns:
- the String representing the BlockTrade leg
-
getLegId
public java.lang.String getLegId()
The Id of the leg- Returns:
- The Id of the leg
-
getCustomField
public java.lang.String getCustomField(java.lang.String fieldName)
Returns a field not provided by the getters that was set on the trade.- Parameters:
fieldName
- The name of the custom field- Returns:
- The value of the custom field
-
-