Class OrderDTO


  • public final class OrderDTO
    extends Object
    DTO representing an order. An order is a request by an investor to buy or sell.
    • Method Detail

      • updateStatus

        public void updateStatus​(OrderStatusDTO newStatus)
        Allows you to manually update order status.
        Parameters:
        newStatus - new status
      • getTrade

        public Optional<TradeDTO> getTrade​(String tradeId)
        Returns trade from its id.
        Parameters:
        tradeId - trade id
        Returns:
        trade
      • getAmountValue

        public BigDecimal getAmountValue()
        Returns amount value.
        Returns:
        amount value
      • getAveragePriceValue

        public BigDecimal getAveragePriceValue()
        Returns average price value.
        Returns:
        average price value.
      • getLimitPriceValue

        public BigDecimal getLimitPriceValue()
        Returns limit price value.
        Returns:
        limit price value
      • getMarketPriceValue

        public BigDecimal getMarketPriceValue()
        Returns market price.
        Returns:
        market price value
      • getCumulativeAmountValue

        public BigDecimal getCumulativeAmountValue()
        Returns cumulative amount.
        Returns:
        cumulative amount.
      • isFulfilled

        public boolean isFulfilled()
        Returns true if the order has been fulfilled with trades.
        Returns:
        true if order completed
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • getId

        public Long getId()
        Technical id.
      • getOrderId

        public String getOrderId()
        An identifier set by the exchange that uniquely identifies the order.
      • getType

        public OrderTypeDTO getType()
        Order type i.e. bid (buy) or ask (sell).
      • getStrategy

        public StrategyDTO getStrategy()
        The strategy that created the order.
      • getCurrencyPair

        public CurrencyPairDTO getCurrencyPair()
        Currency pair.
      • getAmount

        public CurrencyAmountDTO getAmount()
        Amount to be ordered / amount that was ordered.
      • getAveragePrice

        public CurrencyAmountDTO getAveragePrice()
        Weighted Average price of the fills in the order.
      • getMarketPrice

        public CurrencyAmountDTO getMarketPrice()
        Market price - The price Cassandre had when the order was created.
      • getLeverage

        public String getLeverage()
        The leverage to use for margin related to this order.
      • getCumulativeAmount

        public CurrencyAmountDTO getCumulativeAmount()
        Amount to be ordered / amount that has been matched against order on the order book/filled.
      • getUserReference

        public String getUserReference()
        An identifier provided by the user on placement that uniquely identifies the order.
      • getTimestamp

        public ZonedDateTime getTimestamp()
        The timestamp of the order.
      • getTrades

        public Set<TradeDTO> getTrades()
        All trades related to the order.