Search in sources :

Example 1 with CoinbeneTradeService

use of org.knowm.xchange.coinbene.service.CoinbeneTradeService in project XChange by knowm.

the class CoinbeneExchange method initServices.

@Override
protected void initServices() {
    this.marketDataService = new CoinbeneMarketDataService(this);
    this.accountService = new CoinbeneAccountService(this);
    this.tradeService = new CoinbeneTradeService(this);
}
Also used : CoinbeneMarketDataService(org.knowm.xchange.coinbene.service.CoinbeneMarketDataService) CoinbeneTradeService(org.knowm.xchange.coinbene.service.CoinbeneTradeService) CoinbeneAccountService(org.knowm.xchange.coinbene.service.CoinbeneAccountService)

Example 2 with CoinbeneTradeService

use of org.knowm.xchange.coinbene.service.CoinbeneTradeService in project XChange by knowm.

the class CoinbeneTradeDemo method raw.

public static void raw(CoinbeneExchange exchange) throws IOException {
    CurrencyPair pair = CurrencyPair.BTC_USDT;
    CoinbeneTradeService tradeService = (CoinbeneTradeService) exchange.getTradeService();
    // Get open orders
    OpenOrders orders = tradeService.getOpenOrders(pair);
    LimitOrder order = orders.getOpenOrders().stream().collect(StreamUtils.singletonCollector());
    if (order != null) {
        System.out.println(order);
    }
}
Also used : CoinbeneTradeService(org.knowm.xchange.coinbene.service.CoinbeneTradeService) OpenOrders(org.knowm.xchange.dto.trade.OpenOrders) LimitOrder(org.knowm.xchange.dto.trade.LimitOrder) DefaultOpenOrdersParamCurrencyPair(org.knowm.xchange.service.trade.params.orders.DefaultOpenOrdersParamCurrencyPair) CurrencyPair(org.knowm.xchange.currency.CurrencyPair)

Aggregations

CoinbeneTradeService (org.knowm.xchange.coinbene.service.CoinbeneTradeService)2 CoinbeneAccountService (org.knowm.xchange.coinbene.service.CoinbeneAccountService)1 CoinbeneMarketDataService (org.knowm.xchange.coinbene.service.CoinbeneMarketDataService)1 CurrencyPair (org.knowm.xchange.currency.CurrencyPair)1 LimitOrder (org.knowm.xchange.dto.trade.LimitOrder)1 OpenOrders (org.knowm.xchange.dto.trade.OpenOrders)1 DefaultOpenOrdersParamCurrencyPair (org.knowm.xchange.service.trade.params.orders.DefaultOpenOrdersParamCurrencyPair)1