Search in sources :

Example 1 with CoinbaseProExchange

use of org.knowm.xchange.coinbasepro.CoinbaseProExchange in project everytrade-plugins by everytrade-io.

the class CoinbaseProConnector method getTransactions.

@Override
public DownloadResult getTransactions(String downloadState) {
    final ExchangeSpecification exSpec = new CoinbaseProExchange().getDefaultExchangeSpecification();
    exSpec.setApiKey(apiKey);
    exSpec.setSecretKey(apiSecret);
    exSpec.setExchangeSpecificParametersItem("passphrase", passPhrase);
    final Exchange exchange = ExchangeFactory.INSTANCE.createExchange(exSpec);
    final CoinbaseProDownloader coinbaseProDownloader = new CoinbaseProDownloader(exchange, downloadState);
    DownloadResult download = coinbaseProDownloader.download(currencyPairs);
    return download;
}
Also used : Exchange(org.knowm.xchange.Exchange) SupportedExchange(io.everytrade.server.model.SupportedExchange) CoinbaseProExchange(org.knowm.xchange.coinbasepro.CoinbaseProExchange) CoinbaseProExchange(org.knowm.xchange.coinbasepro.CoinbaseProExchange) DownloadResult(io.everytrade.server.plugin.api.connector.DownloadResult) ExchangeSpecification(org.knowm.xchange.ExchangeSpecification)

Aggregations

SupportedExchange (io.everytrade.server.model.SupportedExchange)1 DownloadResult (io.everytrade.server.plugin.api.connector.DownloadResult)1 Exchange (org.knowm.xchange.Exchange)1 ExchangeSpecification (org.knowm.xchange.ExchangeSpecification)1 CoinbaseProExchange (org.knowm.xchange.coinbasepro.CoinbaseProExchange)1