Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
package org.knowm.xchange.huobi;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.knowm.xchange.currency.Currency;
import org.knowm.xchange.currency.CurrencyPair;
import org.knowm.xchange.dto.Order;
Expand Down Expand Up @@ -43,6 +35,15 @@
import org.knowm.xchange.huobi.dto.marketdata.HuobiTicker;
import org.knowm.xchange.huobi.dto.trade.HuobiOrder;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class HuobiAdapters {
private static final String ONLINE = "allowed";
private static final String DELISTED = "delisted";
Expand Down Expand Up @@ -137,7 +138,7 @@ private static CurrencyMetaData adaptCurrencyMetaData(
private static CurrencyMetaData getCurrencyMetaData(
HuobiCurrency huobiCurrency, boolean isDelisted) {
int withdrawPrecision = huobiCurrency.getWithdrawPrecision();
BigDecimal transactFeeWithdraw = new BigDecimal(huobiCurrency.getTransactFeeWithdraw());
BigDecimal transactFeeWithdraw = huobiCurrency.getTransactFeeWithdraw() != null ? new BigDecimal(huobiCurrency.getTransactFeeWithdraw()) : BigDecimal.ZERO;
BigDecimal minWithdrawAmt = new BigDecimal(huobiCurrency.getMinWithdrawAmt());
WalletHealth walletHealthStatus =
isDelisted ? WalletHealth.OFFLINE : getWalletHealthStatus(huobiCurrency);
Expand Down