Examples of BTCTradeDepth


Examples of com.xeiam.xchange.btctrade.dto.marketdata.BTCTradeDepth

    // Interested in the public polling market data feed (no authentication).
    BTCTradeMarketDataServiceRaw marketDataService = (BTCTradeMarketDataServiceRaw) exchange.getPollingMarketDataService();

    // Get the order book data for BTC/CNY.
    BTCTradeDepth depth = marketDataService.getBTCTradeDepth();
    System.out.println("size: " + (depth.getAsks().length + depth.getBids().length));
  }
View Full Code Here

Examples of com.xeiam.xchange.btctrade.dto.marketdata.BTCTradeDepth

  }

  @Test
  public void testAdaptOrderBook() throws IOException {

    BTCTradeDepth btcTradeDepth = mapper.readValue(getClass().getResource("dto/marketdata/depth.json"), BTCTradeDepth.class);
    OrderBook orderBook = BTCTradeAdapters.adaptOrderBook(btcTradeDepth, CurrencyPair.BTC_CNY);
    assertEquals(50, orderBook.getAsks().size());
    assertEquals(50, orderBook.getBids().size());

    assertEquals(OrderType.ASK, orderBook.getAsks().get(0).getType());
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.