Package com.xeiam.xchange.kraken.dto.marketdata

Examples of com.xeiam.xchange.kraken.dto.marketdata.KrakenAssetPair


  public void before() {

    List<KrakenFee> fees = new ArrayList<KrakenFee>();
    fees.add(new KrakenFee(new BigDecimal("0"), new BigDecimal("0.3")));
    expectedAssetPairInfo =
        new KrakenAssetPair("XBTUSD", "currency", "XXBT", "currency", "ZUSD", "unit", 5, 8, new BigDecimal(1), new ArrayList<String>(), fees, "ZUSD", new BigDecimal(80), new BigDecimal(40));
  }
View Full Code Here


    // Verify that the example data was unmarshalled correctly
    assertThat(krakenAssetPairs.getResult().get("XXBTZEUR")).isNotNull();
    assertThat(krakenAssetPairs.getResult().get("XBTCEUR")).isNull();

    KrakenAssetPair krakenAssetPairInfo = krakenAssetPairs.getResult().get("XXBTZUSD");
    assertThat(krakenAssetPairInfo.getAltName()).isEqualTo(expectedAssetPairInfo.getAltName());
    assertThat(krakenAssetPairInfo.getBase()).isEqualTo(expectedAssetPairInfo.getBase());
    assertThat(krakenAssetPairInfo.getClassBase()).isEqualTo(expectedAssetPairInfo.getClassBase());
    assertThat(krakenAssetPairInfo.getClassQuote()).isEqualTo(expectedAssetPairInfo.getClassQuote());
    assertThat(krakenAssetPairInfo.getFeeVolumeCurrency()).isEqualTo(expectedAssetPairInfo.getFeeVolumeCurrency());
    assertThat(krakenAssetPairInfo.getLeverage()).isEqualTo(expectedAssetPairInfo.getLeverage());
    assertThat(krakenAssetPairInfo.getQuote()).isEqualTo(expectedAssetPairInfo.getQuote());
    assertThat(krakenAssetPairInfo.getVolumeLotSize()).isEqualTo(expectedAssetPairInfo.getVolumeLotSize());
    assertThat(krakenAssetPairInfo.getPairScale()).isEqualTo(expectedAssetPairInfo.getPairScale());
    assertThat(krakenAssetPairInfo.getVolumeLotScale()).isEqualTo(expectedAssetPairInfo.getVolumeLotScale());
    assertThat(krakenAssetPairInfo.getMarginCall()).isEqualTo(expectedAssetPairInfo.getMarginCall());
    assertThat(krakenAssetPairInfo.getMarginStop()).isEqualTo(expectedAssetPairInfo.getMarginStop());
    assertThat(krakenAssetPairInfo.getVolumeMultiplier()).isEqualTo(expectedAssetPairInfo.getVolumeMultiplier());
    assertThat(krakenAssetPairInfo.getFees().size()).isEqualTo(26);

    KrakenFee deserializedFee = krakenAssetPairInfo.getFees().get(0);
    KrakenFee expectedFee = expectedAssetPairInfo.getFees().get(0);
    assertThat(deserializedFee.getPercentFee()).isEqualTo(expectedFee.getPercentFee());
    assertThat(deserializedFee.getVolume()).isEqualTo(expectedFee.getVolume());
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.kraken.dto.marketdata.KrakenAssetPair

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.