com.xeiam.xchange.loyalbit.dto.marketdata.LoyalbitOrderBook Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-loyalbit Show documentation
Show all versions of xchange-loyalbit Show documentation
XChange implementation for the Loyalbit Exchange
The newest version!
package com.xeiam.xchange.loyalbit.dto.marketdata;
import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import si.mazi.rescu.ExceptionalReturnContentException;
/**
* @author Matija Mazi
*/
public class LoyalbitOrderBook {
private final List> bids;
private final List> asks;
public LoyalbitOrderBook(@JsonProperty("bids") List> bids, @JsonProperty("asks") List> asks,
@JsonProperty("status") Integer status) throws ExceptionalReturnContentException {
if (Objects.equals(status, 0)) {
throw new ExceptionalReturnContentException("Status indicates failure: " + status);
}
this.bids = bids;
this.asks = asks;
}
/** (price, amount) */
public List> getBids() {
return bids;
}
/** (price, amount) */
public List> getAsks() {
return asks;
}
@Override
public String toString() {
return "LoyalbitOrderBook [bids=" + bids + ", asks=" + asks + "]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy