use of org.knowm.xchange.livecoin.dto.marketdata.LivecoinOrder in project XChange by knowm.
the class MarketDataIntegration method allOrderBooksFetchTest.
@Test
public void allOrderBooksFetchTest() throws Exception {
Map<CurrencyPair, LivecoinOrderBook> orderBooksByPair = marketDataService.getAllOrderBooksRaw(10, true);
assertThat(orderBooksByPair).isNotNull().containsKeys(CurrencyPair.BTC_USD, CurrencyPair.ETH_BTC);
LivecoinOrderBook btcUsdOrderBook = orderBooksByPair.get(CurrencyPair.BTC_USD);
List<LivecoinOrder> btcUsdAsks = btcUsdOrderBook.getAsks();
assertThat(btcUsdAsks).isNotEmpty();
LivecoinOrder firstBtcUsdAsk = btcUsdAsks.get(0);
assertThat(firstBtcUsdAsk.getQuantity()).isNotNull().isPositive();
}
Aggregations