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

estonlabs.cxtl.exchanges.mexc.spot.v3.domain.OrderBookSnapshot Maven / Gradle / Ivy

There is a newer version: 1.4.14
Show newest version
package estonlabs.cxtl.exchanges.mexc.spot.v3.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import estonlabs.cxtl.common.stream.managed.MarketData;
import lombok.Data;
import lombok.ToString;

import java.util.List;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
@Data
public class OrderBookSnapshot implements MarketData {
    @JsonProperty("lastUpdateId")
    private Long seqNo;
    @JsonProperty("bids")
    private List bids;
    @JsonProperty("asks")
    private List asks;
    @JsonProperty("timestamp")
    private long timestamp;

    @Override
    public boolean isSnapshot() {
        return true;
    }

    @Override
    public String getTopic() {
        return null;
    }

    @Override
    public Long getTimestamp() {
        return timestamp;
    }

    @Override
    public boolean hasData() {
        return bids != null || asks != null;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy