Search in sources :

Example 1 with BitsoTicker

use of org.knowm.xchange.bitso.dto.marketdata.BitsoTicker in project XChange by knowm.

the class BitsoMarketDataDemo method raw.

private static void raw(BitsoMarketDataServiceRaw marketDataService) throws IOException {
    BitsoTicker ticker = marketDataService.getBitsoTicker(CurrencyPair.BTC_MXN);
    System.out.println("Ticker: " + ticker);
    // Get the latest order book data for BTCMXN
    BitsoOrderBook orderBook = marketDataService.getBitsoOrderBook(CurrencyPair.BTC_MXN);
    System.out.println("Current Order Book size for BTC / MXN: " + (orderBook.getAsks().size() + orderBook.getBids().size()));
    System.out.println("First Ask: " + orderBook.getAsks().get(0).toString());
    System.out.println("First Bid: " + orderBook.getBids().get(0).toString());
    System.out.println(orderBook.toString());
}
Also used : BitsoTicker(org.knowm.xchange.bitso.dto.marketdata.BitsoTicker) BitsoOrderBook(org.knowm.xchange.bitso.dto.marketdata.BitsoOrderBook)

Aggregations

BitsoOrderBook (org.knowm.xchange.bitso.dto.marketdata.BitsoOrderBook)1 BitsoTicker (org.knowm.xchange.bitso.dto.marketdata.BitsoTicker)1