Interface MarketDataService

All Superinterfaces:
BaseService
All Known Implementing Classes:
AscendexMarketDataService, BankeraMarketDataService, BiboxMarketDataService, BinanceMarketDataService, BitbayMarketDataService, BitcoinAverageMarketDataService, BitcoinChartsMarketDataService, BitcoindeMarketDataService, BitcoindeMarketDataService, BitcointoyouMarketDataService, BitfinexMarketDataService, BitflyerMarketDataService, BithumbMarketDataService, BitmexMarketDataService, BitsoMarketDataService, BitstampMarketDataService, BittrexMarketDataService, BityMarketDataService, BitZMarketDataService, Bl3pMarketDataService, BleutradeMarketDataService, BlockchainMarketDataService, BTCCMarketDataService, BTCMarketsMarketDataService, BTCTurkMarketDataService, BybitMarketDataService, CCEXMarketDataService, CexIOMarketDataService, CmcMarketDataService, CoinbaseMarketDataService, CoinbaseMarketDataService, CoinbaseProMarketDataService, CoincheckMarketDataService, CoindealMarketDataService, CoindirectMarketDataService, CoinEggMarketDataService, CoinfloorMarketDataService, CoingiMarketDataService, CoinjarMarketDataService, CoinMarketCapMarketDataService, CoinmateMarketDataService, CoinoneMarketDataService, CryptowatchMarketDataService, DeribitMarketDataService, DVChainMarketDataService, EnigmaMarketDataService, ExmoMarketDataService, FtxMarketDataService, GateioMarketDataService, GeminiMarketDataService, GlobitexMarketDataService, HitbtcMarketDataService, HuobiMarketDataService, IdexMarketDataService, IndependentReserveMarketDataService, ItBitMarketDataService, KoineksMarketDataService, KoinimMarketDataService, KrakenFuturesMarketDataService, KrakenMarketDataService, KucoinMarketDataService, KunaMarketDataService, LatokenMarketDataService, LgoMarketDataService, LivecoinMarketDataService, LunoMarketDataService, LykkeMarketDataService, MercadoBitcoinMarketDataService, MEXCMarketDataService, OERMarketDataService, OkCoinFuturesMarketDataService, OkCoinMarketDataService, OkexMarketDataService, OkexMarketDataService, ParibuMarketDataService, PaymiumMarketDataService, PoloniexMarketDataService, QuoineMarketDataService, RippleMarketDataService, SerumMarketDataService, SimulatedMarketDataService, TheRockMarketDataService, TradeOgreMarketDataService, TrueFxMarketDataService, UpbitMarketDataService, VaultoroMarketDataService, YoBitMarketDataService, ZaifMarketDataService

public interface MarketDataService extends BaseService
Interface to provide the following to Exchange:
  • Standard methods available to explore the market data

