Class BinanceStreamingTradeService
- All Implemented Interfaces:
StreamingTradeService
-
Constructor Summary
ConstructorDescriptionBinanceStreamingTradeService
(BinanceUserDataStreamingService binanceUserDataStreamingService) -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Observable<Order>
getOrderChanges
(boolean isFuture) io.reactivex.rxjava3.core.Observable<Order>
getOrderChanges
(CurrencyPair currencyPair, Object... args) Get the changes of order state for the logged-in user.io.reactivex.rxjava3.core.Observable<Order>
getOrderChanges
(Instrument instrument, Object... args) io.reactivex.rxjava3.core.Observable<ExecutionReportBinanceUserTransaction>
io.reactivex.rxjava3.core.Observable<UserTrade>
getUserTrades
(boolean isFuture) io.reactivex.rxjava3.core.Observable<UserTrade>
getUserTrades
(CurrencyPair currencyPair, Object... args) Gets authenticated trades for the logged-in user.io.reactivex.rxjava3.core.Observable<UserTrade>
getUserTrades
(Instrument instrument, Object... args) void
Registers subsriptions with the streaming service for the given products.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.StreamingTradeService
getUserTrades
-
Constructor Details
-
BinanceStreamingTradeService
public BinanceStreamingTradeService(BinanceUserDataStreamingService binanceUserDataStreamingService)
-
-
Method Details
-
getRawExecutionReports
public io.reactivex.rxjava3.core.Observable<ExecutionReportBinanceUserTransaction> getRawExecutionReports() -
getOrderChanges
-
getOrderChanges
public io.reactivex.rxjava3.core.Observable<Order> getOrderChanges(CurrencyPair currencyPair, Object... args) Description copied from interface:StreamingTradeService
Get the changes of order state for the logged-in user.Warning: there are currently no guarantees that messages will arrive in order, that messages will not be skipped, or that any initial state message will be sent on connection. Most exchanges have a recommended approach for managing this, involving timestamps, sequence numbers and a separate REST API for re-sync when inconsistencies appear. You should implement these approaches, if required, by combining calls to this method with
TradeService.getOpenOrders()
.Emits
NotConnectedException
When not connected to the WebSocket API.Immediately throws
ExchangeSecurityException
if called without authentication details- Specified by:
getOrderChanges
in interfaceStreamingTradeService
- Parameters:
currencyPair
- Currency pair of the order changes.- Returns:
Observable
that emitsOrder
when exchange sends the update.
-
getUserTrades
public io.reactivex.rxjava3.core.Observable<UserTrade> getUserTrades(CurrencyPair currencyPair, Object... args) Description copied from interface:StreamingTradeService
Gets authenticated trades for the logged-in user.Warning: there are currently no guarantees that messages will arrive in order, that messages will not be skipped, or that any initial state message will be sent on connection. Most exchanges have a recommended approach for managing this, involving timestamps, sequence numbers and a separate REST API for re-sync when inconsistencies appear. You should implement these approaches, if required, by combining calls to this method with
TradeService.getTradeHistory(org.knowm.xchange.service.trade.params.TradeHistoryParams)
Emits
NotConnectedException
When not connected to the WebSocket API.Immediately throws
ExchangeSecurityException
if called without authentication details- Specified by:
getUserTrades
in interfaceStreamingTradeService
- Parameters:
currencyPair
- Currency pair for which to get trades.- Returns:
Observable
that emitsUserTrade
when exchange sends the update.
-
getOrderChanges
public io.reactivex.rxjava3.core.Observable<Order> getOrderChanges(Instrument instrument, Object... args) - Specified by:
getOrderChanges
in interfaceStreamingTradeService
-
getUserTrades
public io.reactivex.rxjava3.core.Observable<UserTrade> getUserTrades(Instrument instrument, Object... args) - Specified by:
getUserTrades
in interfaceStreamingTradeService
-
getUserTrades
-
openSubscriptions
public void openSubscriptions()Registers subsriptions with the streaming service for the given products.
-