use of si.mazi.rescu.SynchronizedValueFactory in project XChange by knowm.
the class BleutradeExchangeIntegration method shouldCreateNonceFactory.
@Test
public void shouldCreateNonceFactory() {
// when
SynchronizedValueFactory factory = exchange.getNonceFactory();
// then
assertThat(factory).isNotNull();
assertThat(factory instanceof AtomicLongIncrementalTime2013NonceFactory).isTrue();
}
use of si.mazi.rescu.SynchronizedValueFactory in project XChange by knowm.
the class IdexExchange method getNonceFactory.
@Override
public SynchronizedValueFactory<Long> getNonceFactory() {
return (SynchronizedValueFactory) () -> {
Long ret = null;
try {
ReturnNextNonceResponse var10000 = getNextNonceApi().nextNonce(new NextNonceReq().address(getExchangeSpecification().getApiKey()));
ret = var10000.getNonce().longValue();
} catch (Exception e) {
e.printStackTrace();
}
return ret;
};
}
Aggregations