Search in sources :

Example 6 with BiboxException

use of org.knowm.xchange.bibox.BiboxException in project XChange by knowm.

the class BiboxAccountServiceRaw method requestBiboxDeposits.

public BiboxPage<BiboxDeposit> requestBiboxDeposits(BiboxFundsCommandBody body) {
    try {
        BiboxPagedResponses<BiboxDeposit> response = bibox.transferInList(BiboxCommands.depositsCommand(body).json(), apiKey, signatureCreator);
        throwErrors(response);
        BiboxPage<BiboxDeposit> page = response.get().getResult();
        return page;
    } catch (BiboxException e) {
        throw new ExchangeException(e.getMessage());
    }
}
Also used : BiboxDeposit(org.knowm.xchange.bibox.dto.account.BiboxDeposit) ExchangeException(org.knowm.xchange.exceptions.ExchangeException) BiboxException(org.knowm.xchange.bibox.BiboxException)

Example 7 with BiboxException

use of org.knowm.xchange.bibox.BiboxException in project XChange by knowm.

the class BiboxAccountServiceRaw method requestBiboxDepositAddress.

public String requestBiboxDepositAddress(Currency currency) {
    try {
        BiboxSingleResponse<String> response = bibox.depositAddress(BiboxCommands.depositAddressCommand(currency.getCurrencyCode()).json(), apiKey, signatureCreator);
        throwErrors(response);
        return response.get().getResult();
    } catch (BiboxException e) {
        throw new ExchangeException(e.getMessage());
    }
}
Also used : ExchangeException(org.knowm.xchange.exceptions.ExchangeException) BiboxException(org.knowm.xchange.bibox.BiboxException)

Example 8 with BiboxException

use of org.knowm.xchange.bibox.BiboxException in project XChange by knowm.

the class BiboxAccountServiceRaw method requestBiboxWithdraw.

public void requestBiboxWithdraw(BiboxTransferCommandBody body) {
    try {
        BiboxSingleResponse<String> response = bibox.transfer(BiboxCommands.transferCommand(body).json(), apiKey, signatureCreator);
        throwErrors(response);
    } catch (BiboxException e) {
        throw new ExchangeException(e.getMessage());
    }
}
Also used : ExchangeException(org.knowm.xchange.exceptions.ExchangeException) BiboxException(org.knowm.xchange.bibox.BiboxException)

Example 9 with BiboxException

use of org.knowm.xchange.bibox.BiboxException in project XChange by knowm.

the class BiboxMarketDataServiceRaw method getBiboxDeals.

public List<BiboxDeals> getBiboxDeals(CurrencyPair currencyPair, Integer depth) throws IOException {
    try {
        BiboxResponse<List<BiboxDeals>> response = bibox.deals(DEALS_CMD, BiboxAdapters.toBiboxPair(currencyPair), depth);
        throwErrors(response);
        return response.getResult();
    } catch (BiboxException e) {
        throw new ExchangeException(e.getMessage(), e);
    }
}
Also used : List(java.util.List) ExchangeException(org.knowm.xchange.exceptions.ExchangeException) BiboxException(org.knowm.xchange.bibox.BiboxException)

Example 10 with BiboxException

use of org.knowm.xchange.bibox.BiboxException in project XChange by knowm.

the class BiboxMarketDataServiceRaw method getAllBiboxMarkets.

public List<BiboxMarket> getAllBiboxMarkets() throws IOException {
    try {
        BiboxResponse<List<BiboxMarket>> response = bibox.marketAll(ALL_TICKERS_CMD);
        throwErrors(response);
        return response.getResult();
    } catch (BiboxException e) {
        throw new ExchangeException(e.getMessage());
    }
}
Also used : List(java.util.List) ExchangeException(org.knowm.xchange.exceptions.ExchangeException) BiboxException(org.knowm.xchange.bibox.BiboxException)

Aggregations

BiboxException (org.knowm.xchange.bibox.BiboxException)16 ExchangeException (org.knowm.xchange.exceptions.ExchangeException)16 List (java.util.List)3 BiboxCommand (org.knowm.xchange.bibox.dto.BiboxCommand)2 BiboxTicker (org.knowm.xchange.bibox.dto.marketdata.BiboxTicker)2 BiboxOrderBook (org.knowm.xchange.bibox.dto.trade.BiboxOrderBook)2 BiboxOrderPendingListCommandBody (org.knowm.xchange.bibox.dto.trade.BiboxOrderPendingListCommandBody)2 BiboxOrders (org.knowm.xchange.bibox.dto.trade.BiboxOrders)2 BiboxTradeCommand (org.knowm.xchange.bibox.dto.trade.BiboxTradeCommand)2 IOException (java.io.IOException)1 Collection (java.util.Collection)1 Objects (java.util.Objects)1 Collectors (java.util.stream.Collectors)1 Exchange (org.knowm.xchange.Exchange)1 BiboxAdapters (org.knowm.xchange.bibox.dto.BiboxAdapters)1 BiboxAdapters.toBiboxPair (org.knowm.xchange.bibox.dto.BiboxAdapters.toBiboxPair)1 BiboxCommands (org.knowm.xchange.bibox.dto.BiboxCommands)1 BiboxMultipleResponses (org.knowm.xchange.bibox.dto.BiboxMultipleResponses)1 BiboxResponse (org.knowm.xchange.bibox.dto.BiboxResponse)1 BiboxAssetsResult (org.knowm.xchange.bibox.dto.account.BiboxAssetsResult)1