Class BlockTradeLeg


  • public class BlockTradeLeg
    extends java.lang.Object
    Represents a trade within an Block Trade
    • 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 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 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 class java.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