Package com.xeiam.xchange.bter.dto.marketdata

Examples of com.xeiam.xchange.bter.dto.marketdata.BTERTickers


    return bterMarketInfo.getMarketInfoMap();
  }

  public Map<CurrencyPair, BTERTicker> getBTERTickers() throws IOException {

    BTERTickers bterTickers = bter.getTickers();

    return handleResponse(bterTickers).getTickerMap();
  }
View Full Code Here


    // Read in the JSON from the example resources
    InputStream is = BTERAdapterTest.class.getResourceAsStream("/marketdata/example-tickers-data.json");

    // Use Jackson to parse it
    ObjectMapper mapper = new ObjectMapper();
    BTERTickers tickers = mapper.readValue(is, BTERTickers.class);

    Map<CurrencyPair, BTERTicker> tickerMap = tickers.getTickerMap();

    Ticker ticker = BTERAdapters.adaptTicker(CurrencyPair.BTC_CNY, tickerMap.get(CurrencyPair.BTC_CNY));
    assertThat(ticker.getLast()).isEqualTo("3400.01");
    assertThat(ticker.getHigh()).isEqualTo("3497.41");
    assertThat(ticker.getLow()).isEqualTo("3400.01");
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.bter.dto.marketdata.BTERTickers

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.