Class OrderBookUpdate

java.lang.Object
org.knowm.xchange.dto.marketdata.OrderBookUpdate
All Implemented Interfaces:
Serializable

public final class OrderBookUpdate extends Object implements Serializable
Immutable data object representing a Market Depth update.
See Also:
  • Constructor Details

    • OrderBookUpdate

      public OrderBookUpdate(Order.OrderType type, BigDecimal volume, Instrument instrument, BigDecimal limitPrice, Date timestamp, BigDecimal totalVolume)
      Build an order book update.
      Parameters:
      type - the order type (BID/ASK)
      volume - volume of the limit order in the base currency (i.e. BTC for BTC/USD)
      instrument - the instrument traded (e.g. BTC/USD)
      limitPrice - the price of this update in counter currency per base currency (i.e. $/BTC in BTC/USD)
      timestamp - the timestamp for the update
      totalVolume - the total new volume of open orders for this price in the order book, in the base currency
  • Method Details

    • getLimitOrder

      public LimitOrder getLimitOrder()
      Get the limit order.
      Returns:
      the limit order
    • getTotalVolume

      public BigDecimal getTotalVolume()
      Get the total volume.
      Returns:
      the total volume
    • toString

      public String toString()
      Overrides:
      toString in class Object