Package com.xeiam.xchange.bitkonan.dto.marketdata

Examples of com.xeiam.xchange.bitkonan.dto.marketdata.BitKonanTicker


    InputStream is = BitKonanAdapterTest.class.getResourceAsStream("/marketdata/bitkonan-example-ticker-data.json");

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();

    BitKonanTicker ticker = mapper.readValue(is, BitKonanTicker.class);
    Ticker adaptedTicker = BitKonanAdapters.adaptTicker(ticker, CurrencyPair.BTC_USD);

    assertThat(adaptedTicker.getAsk()).isEqualTo("609.58");
    assertThat(adaptedTicker.getBid()).isEqualTo("608.63");
    assertThat(adaptedTicker.getLow()).isEqualTo("563.4");
View Full Code Here


    InputStream is = BitKonanMarketDataJsonTest.class.getResourceAsStream("/marketdata/bitkonan-example-ticker-data.json");

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();

    BitKonanTicker ticker = mapper.readValue(is, BitKonanTicker.class);

    assertThat(ticker.getAsk()).isEqualTo("609.58");
    assertThat(ticker.getBid()).isEqualTo("608.63");
    assertThat(ticker.getLast()).isEqualTo("609.24");
    assertThat(ticker.getHigh()).isEqualTo("621.81");
    assertThat(ticker.getLow()).isEqualTo("563.4");
    assertThat(ticker.getVolume()).isEqualTo("1232.17");
  }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.bitkonan.dto.marketdata.BitKonanTicker

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.