Class OkCoinStreamingMarketDataService
java.lang.Object
info.bitrich.xchangestream.okcoin.OkCoinStreamingMarketDataService
- All Implemented Interfaces:
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 Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Observable<FutureTicker>
getFutureTicker
(CurrencyPair currencyPair, FuturesContract contract) #### future #### 1.io.reactivex.rxjava3.core.Observable<OrderBook>
getOrderBook
(CurrencyPair currencyPair, Object... args) #### spot #### 2.io.reactivex.rxjava3.core.Observable<Ticker>
getTicker
(CurrencyPair currencyPair, Object... args) #### spot #### 1.io.reactivex.rxjava3.core.Observable<Trade>
getTrades
(CurrencyPair currencyPair, Object... args) #### spot #### 4.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface info.bitrich.xchangestream.core.StreamingMarketDataService
getFundingRate, getFundingRates, getOrderBook, getOrderBookUpdates, getTicker, getTrades
-
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 interfaceStreamingMarketDataService
- Parameters:
currencyPair
- Currency pair of the order bookargs
- if the first arg isFuturesContract
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 interfaceStreamingMarketDataService
- Parameters:
currencyPair
- Currency pair of the tickerargs
-- 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 tickercontract
-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 interfaceStreamingMarketDataService
- Parameters:
currencyPair
- Currency pair of the tradesargs
- the first argFuturesContract
- Returns:
-