Package com.xeiam.xchange.coinsetter.dto.marketdata

Examples of com.xeiam.xchange.coinsetter.dto.marketdata.CoinsetterTicker


          for (CoinsetterExchangeListener listener : exchangeListeners) {
            listener.onLast(last);
          }
        }
        else if (event.equals("ticker")) {
          CoinsetterTicker ticker = gson.fromJson(args[0], CoinsetterTicker.class);
          for (CoinsetterExchangeListener listener : exchangeListeners) {
            listener.onTicker(ticker);
          }
        }
        else if (event.equals("depth")) {
View Full Code Here


public class CoinsetterAdaptersTest {

  @Test
  public void testAdaptTicker() throws JsonParseException, JsonMappingException, IOException {

    CoinsetterTicker coinsetterTicker = ObjectMapperHelper.readValue(getClass().getResource("dto/marketdata/ticker.json"), CoinsetterTicker.class);
    Ticker ticker = CoinsetterAdapters.adaptTicker(coinsetterTicker);
    assertEquals(CurrencyPair.BTC_USD, ticker.getCurrencyPair());
    assertEquals(1392947181242L, ticker.getTimestamp().getTime());
    assertEquals(new BigDecimal("10.0"), ticker.getBid());
    assertEquals(new BigDecimal("12.0"), ticker.getAsk());
View Full Code Here

    log.info("Coinsetter last: {}", last);

    last = marketDataService.getCoinsetterLast(5);
    log.info("Coinsetter last 5: {}", last);

    CoinsetterTicker ticker = marketDataService.getCoinsetterTicker();
    log.info("Coinsetter ticker: {}", ticker);

    CoinsetterPairedDepth pairedDepth = marketDataService.getCoinsetterPairedDepth(10, "SMART");
    log.info("Coinsetter paired depth: {}", pairedDepth);
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.coinsetter.dto.marketdata.CoinsetterTicker

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.