Search in sources :

Example 1 with LivecoinOrder

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();
}
Also used : LivecoinOrder(org.knowm.xchange.livecoin.dto.marketdata.LivecoinOrder) LivecoinOrderBook(org.knowm.xchange.livecoin.dto.marketdata.LivecoinOrderBook) CurrencyPair(org.knowm.xchange.currency.CurrencyPair) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 CurrencyPair (org.knowm.xchange.currency.CurrencyPair)1 LivecoinOrder (org.knowm.xchange.livecoin.dto.marketdata.LivecoinOrder)1 LivecoinOrderBook (org.knowm.xchange.livecoin.dto.marketdata.LivecoinOrderBook)1