Class BitfinexStreamingTradeService

java.lang.Object
info.bitrich.xchangestream.bitfinex.BitfinexStreamingTradeService
All Implemented Interfaces:
StreamingTradeService

public class BitfinexStreamingTradeService extends Object implements StreamingTradeService
  • Constructor Details

  • Method Details

    • getOrderChanges

      public io.reactivex.Observable<Order> getOrderChanges()
    • getOrderChanges

      public io.reactivex.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 interface StreamingTradeService
      Parameters:
      currencyPair - Currency pair of the order changes.
      Returns:
      Observable that emits Order when exchange sends the update.
    • getUserTrades

      public io.reactivex.Observable<UserTrade> getUserTrades()
      Gets a stream of all user trades to which we are subscribed.
      Specified by:
      getUserTrades in interface StreamingTradeService
      Returns:
      The stream of user trades.
    • getUserTrades

      public io.reactivex.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 interface StreamingTradeService
      Parameters:
      currencyPair - Currency pair for which to get trades.
      Returns:
      Observable that emits UserTrade when exchange sends the update.
    • getRawAuthenticatedOrders

      public io.reactivex.Observable<BitfinexWebSocketAuthOrder> getRawAuthenticatedOrders()
    • getRawAuthenticatedPreTrades

      public io.reactivex.Observable<BitfinexWebSocketAuthPreTrade> getRawAuthenticatedPreTrades()
    • getRawAuthenticatedTrades

      public io.reactivex.Observable<BitfinexWebSocketAuthTrade> getRawAuthenticatedTrades()