Class BitmexStreamingMarketDataService
java.lang.Object
info.bitrich.xchangestream.bitmex.BitmexStreamingMarketDataService
- All Implemented Interfaces:
StreamingMarketDataService
Created by Lukas Zaoralek on 13.11.17.
-
Constructor Summary
ConstructorDescriptionBitmexStreamingMarketDataService
(BitmexStreamingService streamingService, BitmexExchange bitmexExchange) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
enableDeadManSwitch
(long rate, long timeout) 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<BitmexExecution>
getRawExecutions
(String symbol) io.reactivex.rxjava3.core.Observable<BitmexFunding>
io.reactivex.rxjava3.core.Observable<RawOrderBook>
getRawOrderBook
(CurrencyPair currencyPair) io.reactivex.rxjava3.core.Observable<BitmexTicker>
getRawTicker
(CurrencyPair currencyPair) io.reactivex.rxjava3.core.Observable<Ticker>
getTicker
(CurrencyPair currencyPair, Object... args) Get a ticker representing the current exchange rate.io.reactivex.rxjava3.core.Observable<Trade>
getTrades
(CurrencyPair currencyPair, Object... args) Get the trades performed by the exchange.boolean
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
-
Constructor Details
-
BitmexStreamingMarketDataService
public BitmexStreamingMarketDataService(BitmexStreamingService streamingService, BitmexExchange bitmexExchange)
-
-
Method Details
-
getOrderBook
public io.reactivex.rxjava3.core.Observable<OrderBook> getOrderBook(CurrencyPair currencyPair, Object... args) Description copied from interface:StreamingMarketDataService
Get 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
NotConnectedException
when not connected to the WebSocket API.- Specified by:
getOrderBook
in interfaceStreamingMarketDataService
- Parameters:
currencyPair
- Currency pair of the order book- Returns:
Observable
that emitsOrderBook
when exchange sends the update.
-
getRawOrderBook
public io.reactivex.rxjava3.core.Observable<RawOrderBook> getRawOrderBook(CurrencyPair currencyPair) -
getRawTicker
-
getTicker
public io.reactivex.rxjava3.core.Observable<Ticker> getTicker(CurrencyPair currencyPair, Object... args) Description copied from interface:StreamingMarketDataService
Get a ticker representing the current exchange rate. EmitsNotConnectedException
When 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:
getTicker
in interfaceStreamingMarketDataService
- Parameters:
currencyPair
- Currency pair of the ticker- Returns:
Observable
that emitsTicker
when exchange sends the update.
-
getTrades
public io.reactivex.rxjava3.core.Observable<Trade> getTrades(CurrencyPair currencyPair, Object... args) Description copied from interface:StreamingMarketDataService
Get the trades performed by the exchange. EmitsNotConnectedException
When not connected to the WebSocket API.Warning: There are currently no guarantees that messages will not be skipped.
- Specified by:
getTrades
in interfaceStreamingMarketDataService
- Parameters:
currencyPair
- Currency pair of the trades- Returns:
Observable
that emitsTrade
when exchange sends the update.
-
getRawExecutions
-
enableDeadManSwitch
- Throws:
IOException
-
enableDeadManSwitch
- Parameters:
rate
- in milliseconds to send updatedtimeout
- milliseconds from now after which orders will be cancelled- Throws:
IOException
-
isDeadManSwitchEnabled
- Throws:
IOException
-
disableDeadMansSwitch
- Throws:
IOException
-
getRawFunding
-