Get the order

@param currencyPair
@return
@throws IOException
480392
public BitZTrades getOrder(CurrencyPair currencyPair) throws IOException {
    BitZTradesResult result = bitz.getOrder(BitZUtils.toPairString(currencyPair));
    return result.getData();
  }
714110
@Override
  public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException {
    OkCoinFuturesTradeHistoryParams myParams = (OkCoinFuturesTradeHistoryParams) params;
    long orderId = myParams.getOrderId() != null ? Long.valueOf(myParams.getOrderId()) : -1;
    CurrencyPair currencyPair = myParams.getCurrencyPair();
    String date = myParams.getDate();
    String page = myParams.getPageNumber().toString();
    String pageLength = myParams.getPageLength().toString();
    FuturesContract reqFuturesContract = myParams.futuresContract;

    OkCoinFuturesTradeHistoryResult[] orderHistory =
        getFuturesTradesHistory(OkCoinAdapters.adaptSymbol(currencyPair), orderId, date);

    return OkCoinAdapters.adaptTradeHistory(orderHistory);
  }
816338
public static BitstampGenericOrder adaptOrder(
      String orderId, BitstampOrderStatusResponse bitstampOrderStatusResponse) {

    BitstampOrderTransaction[] bitstampTransactions = bitstampOrderStatusResponse.getTransactions();

    // Use only the first transaction, because we assume that for a single order id all transactions
    // will
    // be of the same currency pair
    CurrencyPair currencyPair = adaptCurrencyPair(bitstampTransactions[0]);
    Date date = bitstampTransactions[0].getDatetime();

    BigDecimal averagePrice =
        Arrays.stream(bitstampTransactions)
            .map(t -> t.getPrice())
            .reduce((x, y) -> x.add(y))
            .get()
            .divide(BigDecimal.valueOf(bitstampTransactions.length), 2);

    BigDecimal cumulativeAmount =
        Arrays.stream(bitstampTransactions)
            .map(t -> getBaseCurrencyAmountFromBitstampTransaction(t))
            .reduce((x, y) -> x.add(y))
            .get();

    BigDecimal totalFee =
        Arrays.stream(bitstampTransactions).map(t -> t.getFee()).reduce((x, y) -> x.add(y)).get();

    Order.OrderStatus orderStatus = adaptOrderStatus(bitstampOrderStatusResponse.getStatus());

    BitstampGenericOrder bitstampGenericOrder =
        new BitstampGenericOrder(
            null, // not discernable from response data
            null, // not discernable from the data
            currencyPair,
            orderId,
            date,
            averagePrice,
            cumulativeAmount,
            totalFee,
            orderStatus);

    return bitstampGenericOrder;
  }
1230224
public OkCoinPositionResult getFuturesPositionsFixed(
      CurrencyPair currencyPair, FuturesContract contract) throws IOException {
    return okCoin.getFuturesPositionsFixed(
        apikey, OkCoinAdapters.adaptSymbol(currencyPair), contract.getName(), signatureCreator());
  }
32709
@Override
  public String requestDepositAddress(Currency currency, String... arguments) throws IOException {
    try {
      CoingiDepositWalletRequest request =
          new CoingiDepositWalletRequest().setCurrency(currency.getCurrencyCode().toUpperCase());
      return depositWallet(request).getAddress();
    } catch (CoingiException e) {
      throw CoingiErrorAdapter.adapt(e);
    }
  }
101346
public OkCoinFutureHoldAmount[] getFutureHoldAmount(
      CurrencyPair currencyPair, FuturesContract contractType) throws IOException {
    return okCoin.getFutureHoldAmount(
        "1", OkCoinAdapters.adaptSymbol(currencyPair), contractType.getName());
  }
889496
public Map<Currency, Map<Currency, BigDecimal>> getCurrencyCoinRate(CurrencyPair... currencyPairs)
      throws IOException {
    List<String> coinList = new ArrayList<>(currencyPairs.length);
    Arrays.stream(currencyPairs)
        .forEach(currencyPair -> coinList.add(currencyPair.base.getCurrencyCode().toLowerCase()));
    String coins = coinList.stream().collect(Collectors.joining(","));
    return bitz.getCurrencyCoinRate(coins).getData();
  }
