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

estonlabs.cxtl.exchanges.binance.fapi.domain.stream.OrderTradeUpdate Maven / Gradle / Ivy

package estonlabs.cxtl.exchanges.binance.fapi.domain.stream;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import estonlabs.cxtl.common.stream.managed.InboundMessage;
import estonlabs.cxtl.exchanges.binance.fapi.domain.enums.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

@Getter
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OrderTradeUpdate extends StreamUpdate {
    public OrderTradeUpdate(){
        super(MessageType.DATA);
    }

    @Data
    public static class Order implements InboundMessage{
        @JsonProperty("s")
        private String symbol;
        @JsonProperty("c")
        private String clientOrderId;
        @JsonProperty("S")
        private Side side;
        @JsonProperty("o")
        private OrderType orderType;
        @JsonProperty("f")
        private TimeInForce timeInForce;
        @JsonProperty("q")
        private Double originalQuantity;
        @JsonProperty("p")
        private Double originalPrice;
        @JsonProperty("ap")
        private Double averagePrice;
        @JsonProperty("sp")
        private Double stopPrice;
        @JsonProperty("x")
        private ExecutionType executionType;
        @JsonProperty("X")
        private OrderStatus orderStatus;
        @JsonProperty("i")
        private Long orderId;
        @JsonProperty("l")
        private Double lastFilledQuantity;
        @JsonProperty("z")
        private Double filledAccumulatedQuantity;
        @JsonProperty("L")
        private Double lastFilledPrice;
        @JsonProperty("N")
        private String commissionAsset;
        @JsonProperty("n")
        private String commission;
        @JsonProperty("T")
        private Long orderTradeTime;
        @JsonProperty("t")
        private Long tradeId;
        @JsonProperty("b")
        private Double bidsNotional;
        @JsonProperty("a")
        private Double askNotional;
        @JsonProperty("m")
        private Boolean isMaker;
        @JsonProperty("R")
        private Boolean isReduceOnly;
        @JsonProperty("wt")
        private WorkingType stopPriceWorkingType;
        @JsonProperty("ot")
        private OrderType originalOrderType;
        @JsonProperty("ps")
        private String positionSide;  // This could also be an enum if you have specific values.
        @JsonProperty("cp")
        private Boolean closeAll;
        @JsonProperty("AP")
        private Double activationPrice;
        @JsonProperty("cr")
        private String callbackRate;
        @JsonProperty("pP")
        private Boolean priceProtection;
        @JsonProperty("si")
        private Long ignoreSi;
        @JsonProperty("ss")
        private Long ignoreSs;
        @JsonProperty("rp")
        private Double realizedProfit;
        @JsonProperty("V")
        private String stpMode;       // This could be an enum if specified.
        @JsonProperty("pm")
        private String priceMatchMode; // This could also be an enum.
        @JsonProperty("gtd")
        private Long gtdOrderAutoCancelTime;

        @Override
        @JsonIgnore
        public MessageType getMessageType() {
            return MessageType.DATA;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy