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

Examples of com.xeiam.xchange.kraken.dto.trade.KrakenTrade


    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    KrakenTradeHistoryResult krakenResult = mapper.readValue(is, KrakenTradeHistoryResult.class);
    KrakenTradeHistory krakenTradeHistory = krakenResult.getResult();
    Map<String, KrakenTrade> krakenTradeHistoryMap = krakenTradeHistory.getTrades();
    KrakenTrade trade = krakenTradeHistoryMap.get("TY5BYV-WJUQF-XPYEYD");

    assertThat(trade.getAssetPair()).isEqualTo("XXBTXLTC");
    assertThat(trade.getPrice()).isEqualTo("32.07562");
    assertThat(trade.getCost()).isEqualTo("16.03781");
    assertThat(trade.getFee()).isEqualTo("0.03208");
    assertThat(trade.getMargin()).isEqualTo("0.00000");
    assertThat(trade.getVolume()).isEqualTo("0.50000000");
    assertThat(trade.getOrderTxId()).isEqualTo("ONRNOX-DVI4W-76DL6Q");
    assertThat(trade.getUnixTimestamp()).isEqualTo(1389071942.2089);
    assertThat(trade.getType()).isEqualTo(KrakenType.SELL);
    assertThat(trade.getOrderType()).isEqualTo(KrakenOrderType.MARKET);
    assertThat(trade.getMiscellaneous()).isEqualTo("");
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.kraken.dto.trade.KrakenTrade

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.