All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.knowm.xchange.cexio.service.CexIOBaseService Maven / Gradle / Ivy

There is a newer version: 5.2.0
Show newest version
package org.knowm.xchange.cexio.service;

import org.knowm.xchange.Exchange;
import org.knowm.xchange.cexio.CexIOAuthenticated;
import org.knowm.xchange.client.ExchangeRestProxyBuilder;
import org.knowm.xchange.service.BaseExchangeService;
import org.knowm.xchange.service.BaseService;

/** @author timmolter */
public class CexIOBaseService extends BaseExchangeService implements BaseService {

  protected final CexIOAuthenticated cexIOAuthenticated;
  protected final CexIODigest signatureCreator;

  /**
   * Constructor
   *
   * @param exchange
   */
  public CexIOBaseService(Exchange exchange) {

    super(exchange);

    cexIOAuthenticated =
        ExchangeRestProxyBuilder.forInterface(
                CexIOAuthenticated.class, exchange.getExchangeSpecification())
            .build();
    signatureCreator =
        CexIODigest.createInstance(
            exchange.getExchangeSpecification().getSecretKey(),
            exchange.getExchangeSpecification().getUserName(),
            exchange.getExchangeSpecification().getApiKey(),
            exchange.getNonceFactory());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy