public LimitOrder build() { LimitOrder order = new LimitOrder( orderType, originalAmount, currencyPair, id, timestamp, limitPrice, averagePrice, originalAmount == null || remainingAmount == null ? cumulativeAmount : originalAmount.subtract(remainingAmount), fee, status); order.setOrderFlags(flags); return order; } }
@Override public String placeStopOrder(StopOrder stopOrder) throws IOException { if (stopOrder.getLimitPrice() != null) { throw new NotYetImplementedForExchangeException( "Limit stops are not supported by the Bitfinex v1 API."); } LimitOrder limitOrder = new LimitOrder( stopOrder.getType(), stopOrder.getOriginalAmount(), stopOrder.getCurrencyPair(), stopOrder.getId(), stopOrder.getTimestamp(), stopOrder.getStopPrice()); limitOrder.setOrderFlags(stopOrder.getOrderFlags()); limitOrder.setLeverage(stopOrder.getLeverage()); limitOrder.addOrderFlag(BitfinexOrderFlags.STOP); return placeLimitOrder(limitOrder); }
public LimitOrder build() { LimitOrder order = new LimitOrder( orderType, originalAmount, currencyPair, id, timestamp, limitPrice, averagePrice, originalAmount == null || remainingAmount == null ? cumulativeAmount : originalAmount.subtract(remainingAmount), fee, status); order.setOrderFlags(flags); return order; } }
@Override public String placeStopOrder(StopOrder stopOrder) throws IOException { if (stopOrder.getLimitPrice() != null) { throw new NotYetImplementedForExchangeException( "Limit stops are not supported by the Bitfinex v1 API."); } LimitOrder limitOrder = new LimitOrder( stopOrder.getType(), stopOrder.getOriginalAmount(), stopOrder.getCurrencyPair(), stopOrder.getId(), stopOrder.getTimestamp(), stopOrder.getStopPrice()); limitOrder.setOrderFlags(stopOrder.getOrderFlags()); limitOrder.setLeverage(stopOrder.getLeverage()); limitOrder.addOrderFlag(BitfinexOrderFlags.STOP); return placeLimitOrder(limitOrder); }