583803
public static CurrencyPair fromLunoPair(String lunoPair) {
    return new CurrencyPair(
        fromLunoCurrency(lunoPair.substring(0, 3)), fromLunoCurrency(lunoPair.substring(3)));
  }
1354776
@Override
  public String requestDepositAddress(Currency currency, String... arguments) throws IOException {

    CryptonitDepositAddress response = null;

    throw new NotYetImplementedForExchangeException();
    // return response.getDepositAddress();
  }
751574
public OkCoinOrderResult getOrder(long orderId, String symbol) throws IOException {

    OkCoinOrderResult orderResult = okCoin.getOrder(apikey, orderId, symbol, signatureCreator());
    return returnOrThrow(orderResult);
  }
461846
public static OrderBook adaptOrderBook(
      CryptonitOrderBook cryptonitOrderBook, CurrencyPair currencyPair) {
    List<LimitOrder> asks = createOrders(currencyPair, OrderType.ASK, cryptonitOrderBook.getAsks());
    List<LimitOrder> bids = createOrders(currencyPair, OrderType.BID, cryptonitOrderBook.getBids());
    return new OrderBook(cryptonitOrderBook.getTimestamp(), asks, bids);
  }
522643
public CurrencyUnit getCurrency(CurrencyQuery query) {
        Set<CurrencyUnit> currencies = getCurrencies(query);
        if (currencies.isEmpty()) {
            return null;
        }
        if (currencies.size() == 1) {
            return currencies.iterator().next();
        }
        throw new MonetaryException("Ambiguous request for CurrencyUnit: " + query + ", found: " + currencies);
    }
253630
public AbucoinsOrder getAbucoinsOrder(String orderID) throws IOException {
    AbucoinsOrder order =
        abucoinsAuthenticated.getOrder(
            orderID,
            exchange.getExchangeSpecification().getApiKey(),
            signatureCreator,
            exchange.getExchangeSpecification().getPassword(),
            timestamp());
    if (order.getMessage() != null) throw new ExchangeException(order.getMessage());

    return order;
  }
1281104
public BitZKline getKline(
      CurrencyPair currencyPair, BitZKlineResolution resolution, Integer size, String microsecond)
      throws IOException {
    return bitz.getKline(BitZUtils.toPairString(currencyPair), resolution.code(), size, microsecond)
        .getData();
  }
792022
@Override
    public ExchangeRate getExchangeRate(ConversionQuery conversionQuery) {
        for (ExchangeRateProvider prov : this.providers) {
            try {
                if (prov.isAvailable(conversionQuery)) {
                    ExchangeRate rate = prov.getExchangeRate(conversionQuery);
                    if (Objects.nonNull(rate)) {
                        return rate;
                    }
                }
            } catch (Exception e) {
                throw new CurrencyConversionException(conversionQuery.getBaseCurrency(), conversionQuery.getCurrency(), null,
                    "Rate Provider did not return data though at check before data was flagged as available," +
                        " provider=" + prov.getContext().getProviderName() + ", query=" + conversionQuery, e);
            }
        }
        throw new CurrencyConversionException(conversionQuery.getBaseCurrency(), conversionQuery.getCurrency(), null,
                "All delegate prov iders failed to deliver rate, providers=" + this.providers +
                        ", query=" + conversionQuery);
    }
1072616
public static CurrencyUnit getCurrency(CurrencyQuery query) {
        return Optional.ofNullable(MONETARY_CURRENCIES_SINGLETON_SPI()).orElseThrow(
                () -> new MonetaryException("No MonetaryCurrenciesSingletonSpi loaded, check your system setup."))
                .getCurrency(query);
    }
487598
public Map<Long, DSXTransHistoryResult> getDSXTransHistory(
      Integer count,
      Long fromId,
      Long toId,
      DSXAuthenticatedV2.SortOrder sortOrder,
      Long since,
      Long end,
      DSXTransHistoryResult.Type type,
      DSXTransHistoryResult.Status status,
      String currency)
      throws IOException {
    DSXTransHistoryReturn dsxTransHistory =
        dsx.transHistory(
            apiKey,
            signatureCreator,
            exchange.getNonceFactory(),
            count,
            fromId,
            toId,
            sortOrder,
            since,
            end,
            type,
            status,
            currency);
    checkResult(dsxTransHistory);
    return dsxTransHistory.getReturnValue();
  }