Class TradeLeg


  • public class TradeLeg
    extends Object
    Represents information about a reported trade leg.
    • Constructor Detail

      • TradeLeg

        public TradeLeg()
        Default constructor.
    • Method Detail

      • getLegOrderQuantity

        public final ScaledDecimal getLegOrderQuantity()
        Gets the ordered quantity of this leg.
        Returns:
        the ordered quantity
      • setLegOrderQuantity

        public final void setLegOrderQuantity​(ScaledDecimal value)
        Sets the ordered quantity of this leg.
        Parameters:
        value - the ordered quantity to set
      • getLegQuantity

        public final ScaledDecimal getLegQuantity()
        Gets the actual quantity of the leg as it participated in the spread trade.
        Returns:
        the actual leg quantity
      • setLegQuantity

        public final void setLegQuantity​(ScaledDecimal value)
        Sets the actual quantity of the leg as it participated in the spread trade.
        Parameters:
        value - the actual leg quantity to set
      • getLegReportID

        public final String getLegReportID()
        Gets the report ID for the leg as generated by the clearing system.
        Returns:
        the leg report ID
      • setLegReportID

        public final void setLegReportID​(String value)
        Sets the report ID for the leg as generated by the clearing system.
        Parameters:
        value - the leg report ID to set
      • getLegNumber

        public final int getLegNumber()
        Gets the number identifying the leg within a strategy or spread.
        Returns:
        the leg number
      • setLegNumber

        public final void setLegNumber​(int value)
        Sets the number identifying the leg within a strategy or spread.
        Parameters:
        value - the leg number to set
      • getLegReferenceID

        public final String getLegReferenceID()
        Gets a unique trade ID generated by the clearing system for this leg.
        Returns:
        the leg reference ID
      • setLegReferenceID

        public final void setLegReferenceID​(String value)
        Sets a unique trade ID generated by the clearing system for this leg.
        Parameters:
        value - the leg reference ID to set
      • getLegLastPrice

        public final ScaledDecimal getLegLastPrice()
        Gets the trade price assigned to the leg.
        Returns:
        the leg last price
      • setLegLastPrice

        public final void setLegLastPrice​(ScaledDecimal value)
        Sets the trade price assigned to the leg.
        Parameters:
        value - the leg last price to set
      • getLegPriceType

        public final PriceType getLegPriceType()
        Returns:
        the type of the price associated with the trade. Will not be present for IRS/FRA trades.
      • setLegPriceType

        public final void setLegPriceType​(PriceType value)
        Parameters:
        value - the type of the price associated with the trade. Will not be present for IRS/FRA trades.
      • getLegPriceSubType

        public final PriceSubType getLegPriceSubType()
        Returns:
        further qualification of the Price Type, and determines whether this is an initial (preliminary) or final price.
      • setLegPriceSubType

        public final void setLegPriceSubType​(PriceSubType value)
        Parameters:
        value - further qualification of the Price Type, and determines whether this is an initial (preliminary) or final price.
      • getLegOriginalTimeUnit

        public final OriginalTimeUnit getLegOriginalTimeUnit()
        Gets the Time Unit for this leg of the original trade, e.g. whether it was entered as contracts per day or per month. Note that all trades are normalized to default units in PM API, regardless of the units originally used to enter the trade.
        Returns:
        Leg Original Time Unit
      • setLegOriginalTimeUnit

        public final void setLegOriginalTimeUnit​(OriginalTimeUnit value)
        Gets the Time Unit for this leg of the original trade, e.g. whether it was entered as contracts per day or per month. Note that all trades are normalized to default units in PM API, regardless of the units originally used to enter the trade.
        Parameters:
        value - Leg Original Time Unit
      • getLegDifferentialPrice

        public final ScaledDecimal getLegDifferentialPrice()
        Returns:
        the differential price for spreads, or a TAS or TAM differential price.
      • setLegDifferentialPrice

        public final void setLegDifferentialPrice​(ScaledDecimal value)
        Parameters:
        value - the differential price for spreads, or a TAS or TAM differential price.
      • getLegDifferentialPriceType

        public final DifferentialPriceType getLegDifferentialPriceType()
        Returns:
        the type of differential price represented in the Differential Price attribute.
      • setLegDifferentialPriceType

        public final void setLegDifferentialPriceType​(DifferentialPriceType value)
        Parameters:
        value - the type of differential price represented in the Differential Price attribute.
      • getLegTradingQuantity

        public final ScaledDecimal getLegTradingQuantity()
        Gets leg quantity per Original Time Unit as submitted on a CME ClearPort API trade report when a product has multiple time units, or, Product Variable Quantity Unit (VQU) is not 'S' (standard), and the product subtype (Monthly, daily, weekly) is not equal to the time unit entered for the trade.
        Returns:
        Leg Trading Quantity
      • setLegTradingQuantity

        public final void setLegTradingQuantity​(ScaledDecimal value)
        Gets leg quantity per Original Time Unit as submitted on a CME ClearPort API trade report when a product has multiple time units, or, Product Variable Quantity Unit (VQU) is not 'S' (standard), and the product subtype (Monthly, daily, weekly) is not equal to the time unit entered for the trade.
        Parameters:
        value - Leg Trading Quantity
      • getLegAlternatePrice

        public final ScaledDecimal getLegAlternatePrice()
        Returns:
        leg alternate price.
      • setLegAlternatePrice

        public final void setLegAlternatePrice​(ScaledDecimal value)
        Parameters:
        value - leg alternate price.
      • getLeg

        public final Leg getLeg()
        Returns:
        leg information.
      • getUnderlyingInstruments

        public final TradeLeg.UnderlyingInstruments getUnderlyingInstruments()
        Returns:
        information about Leg Underlying Instruments reported.
      • getLegPositionAmountData

        public final ArrayList<PositionAmountData> getLegPositionAmountData()
        Returns:
        information about Leg Position Amounts reported.