Class Trade

java.lang.Object
org.knowm.xchange.dto.marketdata.Trade
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UserTrade

public class Trade extends Object implements Serializable
Data object representing a Trade
See Also:
  • Field Details

    • type

      protected Order.OrderType type
      Did this trade result from the execution of a bid or a ask?
    • originalAmount

      protected BigDecimal originalAmount
      Amount that was traded
    • instrument

      protected Instrument instrument
      The instrument
    • price

      protected BigDecimal price
      The price
    • timestamp

      protected Date timestamp
      The timestamp of the trade according to the exchange's server, null if not provided
    • id

      protected String id
      The trade id
    • makerOrderId

      protected String makerOrderId
    • takerOrderId

      protected String takerOrderId
  • Constructor Details

    • Trade

      public Trade()
  • Method Details

    • getCurrencyPair

      @Deprecated public CurrencyPair getCurrencyPair()
      Deprecated.
      CurrencyPair is a subtype of Instrument - this method will throw an exception if the order was for a derivative

      use

      invalid reference
      #getInstrument()
      instead