Search in sources :

Example 1 with BiboxTicker

use of org.knowm.xchange.bibox.dto.marketdata.BiboxTicker in project XChange by knowm.

the class BiboxMarketDataServiceRaw method getBiboxTicker.

public BiboxTicker getBiboxTicker(CurrencyPair currencyPair) throws IOException {
    try {
        BiboxResponse<BiboxTicker> response = bibox.mdata(TICKER_CMD, toBiboxPair(currencyPair));
        throwErrors(response);
        return response.getResult();
    } catch (BiboxException e) {
        throw new ExchangeException(e.getMessage());
    }
}
Also used : ExchangeException(org.knowm.xchange.exceptions.ExchangeException) BiboxTicker(org.knowm.xchange.bibox.dto.marketdata.BiboxTicker) BiboxException(org.knowm.xchange.bibox.BiboxException)

Example 2 with BiboxTicker

use of org.knowm.xchange.bibox.dto.marketdata.BiboxTicker in project XChange by knowm.

the class BiboxMarketDataDemo method raw.

private static void raw(BiboxMarketDataServiceRaw marketDataService) throws IOException {
    System.out.println("------------RAW-----------");
    BiboxTicker tickerResponse = marketDataService.getBiboxTicker(PAIR);
    System.out.println(tickerResponse);
    List<BiboxMarket> tickersResponse = marketDataService.getAllBiboxMarkets();
    System.out.println(tickersResponse);
    BiboxOrderBook orderBookResponse = marketDataService.getBiboxOrderBook(PAIR, 10);
    System.out.println(orderBookResponse);
}
Also used : BiboxOrderBook(org.knowm.xchange.bibox.dto.trade.BiboxOrderBook) BiboxMarket(org.knowm.xchange.bibox.dto.marketdata.BiboxMarket) BiboxTicker(org.knowm.xchange.bibox.dto.marketdata.BiboxTicker)

Aggregations

BiboxTicker (org.knowm.xchange.bibox.dto.marketdata.BiboxTicker)2 BiboxException (org.knowm.xchange.bibox.BiboxException)1 BiboxMarket (org.knowm.xchange.bibox.dto.marketdata.BiboxMarket)1 BiboxOrderBook (org.knowm.xchange.bibox.dto.trade.BiboxOrderBook)1 ExchangeException (org.knowm.xchange.exceptions.ExchangeException)1