estonlabs.cxtl.exchanges.mexc.spot.v3.domain.OrderBookSnapshot Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cxtl Show documentation
Show all versions of cxtl Show documentation
CXTL – Crypto eXchange Trading Library
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;
}
}