use of org.knowm.xchange.binance.service.BinanceTradeService in project XChange by knowm.
the class BinanceTradeDemo method raw.
public static void raw(BinanceExchange exchange) throws IOException {
CurrencyPair pair = CurrencyPair.EOS_ETH;
BinanceTradeService tradeService = (BinanceTradeService) 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);
}
}
use of org.knowm.xchange.binance.service.BinanceTradeService in project XChange by knowm.
the class BinanceExchange method initServices.
@Override
protected void initServices() {
this.binance = ExchangeRestProxyBuilder.forInterface(BinanceAuthenticated.class, getExchangeSpecification()).build();
this.timestampFactory = new BinanceTimestampFactory(binance, getExchangeSpecification().getResilience(), getResilienceRegistries());
this.marketDataService = new BinanceMarketDataService(this, binance, getResilienceRegistries());
this.tradeService = new BinanceTradeService(this, binance, getResilienceRegistries());
this.accountService = new BinanceAccountService(this, binance, getResilienceRegistries());
}
use of org.knowm.xchange.binance.service.BinanceTradeService in project XChange by knowm.
the class BinanceUsExchange method initServices.
@Override
protected void initServices() {
this.binance = ExchangeRestProxyBuilder.forInterface(BinanceAuthenticated.class, getExchangeSpecification()).build();
this.timestampFactory = new BinanceTimestampFactory(binance, getExchangeSpecification().getResilience(), getResilienceRegistries());
this.marketDataService = new BinanceMarketDataService(this, binance, getResilienceRegistries());
this.tradeService = new BinanceTradeService(this, binance, getResilienceRegistries());
this.accountService = new BinanceUsAccountService(this, binance, getResilienceRegistries());
}
Aggregations