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

com.xeiam.xchange.mexbt.dto.MeXBTRequest Maven / Gradle / Ivy

The newest version!
package com.xeiam.xchange.mexbt.dto;

import com.xeiam.xchange.mexbt.service.MeXBTDigest;

import si.mazi.rescu.SynchronizedValueFactory;

public class MeXBTRequest {

  protected final String apiKey;
  protected final long apiNonce;
  protected final String apiSig;

  public MeXBTRequest(String apiKey, SynchronizedValueFactory nonceFactory, MeXBTDigest meXBTDigest) {
    this.apiKey = apiKey;
    final Long nonce;
    synchronized (nonceFactory) {
      nonce = nonceFactory.createValue();
    }
    this.apiNonce = nonce.longValue();
    this.apiSig = meXBTDigest.digestParams(apiNonce);
  }

  public String getApiKey() {
    return apiKey;
  }

  public long getApiNonce() {
    return apiNonce;
  }

  public String getApiSig() {
    return apiSig;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy