org.knowm.xchange.poloniex.dto.trade.PoloniexAccountBalance Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-poloniex Show documentation
Show all versions of xchange-poloniex Show documentation
XChange implementation for the Poloniex Exchange
package org.knowm.xchange.poloniex.dto.trade;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.Map;
public class PoloniexAccountBalance {
private final Map exchange;
private final Map margin;
private final Map lending;
public PoloniexAccountBalance(
@JsonProperty("exchange") Map exchange,
@JsonProperty("margin") Map margin,
@JsonProperty("lending") Map lending) {
this.exchange = exchange;
this.margin = margin;
this.lending = lending;
}
public Map getExchangeBalance() {
return exchange != null ? Collections.unmodifiableMap(exchange) : Collections.emptyMap();
}
public Map getMarginBalance() {
return margin != null ? Collections.unmodifiableMap(margin) : Collections.emptyMap();
}
public Map getLendingBalance() {
return lending != null ? Collections.unmodifiableMap(lending) : Collections.emptyMap();
}
@Override
public String toString() {
return "PoloniexAvailableAccountBalance{"
+ "exchange="
+ exchange
+ ", margin="
+ margin
+ ", lending="
+ lending
+ '}';
}
public enum ACCOUNT {
EXCHANGE("exchange"),
MARGIN("margin"),
LENDING("lending");
private String name;
ACCOUNT(String name) {
this.name = name;
}
@Override
public String toString() {
return name;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy