Package com.xeiam.xchange.cryptotrade.dto.trade

Examples of com.xeiam.xchange.cryptotrade.dto.trade.CryptoTradePlaceOrderReturn


  public CryptoTradePlaceOrderReturn placeCryptoTradeLimitOrder(LimitOrder limitOrder) throws CryptoTradeException, IOException {

    String pair = CryptoTradeUtils.getCryptoTradeCurrencyPair(limitOrder.getCurrencyPair());
    CryptoTradeOrderType type = limitOrder.getType() == Order.OrderType.BID ? CryptoTradeOrderType.Buy : CryptoTradeOrderType.Sell;
    CryptoTradePlaceOrderReturn cryptoTradePlaceOrderReturn = cryptoTradeProxy.trade(pair, type, limitOrder.getLimitPrice(), limitOrder.getTradableAmount(), apiKey, signatureCreator, nextNonce());

    return handleResponse(cryptoTradePlaceOrderReturn);
  }
View Full Code Here


    System.out.println(orders);

    Thread.sleep(4000);

    LimitOrder limitOrder = new LimitOrder(OrderType.ASK, new BigDecimal(".01"), CurrencyPair.BTC_USD, null, null, new BigDecimal("1000.00"));
    CryptoTradePlaceOrderReturn orderReturn = tradeService.placeCryptoTradeLimitOrder(limitOrder);
    System.out.println(orderReturn);

    Thread.sleep(4000);

    orders = tradeService.getCryptoTradeOrderHistory(params);
    System.out.println(orders);

    Thread.sleep(4000);

    long orderId = Long.valueOf(limitOrder.getId());
    CryptoTradeOrderInfoReturn orderInfo = tradeService.getCryptoTradeOrderInfo(orderId);
    CryptoTradeOrder cryptoOrder = orderInfo.getOrder();
    System.out.println(cryptoOrder);

    Thread.sleep(4000);

    CryptoTradeCancelOrderReturn cancelOrderReturn = tradeService.cancelCryptoTradeOrder(orderReturn.getOrderId());
    System.out.println(cancelOrderReturn);

    Thread.sleep(4000);

    orders = tradeService.getCryptoTradeOrderHistory(params);
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.cryptotrade.dto.trade.CryptoTradePlaceOrderReturn

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.