Class GateioStreamingTradeService
- All Implemented Interfaces:
StreamingTradeService
-
Constructor Summary
ConstructorsConstructorDescriptionGateioStreamingTradeService(GateioStreamingService service, ExchangeMetaData exchangeMetaData) -
Method Summary
Modifier and TypeMethodDescriptionio.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<UserTrade> io.reactivex.rxjava3.core.Observable<UserTrade> getUserTrades(CurrencyPair currencyPair, Object... args) Gets authenticated trades for the logged-in user.io.reactivex.rxjava3.core.Single<Integer> placeMarketOrder(MarketOrder marketOrder) io.reactivex.rxjava3.core.Single<Integer> placeMarketOrder(MarketOrder marketOrder, Object... args) Places a market order on the exchange.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.StreamingTradeService
cancelOrder, changeOrder, getPositionChanges, getUserTrades, placeLimitOrder
-
Constructor Details
-
GateioStreamingTradeService
public GateioStreamingTradeService(GateioStreamingService service, ExchangeMetaData exchangeMetaData)
-
-
Method Details
-
getUserTrades
public io.reactivex.rxjava3.core.Observable<UserTrade> getUserTrades(CurrencyPair currencyPair, Object... args) Description copied from interface:StreamingTradeServiceGets 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
NotConnectedExceptionWhen not connected to the WebSocket API.Immediately throws
ExchangeSecurityExceptionif called without authentication details- Specified by:
getUserTradesin interfaceStreamingTradeService- Parameters:
currencyPair- Currency pair for which to get trades.- Returns:
Observablethat emitsUserTradewhen exchange sends the update.
-
getUserTrades
- Specified by:
getUserTradesin interfaceStreamingTradeService
-
getOrderChanges
public io.reactivex.rxjava3.core.Observable<Order> getOrderChanges(Instrument instrument, Object... args) - Specified by:
getOrderChangesin interfaceStreamingTradeService
-
getOrderChanges
public io.reactivex.rxjava3.core.Observable<Order> getOrderChanges(CurrencyPair currencyPair, Object... args) Description copied from interface:StreamingTradeServiceGet 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
NotConnectedExceptionWhen not connected to the WebSocket API.Immediately throws
ExchangeSecurityExceptionif called without authentication details- Specified by:
getOrderChangesin interfaceStreamingTradeService- Parameters:
currencyPair- Currency pair of the order changes.- Returns:
Observablethat emitsOrderwhen exchange sends the update.
-
placeMarketOrder
public io.reactivex.rxjava3.core.Single<Integer> placeMarketOrder(MarketOrder marketOrder, Object... args) Description copied from interface:StreamingTradeServicePlaces a market order on the exchange. A market order is an order to buy or sell a financial instrument immediately at the best available current price. Specific exchanges may require additional optional parameters to process the market order.- Specified by:
placeMarketOrderin interfaceStreamingTradeService- Parameters:
marketOrder- The details of the market order, including the instrument, amount, and side (buy/sell).args- Optional additional arguments that may be required by specific exchanges.- Returns:
- A
Singlethat emits the operation result code, typically 0 for success.
-
placeMarketOrder
-