Examples of HitbtcTicker


Examples of com.xeiam.xchange.hitbtc.dto.marketdata.HitbtcTicker

  private static void raw(HitbtcMarketDataServiceRaw marketDataService) throws IOException {

    Collection<CurrencyPair> currencyPairs = marketDataService.getExchangeSymbols();
    System.out.println(currencyPairs);

    HitbtcTicker ticker = marketDataService.getHitbtcTicker(CurrencyPair.BTC_USD);
    System.out.println(ticker);

    HitbtcOrderBook orderBook = marketDataService.getHitbtcOrderBook(CurrencyPair.BTC_USD);
    System.out.println(orderBook);
  }
View Full Code Here

Examples of com.xeiam.xchange.hitbtc.dto.marketdata.HitbtcTicker

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

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

    HitbtcTicker ticker = mapper.readValue(is, HitbtcTicker.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");
    assertThat(ticker.getTimetamp()).isEqualTo(1401498463370L);
  }
View Full Code Here

Examples of com.xeiam.xchange.hitbtc.dto.marketdata.HitbtcTicker

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

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

    HitbtcTicker ticker = mapper.readValue(is, HitbtcTicker.class);
    Ticker adaptedTicker = HitbtcAdapters.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
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.