All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.knowm.xchange.poloniex.dto.trade.PoloniexMoveResponse Maven / Gradle / Ivy

There is a newer version: 5.2.0
Show newest version
package org.knowm.xchange.poloniex.dto.trade;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
import org.knowm.xchange.poloniex.dto.marketdata.PoloniexPublicTrade;
import si.mazi.rescu.ExceptionalReturnContentException;

public class PoloniexMoveResponse {

  private boolean success;

  private Long orderNumber;

  private Map> resultingTrades;

  @JsonCreator
  public PoloniexMoveResponse(
      @JsonProperty("success") Boolean success,
      @JsonProperty("orderNumber") Long orderNumber,
      @JsonProperty("resultingTrades") Map> resultingTrades) {

    if (orderNumber == null) {
      throw new ExceptionalReturnContentException("No trade data in response");
    }
    this.success = success;
    this.orderNumber = orderNumber;
    this.resultingTrades = resultingTrades;
  }

  public boolean success() {

    return success;
  }

  public Long getOrderNumber() {

    return orderNumber;
  }

  public Map> getPoloniexPublicTrades() {

    return resultingTrades;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy