use of info.bitrich.xchangestream.core.StreamingTradeService in project XChange by knowm.
the class CoinjarUserTradesExample method runTest.
@Test
public void runTest() {
ExchangeSpecification defaultExchangeSpecification = new ExchangeSpecification(CoinjarStreamingExchange.class);
AuthUtils.setApiAndSecretKey(defaultExchangeSpecification);
if (defaultExchangeSpecification.getApiKey() != null) {
StreamingExchange exchange = StreamingExchangeFactory.INSTANCE.createExchange(defaultExchangeSpecification);
exchange.connect().blockingAwait();
StreamingTradeService streamingTradeService = exchange.getStreamingTradeService();
Disposable disposable = streamingTradeService.getUserTrades(null).test().awaitCount(1, BaseTestConsumer.TestWaitStrategy.SLEEP_100MS, 1000 * 60 * 10).assertNoErrors();
disposable.dispose();
}
}
use of info.bitrich.xchangestream.core.StreamingTradeService in project XChange by knowm.
the class CoinjarOrderChangesExample method runTest.
@Test
public void runTest() {
ExchangeSpecification defaultExchangeSpecification = new ExchangeSpecification(CoinjarStreamingExchange.class);
AuthUtils.setApiAndSecretKey(defaultExchangeSpecification);
if (defaultExchangeSpecification.getApiKey() != null) {
StreamingExchange exchange = StreamingExchangeFactory.INSTANCE.createExchange(defaultExchangeSpecification);
exchange.connect().blockingAwait();
StreamingTradeService streamingTradeService = exchange.getStreamingTradeService();
Disposable disposable = streamingTradeService.getOrderChanges(null).test().awaitCount(10, BaseTestConsumer.TestWaitStrategy.SLEEP_100MS, 1000 * 60 * 10).assertNoErrors();
disposable.dispose();
}
}
Aggregations