Class OkCoinStreamingMarketDataService

java.lang.Object
info.bitrich.xchangestream.okcoin.OkCoinStreamingMarketDataService
All Implemented Interfaces:
StreamingMarketDataService

public class OkCoinStreamingMarketDataService extends Object implements StreamingMarketDataService
#### spot #### https://github.com/okcoin-okex/API-docs-OKEx.com/blob/master/API-For-Spot-CN/%E5%B8%81%E5%B8%81%E4%BA%A4%E6%98%93WebSocket%20API.md ##### future #### https://github.com/okcoin-okex/API-docs-OKEx.com/blob/master/API-For-Futures-CN/%E5%90%88%E7%BA%A6%E4%BA%A4%E6%98%93WebSocket%20API.md https://github.com/okcoin-okex/API-docs-OKEx.com/blob/master/API-For-Futures-EN/WebSocket%20API%20for%20FUTURES.md
  • Method Details

    • getOrderBook

      public io.reactivex.rxjava3.core.Observable<OrderBook> getOrderBook(CurrencyPair currencyPair, Object... args)
      #### spot #### 2. ok_sub_spot_X_depth 订阅币币市场深度(200增量数据返回) 3. ok_sub_spot_X_depth_Y 订阅市场深度 #### future #### 3. ok_sub_futureusd_X_depth_Y 订阅合约市场深度(200增量数据返回) 3. ok_sub_futureusd_X_depth_Y Subscribe Contract Market Depth(Incremental) 4. ok_sub_futureusd_X_depth_Y_Z 订阅合约市场深度(全量返回) 4. ok_sub_futureusd_X_depth_Y_Z Subscribe Contract Market Depth(Full)
      Specified by:
      getOrderBook in interface StreamingMarketDataService
      Parameters:
      currencyPair - Currency pair of the order book
      args - if the first arg is FuturesContract means future, the next arg is amount
      Returns:
    • getTicker

      public io.reactivex.rxjava3.core.Observable<Ticker> getTicker(CurrencyPair currencyPair, Object... args)
      #### spot #### 1. ok_sub_spot_X_ticker 订阅行情数据
      Specified by:
      getTicker in interface StreamingMarketDataService
      Parameters:
      currencyPair - Currency pair of the ticker
      args -
      Returns:
    • getFutureTicker

      public io.reactivex.rxjava3.core.Observable<FutureTicker> getFutureTicker(CurrencyPair currencyPair, FuturesContract contract)
      #### future #### 1. ok_sub_futureusd_X_ticker_Y 订阅合约行情 1. ok_sub_futureusd_X_ticker_Y Subscribe Contract Market Price
      Parameters:
      currencyPair - Currency pair of the ticker
      contract - FuturesContract
      Returns:
    • getTrades

      public io.reactivex.rxjava3.core.Observable<Trade> getTrades(CurrencyPair currencyPair, Object... args)
      #### spot #### 4. ok_sub_spot_X_deals 订阅成交记录

      #### future #### 5. ok_sub_futureusd_X_trade_Y 订阅合约交易信息 5. ok_sub_futureusd_X_trade_Y Subscribe Contract Trade Record

      Specified by:
      getTrades in interface StreamingMarketDataService
      Parameters:
      currencyPair - Currency pair of the trades
      args - the first arg FuturesContract
      Returns: