Class EtdOptionTrade

    • Method Detail

      • of

        public static EtdOptionTrade of​(TradeInfo tradeInfo,
                                        EtdOptionSecurity security,
                                        double quantity,
                                        double price)
        Obtains an instance from trade information, security, quantity and price.
        Parameters:
        tradeInfo - the trade information
        security - the security that was traded
        quantity - the quantity that was traded
        price - the price that was traded
        Returns:
        the trade
      • getSecurityId

        public SecurityId getSecurityId()
        Description copied from interface: SecurityQuantity
        Gets the security identifier.

        This identifier uniquely identifies the security within the system.

        Specified by:
        getSecurityId in interface SecurityQuantity
        Returns:
        the security identifier
      • getCurrency

        public Currency getCurrency()
        Gets the currency of the trade.

        This is typically the same as the currency of the product.

        Returns:
        the trading currency
      • meta

        public static EtdOptionTrade.Meta meta()
        The meta-bean for EtdOptionTrade.
        Returns:
        the meta-bean, not null
      • builder

        public static EtdOptionTrade.Builder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • metaBean

        public EtdOptionTrade.Meta metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getInfo

        public TradeInfo getInfo()
        Gets the additional trade information, defaulted to an empty instance.

        This allows additional information to be attached to the trade.

        Specified by:
        getInfo in interface PortfolioItem
        Specified by:
        getInfo in interface Trade
        Returns:
        the value of the property, not null
      • getSecurity

        public EtdOptionSecurity getSecurity()
        Gets the security that was traded.
        Returns:
        the value of the property, not null
      • getQuantity

        public double getQuantity()
        Gets the quantity that was traded.

        This is the number of contracts that were traded. This will be positive if buying and negative if selling.

        Specified by:
        getQuantity in interface SecurityQuantity
        Returns:
        the value of the property
      • getPrice

        public double getPrice()
        Gets the price that was traded, in decimal form.

        This is the price agreed when the trade occurred.

        Specified by:
        getPrice in interface SecurityQuantityTrade
        Returns:
        the value of the property
      • toBuilder

        public EtdOptionTrade.Builder toBuilder()
        Returns a builder that allows this bean to be mutated.
        Returns:
        the mutable builder, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object