com.xeiam.xchange.bitmarket.dto.marketdata.BitMarketOrderBook Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-bitmarket Show documentation
Show all versions of xchange-bitmarket Show documentation
XChange implementation for Bitcoin Bitmarket exchange
The newest version!
package com.xeiam.xchange.bitmarket.dto.marketdata;
import java.math.BigDecimal;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @author kpysniak
*/
public class BitMarketOrderBook {
private final BigDecimal[][] asks;
private final BigDecimal[][] bids;
/**
* Constructor
*
* @param asks
* @param bids
*/
public BitMarketOrderBook(@JsonProperty("asks") BigDecimal[][] asks, @JsonProperty("bids") BigDecimal[][] bids) {
this.asks = asks;
this.bids = bids;
}
public BigDecimal[][] getAsks() {
return asks;
}
public BigDecimal[][] getBids() {
return bids;
}
@Override
public String toString() {
StringBuilder asksBuilder = new StringBuilder();
StringBuilder bidsBuilder = new StringBuilder();
for (BigDecimal[] ask : getAsks()) {
asksBuilder.append(Arrays.toString(ask) + ";");
}
for (BigDecimal[] bid : getBids()) {
bidsBuilder.append(Arrays.toString(bid) + ";");
}
return "BitMarketOrderBook{" + "asks=" + asksBuilder + ", bids=" + bidsBuilder + '}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy