protected EXXBaseService(Exchange exchange) { super(exchange); this.apiKey = exchange.getExchangeSpecification().getApiKey(); this.secretKey = exchange.getExchangeSpecification().getSecretKey(); } }
protected CoinsuperBaseService(Exchange exchange) { super(exchange); this.apiKey = exchange.getExchangeSpecification().getApiKey(); this.secretKey = exchange.getExchangeSpecification().getSecretKey(); } }
protected String getSignature(BigDecimal timestamp, HttpMethod method, String path, String body) { String secretKey = exchange.getExchangeSpecification().getSecretKey(); String message = timestamp + method.toString() + path + (body != null ? body : ""); return new HmacDigest("HmacSHA256", secretKey).hexDigest(message); }
@Override protected void initServices() { this.marketDataService = new BTCMarketsMarketDataService(this); if (exchangeSpecification.getApiKey() != null && exchangeSpecification.getSecretKey() != null) { this.tradeService = new BTCMarketsTradeService(this); this.accountService = new BTCMarketsAccountService(this); } }
public TheRockTradeServiceRaw(Exchange exchange) { super(exchange); final ExchangeSpecification spec = exchange.getExchangeSpecification(); this.theRockAuthenticated = RestProxyFactory.createProxy( TheRockAuthenticated.class, spec.getSslUri(), getClientConfig()); this.signatureCreator = new TheRockDigest(spec.getSecretKey()); }
@Override protected void initServices() { ExchangeSpecification spec = getExchangeSpecification(); AcxApi api = RestProxyFactory.createProxy(AcxApi.class, spec.getSslUri()); AcxMapper mapper = new AcxMapper(); this.marketDataService = new AcxMarketDataService(api, mapper); if (spec.getApiKey() != null && spec.getSecretKey() != null) { AcxSignatureCreator signatureCreator = new AcxSignatureCreator(spec.getSecretKey()); this.accountService = new AcxAccountService(api, mapper, signatureCreator, spec.getApiKey()); this.tradeService = new AcxTradeService(api, mapper, signatureCreator, spec.getApiKey()); } }
protected BaseExmoService(Exchange exchange) { super(exchange); ExchangeSpecification exchangeSpecification = exchange.getExchangeSpecification(); this.exmo = RestProxyFactory.createProxy( Exmo.class, exchangeSpecification.getSslUri(), getClientConfig()); this.apiKey = exchangeSpecification.getApiKey(); this.signatureCreator = ExmoDigest.createInstance(exchangeSpecification.getSecretKey()); }
protected GatecoinAccountServiceRaw(Exchange exchange) { super(exchange); this.gatecoinAuthenticated = RestProxyFactory.createProxy( GatecoinAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); this.signatureCreator = GatecoinDigest.createInstance(exchange.getExchangeSpecification().getSecretKey()); }
protected TheRockAccountServiceRaw(Exchange exchange) { super(exchange); final ExchangeSpecification spec = exchange.getExchangeSpecification(); this.theRockAuthenticated = RestProxyFactory.createProxy( TheRockAuthenticated.class, spec.getSslUri(), getClientConfig()); apiKey = spec.getApiKey(); this.signatureCreator = new TheRockDigest(spec.getSecretKey()); }
protected CoinbaseBaseService(Exchange exchange) { super(exchange); coinbase = RestProxyFactory.createProxy( CoinbaseAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); signatureCreator2 = CoinbaseV2Digest.createInstance(exchange.getExchangeSpecification().getSecretKey()); }
public GatecoinTradeServiceRaw(Exchange exchange) { super(exchange); this.gatecoinAuthenticated = RestProxyFactory.createProxy( GatecoinAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); this.signatureCreator = GatecoinDigest.createInstance(exchange.getExchangeSpecification().getSecretKey()); }
public BxBaseService(Exchange exchange) { super(exchange); bx = RestProxyFactory.createProxy( BxAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); signatureCreator = BxDigest.createInstance(exchange.getExchangeSpecification().getSecretKey()); }
protected BTCMarketsAccountServiceRaw(Exchange exchange) { super(exchange); this.nonceFactory = exchange.getNonceFactory(); this.btcm = RestProxyFactory.createProxy( BTCMarketsAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); this.signer = new BTCMarketsDigest(exchange.getExchangeSpecification().getSecretKey()); }
public LunoBaseService(Exchange exchange) { super(exchange); lunoAPI = new LunoAPIImpl( exchange.getExchangeSpecification().getApiKey(), exchange.getExchangeSpecification().getSecretKey(), exchange.getExchangeSpecification().getSslUri(), getClientConfig()); } }
public BTCTradeSecretData getSecretData() throws IOException { BTCTradeSecretResponse response = btcTrade.getSecret( exchange.getExchangeSpecification().getSecretKey(), exchange.getExchangeSpecification().getApiKey()); if (response.getResult()) { return response.getData(); } else { throw new ExchangeException(response.getMessage()); } } }
protected YoBitBaseService(Class<T> type, Exchange exchange) { super(exchange); this.signatureCreator = YoBitDigest.createInstance( exchange.getExchangeSpecification().getSecretKey(), exchange.getExchangeSpecification().getApiKey()); this.service = RestProxyFactory.createProxy( type, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); } }
public LivecoinBaseService(Class<T> type, Exchange exchange) { super(exchange); this.service = RestProxyFactory.createProxy( type, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); this.apiKey = exchange.getExchangeSpecification().getApiKey(); this.signatureCreator = LivecoinDigest.createInstance(exchange.getExchangeSpecification().getSecretKey(), apiKey); } }
protected HitbtcBaseService(Exchange exchange) { super(exchange); String apiKey = exchange.getExchangeSpecification().getApiKey(); String secretKey = exchange.getExchangeSpecification().getSecretKey(); ClientConfig config = getClientConfig(); ClientConfigUtil.addBasicAuthCredentials(config, apiKey, secretKey); hitbtc = RestProxyFactory.createProxy( HitbtcAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), config); } }
public CoinEggAccountServiceRaw(Exchange exchange) { super(exchange); ExchangeSpecification spec = exchange.getExchangeSpecification(); this.apiKey = spec.getApiKey(); this.signer = CoinEggDigest.createInstance(spec.getSecretKey()); this.tradePassword = spec.getPassword(); this.nonceFactory = exchange.getNonceFactory(); this.coinEggAuthenticated = RestProxyFactory.createProxy( CoinEggAuthenticated.class, exchange.getExchangeSpecification().getSslUri()); }
/** Constructor */ protected ANXAccountServiceRaw(Exchange exchange, IRestProxyFactory restProxyFactory) { super(exchange); Assert.notNull( exchange.getExchangeSpecification().getSslUri(), "Exchange specification URI cannot be null"); this.anxV2 = restProxyFactory.createProxy( ANXV2.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); this.signatureCreator = ANXV2Digest.createInstance(exchange.getExchangeSpecification().getSecretKey()); }