Package com.xeiam.xchange.kraken.dto.trade.results

Examples of com.xeiam.xchange.kraken.dto.trade.results.KrakenOrderResult


    // Read in the JSON from the example resources
    InputStream is = KrakenTradeJsonTest.class.getResourceAsStream("/trading/example-addorder-response-data.json");

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    KrakenOrderResult krakenResult = mapper.readValue(is, KrakenOrderResult.class);
    KrakenOrderResponse orderResponse = krakenResult.getResult();

    assertThat(orderResponse.getDescription().getOrderDescription()).isEqualTo("sell 0.01000000 XBTLTC @ limit 45.25000");
    assertThat(orderResponse.getTransactionIds().get(0)).isEqualTo("OWQJ5O-ZWYC7-5R7POQ");
  }
View Full Code Here


    return placeKrakenOrder(krakenOrderBuilder.buildOrder());
  }

  public KrakenOrderResponse placeKrakenOrder(KrakenStandardOrder krakenStandardOrder) throws IOException {

    KrakenOrderResult result = null;
    if (!krakenStandardOrder.isValidateOnly()) {
      result =
          kraken.addOrder(createKrakenCurrencyPair(krakenStandardOrder.getAssetPair()), krakenStandardOrder.getType().toString(), krakenStandardOrder.getOrderType().toString(), krakenStandardOrder
              .getPrice(), krakenStandardOrder.getSecondaryPrice(), krakenStandardOrder.getVolume().toString(), krakenStandardOrder.getLeverage(), krakenStandardOrder.getPositionTxId(),
              delimitSet(krakenStandardOrder.getOrderFlags()), krakenStandardOrder.getStartTime(), krakenStandardOrder.getExpireTime(), krakenStandardOrder.getUserRefId(), krakenStandardOrder
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.kraken.dto.trade.results.KrakenOrderResult

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.