Examples of LakeBTCTicker


Examples of com.xeiam.xchange.lakebtc.dto.marketdata.LakeBTCTicker

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

    LakeBTCTickers tickers = mapper.readValue(is, LakeBTCTickers.class);

    LakeBTCTicker cnyTicker = tickers.getCny();
    Ticker adaptedTicker = LakeBTCAdapters.adaptTicker(cnyTicker, CurrencyPair.BTC_CNY);

    assertThat(adaptedTicker.getAsk()).isEqualTo("3524.07");
    assertThat(adaptedTicker.getBid()).isEqualTo("3517.13");
    assertThat(adaptedTicker.getLow()).isEqualTo("3480.07");
View Full Code Here

Examples of com.xeiam.xchange.lakebtc.dto.marketdata.LakeBTCTicker

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

    LakeBTCTickers tickers = mapper.readValue(is, LakeBTCTickers.class);

    LakeBTCTicker cnyTicker = tickers.getCny();
    assertThat(cnyTicker.getAsk()).isEqualTo("3524.07");
    assertThat(cnyTicker.getBid()).isEqualTo("3517.13");
    assertThat(cnyTicker.getLast()).isEqualTo("3524.07");
    assertThat(cnyTicker.getHigh()).isEqualTo("3584.97");
    assertThat(cnyTicker.getLow()).isEqualTo("3480.07");
    assertThat(cnyTicker.getVolume()).isEqualTo("5964.7677");

    LakeBTCTicker usdTicker = tickers.getUsd();
    assertThat(usdTicker.getAsk()).isEqualTo("564.63");
    assertThat(usdTicker.getBid()).isEqualTo("564.63");
    assertThat(usdTicker.getLast()).isEqualTo("564.4");
    assertThat(usdTicker.getHigh()).isEqualTo("573.83");
    assertThat(usdTicker.getLow()).isEqualTo("557.7");
    assertThat(usdTicker.getVolume()).isEqualTo("3521.2782");

  }
View Full Code Here

Examples of com.xeiam.xchange.lakebtc.dto.marketdata.LakeBTCTicker

  }

  @Override
  public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException {

    LakeBTCTicker lakeBTCTicker;
    LakeBTCTickers lakeBTCTickers = getLakeBTCTickers();

    if (CurrencyPair.BTC_USD.equals(currencyPair)) {
      lakeBTCTicker = lakeBTCTickers.getUsd();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.