private BigDecimal getExchangeRateLastSync(String cryptoCurrency, String fiatCurrency) {
    if (!ICurrencies.NXT.equalsIgnoreCase(cryptoCurrency)) {
      return null; // unsupported currency
    }
    OrderBookResponse orderBookResponse = api.returnOrderBook("returnOrderBook", "BTC_NXT", 10000);
    if (orderBookResponse != null) {
      BigDecimal[][] asks = orderBookResponse.getAsks();
      BigDecimal asksTotal = BigDecimal.ZERO;
      BigDecimal targetAmount =
          new BigDecimal(100000); // calculate price based on this amount of NXT
      BigDecimal tradableLimit = BigDecimal.ZERO;

      for (int i = 0; i < asks.length; i++) {
        BigDecimal[] ask = asks[i];
        //                log.debug("ask = " + ask);
        asksTotal = asksTotal.add(ask[1]);
        if (targetAmount.compareTo(asksTotal) <= 0) {
          tradableLimit = ask[0];
          break;
        }
      }

      //            System.out.println("tradableLimit = " + tradableLimit);;
      if (tradableLimit != null) {
        BigDecimal btcRate = btcRs.getExchangeRateLast(ICurrencies.BTC, fiatCurrency);
        if (btcRate != null) {
          return btcRate.multiply(tradableLimit);
        }
      }
      return null;
    }

    return null;
  }
 @Override
 public String getPreferredFiatCurrency() {
   return btcRs.getPreferredFiatCurrency();
 }
 @Override
 public Set<String> getFiatCurrencies() {
   return btcRs.getFiatCurrencies();
 }