
estonlabs.cxtl.exchanges.mexc.spot.v3.domain.OrderQueryResponse Maven / Gradle / Ivy
package estonlabs.cxtl.exchanges.mexc.spot.v3.domain;
import com.fasterxml.jackson.annotation.JsonInclude;
import estonlabs.cxtl.exchanges.a.specification.domain.Order;
import estonlabs.cxtl.exchanges.a.specification.domain.SimpleOrderStatus;
import estonlabs.cxtl.exchanges.mexc.spot.v3.domain.enums.OrderSide;
import estonlabs.cxtl.exchanges.mexc.spot.v3.domain.enums.OrderStatus;
import estonlabs.cxtl.exchanges.mexc.spot.v3.domain.enums.OrderType;
import lombok.Data;
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrderQueryResponse implements Order {
private String symbol;
private String orderId;
private Long orderListId;
private String origClientOrderId;
private String clientOrderId;
private Double price;
private String origQty;
private Double executedQty;
private String cummulativeQuoteQty;
private OrderStatus status;
private String timeInForce;
private OrderType type;
private OrderSide side;
private String stopPrice;
private String icebergQty;
private Long time;
private Long updateTime;
private Boolean isWorking;
private String origQuoteOrderQty;
@Override
public double getCumQty() {
return executedQty;
}
@Override
public Double getLastOrAvgPx() {
return price;
}
@Override
public SimpleOrderStatus getSimpleStatus() {
return switch (status){
case NEW, PARTIALLY_FILLED -> SimpleOrderStatus.OPEN;
case FILLED, CANCELED, PARTIALLY_CANCELED -> SimpleOrderStatus.CLOSED;
};
}
@Override
public String getClOrdId() {
return clientOrderId;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy