Package com.xeiam.xchange.bter.dto.trade

Examples of com.xeiam.xchange.bter.dto.trade.BTEROpenOrders


  }

  @Override
  public OpenOrders getOpenOrders() throws IOException {

    BTEROpenOrders openOrders = super.getBTEROpenOrders();
    Collection<CurrencyPair> currencyPairs = super.getExchangeSymbols();

    return BTERAdapters.adaptOpenOrders(openOrders, currencyPairs);
  }
View Full Code Here


    return handleResponse(cancelOrderResult).isResult();
  }

  public BTEROpenOrders getBTEROpenOrders() throws IOException {

    BTEROpenOrders bterOpenOrdersReturn = bter.getOpenOrders(apiKey, signatureCreator, nextNonce());

    return handleResponse(bterOpenOrdersReturn);
  }
View Full Code Here

    // Read in the JSON from the example resources
    InputStream is = BTERAdapterTest.class.getResourceAsStream("/trade/example-order-list-data.json");

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    BTEROpenOrders openOrders = mapper.readValue(is, BTEROpenOrders.class);

    OpenOrders adaptedOpenOrders = BTERAdapters.adaptOpenOrders(openOrders, currencyPairs);

    List<LimitOrder> adaptedOrderList = adaptedOpenOrders.getOpenOrders();
    assertThat(adaptedOrderList).hasSize(1);
View Full Code Here

    boolean placedOrderResult = tradeService.placeBTERLimitOrder(CurrencyPair.LTC_BTC, BTEROrderType.SELL, new BigDecimal("0.0265"), new BigDecimal("0.384"));
    System.out.println(placedOrderResult); // Returned order id is currently broken for BTER, rely on open orders instead for demo :(

    Thread.sleep(2000); // wait for BTER's back-end to propagate the order

    BTEROpenOrders openOrders = tradeService.getBTEROpenOrders();
    System.out.println(openOrders);

    List<BTEROpenOrder> openOrdersList = openOrders.getOrders();
    if (!openOrdersList.isEmpty()) {
      String existingOrderId = openOrdersList.get(0).getId();
      BTEROrderStatus orderStatus = tradeService.getBTEROrderStatus(existingOrderId);
      System.out.println(orderStatus);
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.bter.dto.trade.BTEROpenOrders

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.