Class LimitOrder

    • Field Detail

      • limitPrice

        protected final BigDecimal limitPrice
        The limit price
    • Constructor Detail

      • LimitOrder

        public LimitOrder​(Order.OrderType type,
                          BigDecimal originalAmount,
                          Instrument instrument,
                          String id,
                          Date timestamp,
                          BigDecimal limitPrice)
        Parameters:
        type - Either BID (buying) or ASK (selling)
        originalAmount - The amount to trade
        instrument - The identifier (e.g. BTC/USD)
        id - An id (usually provided by the exchange)
        timestamp - a Date object representing the order's timestamp according to the exchange's server, null if not provided
        limitPrice - In a BID this is the highest acceptable price, in an ASK this is the lowest acceptable price
      • LimitOrder

        public LimitOrder​(Order.OrderType type,
                          BigDecimal originalAmount,
                          BigDecimal cumulativeAmount,
                          Instrument instrument,
                          String id,
                          Date timestamp,
                          BigDecimal limitPrice)
        Parameters:
        type - Either BID (buying) or ASK (selling)
        originalAmount - The amount to trade
        cumulativeAmount - The cumulative amount
        instrument - The identifier (e.g. BTC/USD)
        id - An id (usually provided by the exchange)
        timestamp - a Date object representing the order's timestamp according to the exchange's server, null if not provided
        limitPrice - In a BID this is the highest acceptable price, in an ASK this is the lowest acceptable price
      • LimitOrder

        public LimitOrder​(Order.OrderType type,
                          BigDecimal originalAmount,
                          Instrument instrument,
                          String id,
                          Date timestamp,
                          BigDecimal limitPrice,
                          BigDecimal averagePrice,
                          BigDecimal cumulativeAmount,
                          BigDecimal fee,
                          Order.OrderStatus status)
        Parameters:
        type - Either BID (buying) or ASK (selling)
        originalAmount - The amount to trade
        instrument - The identifier (e.g. BTC/USD)
        id - An id (usually provided by the exchange)
        timestamp - a Date object representing the order's timestamp according to the exchange's server, null if not provided
        limitPrice - In a BID this is the highest acceptable price, in an ASK this is the lowest acceptable price
        averagePrice - the weighted average price of any fills belonging to the order
        cumulativeAmount - the amount that has been filled
        fee - the fee associated with this order
        status - the status of the order at the exchange or broker
      • LimitOrder

        public LimitOrder​(Order.OrderType type,
                          BigDecimal originalAmount,
                          Instrument instrument,
                          String id,
                          Date timestamp,
                          BigDecimal limitPrice,
                          BigDecimal averagePrice,
                          BigDecimal cumulativeAmount,
                          BigDecimal fee,
                          Order.OrderStatus status,
                          String userReference)
        Parameters:
        type - Either BID (buying) or ASK (selling)
        originalAmount - The amount to trade
        instrument - The identifier (e.g. BTC/USD)
        id - An id (usually provided by the exchange)
        timestamp - a Date object representing the order's timestamp according to the exchange's server, null if not provided
        limitPrice - In a BID this is the highest acceptable price, in an ASK this is the lowest acceptable price
        averagePrice - the weighted average price of any fills belonging to the order
        cumulativeAmount - the amount that has been filled
        status - the status of the order at the exchange or broker
        userReference - An id provided by the user