Search in sources :

Example 1 with BiboxOrders

use of org.knowm.xchange.bibox.dto.trade.BiboxOrders in project XChange by knowm.

the class BiboxTradeServiceRaw method getBiboxOrderHistory.

public BiboxOrders getBiboxOrderHistory() {
    try {
        BiboxOrderPendingListCommandBody body = new BiboxOrderPendingListCommandBody(1, // wonder if this actually works
        Integer.MAX_VALUE);
        BiboxOrderHistoryCommand cmd = new BiboxOrderHistoryCommand(body);
        BiboxSingleResponse<BiboxOrders> response = bibox.orderPendingList(BiboxCommands.of(cmd).json(), apiKey, signatureCreator);
        throwErrors(response);
        return response.get().getResult();
    } catch (BiboxException e) {
        throw new ExchangeException(e.getMessage());
    }
}
Also used : BiboxOrderHistoryCommand(org.knowm.xchange.bibox.dto.trade.BiboxOrderHistoryCommand) BiboxOrders(org.knowm.xchange.bibox.dto.trade.BiboxOrders) ExchangeException(org.knowm.xchange.exceptions.ExchangeException) BiboxOrderPendingListCommandBody(org.knowm.xchange.bibox.dto.trade.BiboxOrderPendingListCommandBody) BiboxException(org.knowm.xchange.bibox.BiboxException)

Example 2 with BiboxOrders

use of org.knowm.xchange.bibox.dto.trade.BiboxOrders in project XChange by knowm.

the class BiboxTradeServiceRaw method getBiboxOpenOrders.

public BiboxOrders getBiboxOpenOrders(Integer page) {
    try {
        BiboxOrderPendingListCommandBody body = new BiboxOrderPendingListCommandBody(page == null ? 1 : page, // wonder if this actually works
        Integer.MAX_VALUE);
        BiboxOrderPendingListCommand cmd = new BiboxOrderPendingListCommand(body);
        BiboxSingleResponse<BiboxOrders> response = bibox.orderPendingList(BiboxCommands.of(cmd).json(), apiKey, signatureCreator);
        throwErrors(response);
        return response.get().getResult();
    } catch (BiboxException e) {
        throw new ExchangeException(e.getMessage());
    }
}
Also used : BiboxOrders(org.knowm.xchange.bibox.dto.trade.BiboxOrders) ExchangeException(org.knowm.xchange.exceptions.ExchangeException) BiboxOrderPendingListCommand(org.knowm.xchange.bibox.dto.trade.BiboxOrderPendingListCommand) BiboxOrderPendingListCommandBody(org.knowm.xchange.bibox.dto.trade.BiboxOrderPendingListCommandBody) BiboxException(org.knowm.xchange.bibox.BiboxException)

Aggregations

BiboxException (org.knowm.xchange.bibox.BiboxException)2 BiboxOrderPendingListCommandBody (org.knowm.xchange.bibox.dto.trade.BiboxOrderPendingListCommandBody)2 BiboxOrders (org.knowm.xchange.bibox.dto.trade.BiboxOrders)2 ExchangeException (org.knowm.xchange.exceptions.ExchangeException)2 BiboxOrderHistoryCommand (org.knowm.xchange.bibox.dto.trade.BiboxOrderHistoryCommand)1 BiboxOrderPendingListCommand (org.knowm.xchange.bibox.dto.trade.BiboxOrderPendingListCommand)1