The implementation of this service is expected to be based on a client polling mechanism of some kind

  • Method Details

    • getTicker

      @Deprecated default Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException
      Deprecated.
      Get a ticker representing the current exchange rate
      Returns:
      The Ticker, null if some sort of error occurred. Implementers should log the error.
      Throws:
      ExchangeException - - Indication that the exchange reported some kind of error with the request or response
      NotAvailableFromExchangeException - - Indication that the exchange does not support the requested function or data
      NotYetImplementedForExchangeException - - Indication that the exchange supports the requested function or data, but it has not yet been implemented
      IOException - - Indication that a networking error occurred while fetching JSON data
    • getTicker

      default Ticker getTicker(Instrument instrument, Object... args) throws IOException
      Get a ticker representing the current exchange rate
      Returns:
      The Ticker, null if some sort of error occurred. Implementers should log the error.
      Throws:
      ExchangeException - - Indication that the exchange reported some kind of error with the request or response
      NotAvailableFromExchangeException - - Indication that the exchange does not support the requested function or data
      NotYetImplementedForExchangeException - - Indication that the exchange supports the requested function or data, but it has not yet been implemented
      IOException - - Indication that a networking error occurred while fetching JSON data
    • getTickers

      default List<Ticker> getTickers(Params params) throws IOException
      Get the tickers representing the current exchange rate for the provided parameters
      Returns:
      The Tickers, null if some sort of error occurred. Implementers should log the error.
      Throws:
      ExchangeException - - Indication that the exchange reported some kind of error with the request or response
      NotAvailableFromExchangeException - - Indication that the exchange does not support the requested function or data
      NotYetImplementedForExchangeException - - Indication that the exchange supports the requested function or data, but it has not yet been implemented
      IOException - - Indication that a networking error occurred while fetching JSON data
    • getOrderBook

      @Deprecated default OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException
      Deprecated.
      Get an order book representing the current offered exchange rates (market depth)
      Parameters:
      args - Optional arguments. Exchange-specific
      Returns:
      The OrderBook, null if some sort of error occurred. Implementers should log the error.
      Throws:
      ExchangeException - - Indication that the exchange reported some kind of error with the request or response
      NotAvailableFromExchangeException - - Indication that the exchange does not support the requested function or data
      NotYetImplementedForExchangeException - - Indication that the exchange supports the requested function or data, but it has not yet been implemented
      IOException - - Indication that a networking error occurred while fetching JSON data
    • getOrderBook

      default OrderBook getOrderBook(Instrument instrument, Object... args) throws IOException
      Get an order book representing the current offered exchange rates (market depth)
      Parameters:
      args - Optional arguments. Exchange-specific
      Returns:
      The OrderBook, null if some sort of error occurred. Implementers should log the error.
      Throws:
      ExchangeException - - Indication that the exchange reported some kind of error with the request or response
      NotAvailableFromExchangeException - - Indication that the exchange does not support the requested function or data
      NotYetImplementedForExchangeException - - Indication that the exchange supports the requested function or data, but it has not yet been implemented
      IOException - - Indication that a networking error occurred while fetching JSON data
    • getOrderBook

      default OrderBook getOrderBook(Params params) throws IOException
      Get an order book representing the current offered exchange rates (market depth)
      Parameters:
      params - Exchange-specific
      Returns:
      The OrderBook, null if some sort of error occurred. Implementers should log the error.
      Throws:
      ExchangeException - - Indication that the exchange reported some kind of error with the request or response
      NotAvailableFromExchangeException - - Indication that the exchange does not support the requested function or data
      NotYetImplementedForExchangeException - - Indication that the exchange supports the requested function or data, but it has not yet been implemented
      IOException - - Indication that a networking error occurred while fetching JSON data
    • getTrades

      @Deprecated default Trades getTrades(CurrencyPair currencyPair, Object... args) throws IOException
      Deprecated.
      Get the trades recently performed by the exchange
      Parameters:
      args - Optional arguments. Exchange-specific
      Returns:
      The Trades, null if some sort of error occurred. Implementers should log the error.
      Throws:
      ExchangeException - - Indication that the exchange reported some kind of error with the request or response
      NotAvailableFromExchangeException - - Indication that the exchange does not support the requested function or data
      NotYetImplementedForExchangeException - - Indication that the exchange supports the requested function or data, but it has not yet been implemented
      IOException - - Indication that a networking error occurred while fetching JSON data
    • getTrades

      default Trades getTrades(Instrument instrument, Object... args) throws IOException
      Get the trades recently performed by the exchange
      Parameters:
      args - Optional arguments. Exchange-specific
      Returns:
      The Trades, null if some sort of error occurred. Implementers should log the error.
      Throws:
      ExchangeException - - Indication that the exchange reported some kind of error with the request or response
      NotAvailableFromExchangeException - - Indication that the exchange does not support the requested function or data
      NotYetImplementedForExchangeException - - Indication that the exchange supports the requested function or data, but it has not yet been implemented
      IOException - - Indication that a networking error occurred while fetching JSON data
    • getTrades

      default Trades getTrades(Params params) throws IOException
      Get the trades recently performed by the exchange
      Parameters:
      params - Exchange-specific
      Returns:
      The Trades, null if some sort of error occurred. Implementers should log the error.
      Throws:
      ExchangeException - - Indication that the exchange reported some kind of error with the request or response
      NotAvailableFromExchangeException - - Indication that the exchange does not support the requested function or data
      NotYetImplementedForExchangeException - - Indication that the exchange supports the requested function or data, but it has not yet been implemented
      IOException - - Indication that a networking error occurred while fetching JSON data
    • getCandleStickData

      default CandleStickData getCandleStickData(CurrencyPair currencyPair, CandleStickDataParams params) throws IOException
      Get the CandleStickData for given currency between startDate to endDate.
      Parameters:
      currencyPair - currencyPair.
      params - Params for query, including start(e.g. march 2022.) and end date, period etc.,
      Returns:
      The CandleStickData, null if some sort of error occurred. Implementers should log the error.
      Throws:
      ExchangeException - - Indication that the exchange reported some kind of error with the request or response
      NotAvailableFromExchangeException - - Indication that the exchange does not support the requested function or data
      NotYetImplementedForExchangeException - - Indication that the exchange supports the requested function or data, but it has not yet been implemented
      IOException - - Indication that a networking error occurred while fetching JSON data
    • getFundingRates

      default FundingRates getFundingRates() throws IOException
      Get the FundingRates for all perpetual contracts of the platform.
      Returns:
      The FundingRates, null if some sort of error occurred. Implementers should log the error.
      Throws:
      ExchangeException - - Indication that the exchange reported some kind of error with the request or response
      NotAvailableFromExchangeException - - Indication that the exchange does not support the requested function or data
      NotYetImplementedForExchangeException - - Indication that the exchange supports the requested function or data, but it has not yet been implemented
      IOException - - Indication that a networking error occurred while fetching JSON data
    • getFundingRate

      default FundingRate getFundingRate(Instrument instrument) throws IOException
      Get the FundingRate for specific instrument.
      Parameters:
      instrument - Instrument to get the funding rate.
      Returns:
      The FundingRate, null if some sort of error occurred. Implementers should log the error.
      Throws:
      ExchangeException - - Indication that the exchange reported some kind of error with the request or response
      NotAvailableFromExchangeException - - Indication that the exchange does not support the requested function or data
      NotYetImplementedForExchangeException - - Indication that the exchange supports the requested function or data, but it has not yet been implemented
      IOException - - Indication that a networking error occurred while fetching JSON data