use of org.knowm.xchange.coinfloor.dto.trade.CoinfloorMarketOrderResponse in project XChange by knowm.
the class CoinfloorPlaceMarketOrderIntegration method placeMarketOrderTest.
@Test
public void placeMarketOrderTest() throws IOException {
final ExchangeSpecification specification = new ExchangeSpecification(CoinfloorExchange.class);
String username = System.getProperty("xchange.coinfloor.username");
String password = System.getProperty("xchange.coinfloor.password");
if (username == null || password == null) {
return;
}
specification.setUserName(username);
specification.setPassword(password);
Exchange exchange = ExchangeFactory.INSTANCE.createExchange(specification);
CoinfloorTradeServiceRaw rawService = (CoinfloorTradeServiceRaw) exchange.getTradeService();
CoinfloorMarketOrderResponse order = rawService.placeMarketOrder(CurrencyPair.BTC_EUR, OrderType.ASK, new BigDecimal("0.0001"));
logger.info("placed market order with remainingQty={}", order.getRemaining());
}
Aggregations