estonlabs.cxtl.exchanges.binance.fapi.domain.stream.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.binance.fapi.domain.stream;
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;
@Override
public boolean isSnapshot() {
return true;
}
@Override
public String getTopic() {
return null;
}
@Override
public Long getTimestamp() {
return null;
}
@Override
public boolean hasData() {
return bids != null || asks != null;
}
@Override
public MessageType getMessageType() {
return MessageType.DATA;
}
}