Package com.xeiam.xchange.mintpal.dto.marketdata

Examples of com.xeiam.xchange.mintpal.dto.marketdata.MintPalTicker


    final MintPalBaseResponse<List<MintPalTicker>> tickers = mapper.readValue(is, tickersType);

    assertThat(tickers.getStatus()).isEqualTo("success");
    final List<MintPalTicker> tickerList = tickers.getData();
    assertThat(tickerList).hasSize(1);
    final MintPalTicker ticker = tickerList.get(0);
    assertThat(ticker.getMarketId()).isEqualTo(88);
    assertThat(ticker.getCoin()).isEqualTo("365Coin");
    assertThat(ticker.getCode()).isEqualTo("365");
    assertThat(ticker.getExchange()).isEqualTo("BTC");
    assertThat(ticker.getLastPrice()).isEqualTo("0.20000000");
    assertThat(ticker.getYesterdayPrice()).isEqualTo("0.20000018");
    assertThat(ticker.getChange()).isEqualTo("-0.00");
    assertThat(ticker.getHigh24Hour()).isEqualTo("0.26500000");
    assertThat(ticker.getLow24Hour()).isEqualTo("0.20000000");
    assertThat(ticker.getVolume24Hour()).isEqualTo("0.453");
    assertThat(ticker.getTopBid()).isEqualTo("0.20000000");
    assertThat(ticker.getTopAsk()).isEqualTo("0.22900000");
  }
View Full Code Here


    MintPalMarketDataServiceRaw mintPalSpecificMarketDataService = (MintPalMarketDataServiceRaw) mintPal.getPollingMarketDataService();

    List<MintPalTicker> tickers = mintPalSpecificMarketDataService.getAllMintPalTickers();
    System.out.println(tickers);

    MintPalTicker ticker = mintPalSpecificMarketDataService.getMintPalTicker(CurrencyPair.LTC_BTC);
    System.out.println(ticker);

    List<MintPalPublicOrders> ordersFull = mintPalSpecificMarketDataService.getMintPalFullOrders(CurrencyPair.LTC_BTC);
    System.out.println(ordersFull);
View Full Code Here

    final ObjectMapper mapper = new ObjectMapper();
    final JavaType tickersType = mapper.getTypeFactory().constructParametricType(MintPalBaseResponse.class, mapper.getTypeFactory().constructCollectionType(List.class, MintPalTicker.class));
    final MintPalBaseResponse<List<MintPalTicker>> tickers = mapper.readValue(is, tickersType);

    final List<MintPalTicker> tickerList = tickers.getData();
    final MintPalTicker ticker = tickerList.get(0);
    final Ticker adaptedTicker = MintPalAdapters.adaptTicker(ticker);

    assertThat(adaptedTicker.getCurrencyPair()).isEqualTo(new CurrencyPair("365", "BTC"));
    assertThat(adaptedTicker.getLast()).isEqualTo("0.20000000");
    assertThat(adaptedTicker.getHigh()).isEqualTo("0.26500000");
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.mintpal.dto.marketdata.MintPalTicker

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.