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 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()); }
public CoinmateBalance getCoinmateBalance() throws IOException { CoinmateBalance coinmateBalance = coinmateAuthenticated.getBalances( exchange.getExchangeSpecification().getApiKey(), exchange.getExchangeSpecification().getUserName(), signatureCreator, exchange.getNonceFactory()); throwExceptionIfError(coinmateBalance); return coinmateBalance; }
public CoinmateDepositAddresses coinmateBitcoinDepositAddresses() throws IOException { CoinmateDepositAddresses addresses = coinmateAuthenticated.bitcoinDepositAddresses( exchange.getExchangeSpecification().getApiKey(), exchange.getExchangeSpecification().getUserName(), signatureCreator, exchange.getNonceFactory()); throwExceptionIfError(addresses); return addresses; }
public BTCMarketsMarketDataServiceRaw(Exchange exchange) { super(exchange); this.btcmarkets = RestProxyFactory.createProxy( BTCMarkets.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); }
public BitsoMarketDataServiceRaw(Exchange exchange) { super(exchange); this.bitso = RestProxyFactory.createProxy( Bitso.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); }
/** * Constructor * * @param exchange */ public CexIOMarketDataServiceRaw(Exchange exchange) { super(exchange); this.cexio = RestProxyFactory.createProxy( CexIO.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); }
@Override public AccountInfo getAccountInfo() throws IOException { return BitbayAdapters.adaptAccountInfo( exchange.getExchangeSpecification().getUserName(), getBitbayAccountInfo()); }
public CoinMarketCapMarketDataServiceRaw(Exchange exchange) { super(exchange); this.coinmarketcap = RestProxyFactory.createProxy( CoinMarketCap.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); }
public List<BTCTurkOpenOrders> getBTCTurkOpenOrders(CurrencyPair pair) throws IOException { return btcTurk.getOpenOrders( pair.toString().replace("/", ""), exchange.getExchangeSpecification().getApiKey(), exchange.getNonceFactory(), signatureCreator); }
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 static void main(String[] args) throws IOException { ExchangeSpecification exSpec = new GateioExchange().getDefaultExchangeSpecification(); exSpec.setShouldLoadRemoteMetaData(true); Exchange exchange = ExchangeFactory.INSTANCE.createExchange(exSpec); System.out.println(exchange.getExchangeSpecification().isShouldLoadRemoteMetaData()); System.out.println(exchange.getExchangeMetaData().toString()); System.out.println(exchange.getExchangeSymbols()); } }
public CoinsuperMarketDataServiceRaw(Exchange exchange) { super(exchange); this.coinsuper = RestProxyFactory.createProxy( CoinsuperAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), getClientConfig()); this.apiKey = super.apiKey; this.secretKey = super.secretKey; this.nonceFactory = exchange.getNonceFactory(); }
public List<BTCTurkUserTransactions> getBTCTurkUserTransactions( int offset, int limit, BTCTurkSort sort) throws IOException { return btcTurk.getUserTransactions( offset, limit, sort.toString(), exchange.getExchangeSpecification().getApiKey(), exchange.getNonceFactory(), signatureCreator); } }
public KrakenQueryOrderResult queryKrakenOrdersResult( boolean includeTrades, String userRef, String... transactionIds) throws IOException { KrakenQueryOrderResult krakenQueryOrderResult = kraken.queryOrders( includeTrades, userRef, createDelimitedString(transactionIds), exchange.getExchangeSpecification().getApiKey(), signatureCreator, exchange.getNonceFactory()); return krakenQueryOrderResult; }
public boolean cancelOrder(String id) throws IOException { return btcTurk .setCancelOrder( id, exchange.getExchangeSpecification().getApiKey(), exchange.getNonceFactory(), signatureCreator) .getResult(); }
@Override public AccountInfo getAccountInfo() throws IOException { CexIOBalanceInfo cexIOAccountInfo = getCexIOAccountInfo(); return new AccountInfo( exchange.getExchangeSpecification().getUserName(), CexIOAdapters.adaptWallet(cexIOAccountInfo)); }
public BTCMarketsOrders getBTCMarketsOpenOrders( CurrencyPair currencyPair, Integer limit, Long since) throws IOException { BTCMarketsOpenOrdersAndTradeHistoryRequest request = new BTCMarketsOpenOrdersAndTradeHistoryRequest( currencyPair.counter.getCurrencyCode(), currencyPair.base.getCurrencyCode(), limit, since); return btcm.getOpenOrders( exchange.getExchangeSpecification().getApiKey(), nonceFactory, signer, request); }
public IndependentReserveOrderDetailsResponse getOrderDetails(String orderGuid) throws IOException { Long nonce = exchange.getNonceFactory().createValue(); String apiKey = exchange.getExchangeSpecification().getApiKey(); IndependentReserveOrderDetailsRequest request = new IndependentReserveOrderDetailsRequest(apiKey, nonce, orderGuid); request.setSignature( signatureCreator.digestParamsToString( ExchangeEndpoint.GET_ORDER_DETAILS, nonce, request.getParameters())); return independentReserveAuthenticated.orderDetails(request); } }