public static String createUTCDate(SynchronizedValueFactory<Long> nonce) { DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); return dateFormat.format(new Date(nonce.createValue())); }
public static String createUTCDate(SynchronizedValueFactory<Long> nonce) { DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); return dateFormat.format(new Date(nonce.createValue())); }
public CoinEggTradeAdd getCoinEggTradeAdd( BigDecimal amount, BigDecimal price, String type, String coin) throws IOException { return coinEggAuthenticated.getTradeAdd( apiKey, signer, nonceFactory.createValue(), amount, price, type, coin); }
/** Return private API common params. */ protected Map<String, String> getCommonParams() { Map<String, String> params = new TreeMap<>(); params.put("apiid", apiKey); params.put("secret", secretKey); params.put("timestamp", String.valueOf(exchange.getNonceFactory().createValue())); return params; }
public CoinEggTradeView getCoinEggTradeView(String tradeID, String coin) throws IOException { return coinEggAuthenticated.getTradeView( apiKey, signer, nonceFactory.createValue(), tradeID, coin); } }
public CoinEggTradeCancel getCoinEggTradeCancel(String id, String coin) throws IOException { return coinEggAuthenticated.getTradeCancel( apiKey, signer, nonceFactory.createValue(), id, coin); }
public CoinEggBalance getCoinEggBalance() throws IOException { return coinEggAuthenticated.getBalance(apiKey, nonceFactory.createValue(), signer); } }
public static GeminiTransfersRequest create( Date from, Integer limit, SynchronizedValueFactory<Long> nonceFactory) { Long timestamp = DateUtils.toMillisNullSafe(from); return new GeminiTransfersRequest(String.valueOf(nonceFactory.createValue()), limit, timestamp); }
public boolean cancelBitfinexOrderMulti(List<String> orderIds) throws IOException { long[] cancelOrderIds = new long[orderIds.size()]; for (int i = 0; i < cancelOrderIds.length; i++) { cancelOrderIds[i] = Long.valueOf(orderIds.get(i)); } bitfinex.cancelOrderMulti( apiKey, payloadCreator, signatureCreator, new BitfinexCancelOrderMultiRequest( String.valueOf(exchange.getNonceFactory().createValue()), cancelOrderIds)); return true; }
public CoinbaseProWebsocketAuthData getWebsocketAuthData() throws CoinbaseProException, IOException { long timestamp = nonceFactory.createValue(); JsonNode json = coinbasePro.getVerifyId(apiKey, digest, timestamp, passphrase); String userId = json.get("id").asText(); CoinbaseProDigest coinbaseProDigest = (CoinbaseProDigest) digest; CoinbaseProWebsocketAuthData data = new CoinbaseProWebsocketAuthData( userId, apiKey, passphrase, coinbaseProDigest.getSignature(), timestamp); return data; } }
public BitfinexOfferStatusResponse getBitfinexOfferStatusResponse(String offerId) throws IOException { BitfinexOfferStatusResponse offerStatus = bitfinex.offerStatus( apiKey, payloadCreator, signatureCreator, new BitfinexOfferStatusRequest( String.valueOf(exchange.getNonceFactory().createValue()), Long.valueOf(offerId))); return offerStatus; }
public BitfinexOfferStatusResponse cancelBitfinexOffer(String offerId) throws IOException { BitfinexOfferStatusResponse cancelResponse = bitfinex.cancelOffer( apiKey, payloadCreator, signatureCreator, new BitfinexCancelOfferRequest( String.valueOf(exchange.getNonceFactory().createValue()), Long.valueOf(offerId))); return cancelResponse; }
public BitfinexOrderStatusResponse getBitfinexOrderStatus(String orderId) throws IOException { BitfinexOrderStatusResponse orderStatus = bitfinex.orderStatus( apiKey, payloadCreator, signatureCreator, new BitfinexOrderStatusRequest( String.valueOf(exchange.getNonceFactory().createValue()), Long.valueOf(orderId))); return orderStatus; }
public BitfinexBalancesResponse[] getBitfinexAccountInfo() throws IOException { BitfinexBalancesResponse[] balances = bitfinex.balances( apiKey, payloadCreator, signatureCreator, new BitfinexBalancesRequest(String.valueOf(exchange.getNonceFactory().createValue()))); return balances; }
public BitfinexOrderStatusResponse[] getBitfinexOrdersHistory(long limit) throws IOException { BitfinexOrderStatusResponse[] orders = bitfinex.ordersHist( apiKey, payloadCreator, signatureCreator, new BitfinexOrdersHistoryRequest( String.valueOf(exchange.getNonceFactory().createValue()), limit)); return orders; }
public BitfinexDepositWithdrawalHistoryResponse[] getDepositWithdrawalHistory( String currency, String method, Date since, Date until, Integer limit) throws IOException { BitfinexDepositWithdrawalHistoryRequest request = new BitfinexDepositWithdrawalHistoryRequest( String.valueOf(exchange.getNonceFactory().createValue()), currency, method, since, until, limit); return bitfinex.depositWithdrawalHistory(apiKey, payloadCreator, signatureCreator, request); }
public BitfinexAccountInfosResponse[] getBitfinexAccountInfos() throws IOException { return bitfinex.accountInfos( apiKey, payloadCreator, signatureCreator, new BitfinexNonceOnlyRequest( "/v1/account_infos", String.valueOf(exchange.getNonceFactory().createValue()))); }
public BitfinexOfferStatusResponse[] getBitfinexOpenOffers() throws IOException { BitfinexOfferStatusResponse[] activeOffers = bitfinex.activeOffers( apiKey, payloadCreator, signatureCreator, new BitfinexNonceOnlyRequest( "/v1/offers", String.valueOf(exchange.getNonceFactory().createValue()))); return activeOffers; }
public BitfinexMarginInfosResponse[] getBitfinexMarginInfos() throws IOException { BitfinexMarginInfosResponse[] marginInfos = bitfinex.marginInfos( apiKey, payloadCreator, signatureCreator, new BitfinexMarginInfosRequest( String.valueOf(exchange.getNonceFactory().createValue()))); return marginInfos; }
public BitfinexAccountFeesResponse getAccountFees() throws IOException { return bitfinex.accountFees( apiKey, payloadCreator, signatureCreator, new BitfinexNonceOnlyRequest( "/v1/account_fees", String.valueOf(exchange.getNonceFactory().createValue()))); }