Class GateioStreamingMarketDataService
java.lang.Object
info.bitrich.xchangestream.gateio.GateioStreamingMarketDataService
- All Implemented Interfaces:
StreamingMarketDataService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGateioStreamingMarketDataService(GateioStreamingService service, ExchangeMetaData exchangeMetaData, GateioMarketDataService marketDataService, GateioStreamingExchange streamingExchange) -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Observable<FundingRate> getFundingRate(Instrument instrument, Object... args) Get funding rate of specific instrument.io.reactivex.rxjava3.core.Observable<OrderBook> getOrderBook(CurrencyPair currencyPair, Object... args) Get an order book representing the current offered exchange rates (market depth).io.reactivex.rxjava3.core.Observable<OrderBook> getOrderBook(Instrument instrument, Object... args) io.reactivex.rxjava3.core.Observable<OrderBook> getOrderBookLegacy(CurrencyPair currencyPair, Object... args) Uses the limited-level snapshot method: https://www.gate.io/docs/apiv4/ws/index.html#limited-level-full-order-book-snapshotio.reactivex.rxjava3.core.Observable<OrderBookTicker> getOrderBookTicker(Instrument instrument) io.reactivex.rxjava3.core.Observable<Ticker> getTicker(CurrencyPair currencyPair, Object... args) Get a ticker representing the current exchange rate.io.reactivex.rxjava3.core.Observable<Ticker> getTicker(Instrument instrument, Object... args) io.reactivex.rxjava3.core.Observable<Trade> getTrades(CurrencyPair currencyPair, Object... args) Get the trades performed by the exchange.io.reactivex.rxjava3.core.Observable<Trade> getTrades(Instrument instrument, Object... args) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface info.bitrich.xchangestream.core.StreamingMarketDataService
getCandleStick, getFundingRates, getOrderBookTicker, getOrderBookUpdates
-
Field Details
-
MAX_DEPTH_DEFAULT
public static final int MAX_DEPTH_DEFAULT- See Also:
-
UPDATE_INTERVAL_DEFAULT
-
-
Constructor Details
-
GateioStreamingMarketDataService
public GateioStreamingMarketDataService(GateioStreamingService service, ExchangeMetaData exchangeMetaData, GateioMarketDataService marketDataService, GateioStreamingExchange streamingExchange)
-
-
Method Details
-
getOrderBook
public io.reactivex.rxjava3.core.Observable<OrderBook> getOrderBook(Instrument instrument, Object... args) - Specified by:
getOrderBookin interfaceStreamingMarketDataService
-
getOrderBook
public io.reactivex.rxjava3.core.Observable<OrderBook> getOrderBook(CurrencyPair currencyPair, Object... args) Description copied from interface:StreamingMarketDataServiceGet an order book representing the current offered exchange rates (market depth).Warning: The library will attempt to keep the snapshots returned in sync with the exchange using the approaches published by that exchange. However, there are currently no guarantees that messages will not be skipped, or that any initial state message will be sent on connection. Emits
NotConnectedExceptionwhen not connected to the WebSocket API.- Specified by:
getOrderBookin interfaceStreamingMarketDataService- Parameters:
currencyPair- Currency pair of the order book- Returns:
Observablethat emitsOrderBookwhen exchange sends the update.
-
getOrderBookLegacy
public io.reactivex.rxjava3.core.Observable<OrderBook> getOrderBookLegacy(CurrencyPair currencyPair, Object... args) Uses the limited-level snapshot method: https://www.gate.io/docs/apiv4/ws/index.html#limited-level-full-order-book-snapshot -
getTicker
public io.reactivex.rxjava3.core.Observable<Ticker> getTicker(CurrencyPair currencyPair, Object... args) Description copied from interface:StreamingMarketDataServiceGet a ticker representing the current exchange rate. EmitsNotConnectedExceptionWhen not connected to the WebSocket API.Warning: There are currently no guarantees that messages will not be skipped, or that any initial state message will be sent on connection.
- Specified by:
getTickerin interfaceStreamingMarketDataService- Parameters:
currencyPair- Currency pair of the ticker- Returns:
Observablethat emitsTickerwhen exchange sends the update.
-
getTicker
public io.reactivex.rxjava3.core.Observable<Ticker> getTicker(Instrument instrument, Object... args) - Specified by:
getTickerin interfaceStreamingMarketDataService
-
getTrades
- Specified by:
getTradesin interfaceStreamingMarketDataService
-
getTrades
public io.reactivex.rxjava3.core.Observable<Trade> getTrades(CurrencyPair currencyPair, Object... args) Description copied from interface:StreamingMarketDataServiceGet the trades performed by the exchange. EmitsNotConnectedExceptionWhen not connected to the WebSocket API.Warning: There are currently no guarantees that messages will not be skipped.
- Specified by:
getTradesin interfaceStreamingMarketDataService- Parameters:
currencyPair- Currency pair of the trades- Returns:
Observablethat emitsTradewhen exchange sends the update.
-
getFundingRate
public io.reactivex.rxjava3.core.Observable<FundingRate> getFundingRate(Instrument instrument, Object... args) Description copied from interface:StreamingMarketDataServiceGet funding rate of specific instrument.- Specified by:
getFundingRatein interfaceStreamingMarketDataService- Parameters:
instrument- Instrument to get the funding rate for- Returns:
Observablethat emitsFundingRatewhen exchange sends the update.
-
getOrderBookTicker
public io.reactivex.rxjava3.core.Observable<OrderBookTicker> getOrderBookTicker(Instrument instrument)
-