Class BlockTradeLeg


  • public class BlockTradeLeg
    extends Object
    Represents a trade within an Block Trade
    • Constructor Detail

      • BlockTradeLeg

        public BlockTradeLeg​(com.caplin.trading.Trade trade,
                             String legId,
                             LegType legType,
                             String tradingType,
                             BlockSwapType swapType)
        Instantiates a BlockTrade leg.
        Parameters:
        trade - the generic trade
        legId - the leg id
        legType - 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 the BuySell 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 String getStartDate()
      • getSettlementDate

        public String getSettlementDate()
        Returns the settlement date
        Returns:
        the settlement date
      • getAmount

        public String getAmount()
        Returns the amount
        Returns:
        the amount
      • getTradingType

        public 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 String getCurrencyPair()
        Returns the currency pair
        Returns:
        the currency pair
      • getBaseCurrency

        public String getBaseCurrency()
        Returns the base currency
        Returns:
        the base currency
      • getTermCurrency

        public String getTermCurrency()
        Returns the term currency
        Returns:
        the term currency
      • getDealtCurrency

        public String getDealtCurrency()
        Returns the dealt currency
        Returns:
        the dealt currency
      • toString

        public String toString()
        Returns the BlockTrade leg as a String
        Overrides:
        toString in class Object
        Returns:
        the String representing the BlockTrade leg
      • getLegId

        public String getLegId()
        The Id of the leg
        Returns:
        The Id of the leg
      • getCustomField

        public String getCustomField​(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