Search in sources :

Example 1 with OrderPlacement

use of org.knowm.xchange.dragonex.dto.trade.OrderPlacement in project XChange by knowm.

the class DragonexTradeService method placeLimitOrder.

@Override
public String placeLimitOrder(LimitOrder limitOrder) throws IOException {
    OrderPlacement orderPlacement = new OrderPlacement(exchange.symbolId(limitOrder.getCurrencyPair()), limitOrder.getLimitPrice(), limitOrder.getOriginalAmount());
    UserOrder newOrder = limitOrder.getType() == OrderType.BID ? super.orderBuy(exchange.getOrCreateToken().token, orderPlacement) : super.orderSell(exchange.getOrCreateToken().token, orderPlacement);
    return Long.toString(newOrder.orderId);
}
Also used : OrderPlacement(org.knowm.xchange.dragonex.dto.trade.OrderPlacement) UserOrder(org.knowm.xchange.dragonex.dto.trade.UserOrder)

Aggregations

OrderPlacement (org.knowm.xchange.dragonex.dto.trade.OrderPlacement)1 UserOrder (org.knowm.xchange.dragonex.dto.trade.UserOrder)1