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

com.xeiam.xchange.therock.TheRockAuthenticated Maven / Gradle / Ivy

The newest version!
package com.xeiam.xchange.therock;

import java.io.IOException;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.xeiam.xchange.therock.dto.TheRockException;
import com.xeiam.xchange.therock.dto.account.TheRockBalance;
import com.xeiam.xchange.therock.dto.account.TheRockBalances;
import com.xeiam.xchange.therock.dto.account.TheRockWithdrawal;
import com.xeiam.xchange.therock.dto.account.TheRockWithdrawalResponse;
import com.xeiam.xchange.therock.dto.trade.TheRockOrder;
import com.xeiam.xchange.therock.service.TheRockDigest;

import si.mazi.rescu.SynchronizedValueFactory;

@Path("v1")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public interface TheRockAuthenticated {

  String X_TRT_NONCE = "X-TRT-NONCE";

  @POST
  @Path("funds/{fund_id}/orders")
  TheRockOrder placeOrder(@PathParam("fund_id") TheRock.Pair currencyPair, @HeaderParam("X-TRT-KEY") String publicKey,
      @HeaderParam("X-TRT-SIGN") TheRockDigest signer, @HeaderParam(X_TRT_NONCE) SynchronizedValueFactory nonceFactory, TheRockOrder order)
          throws TheRockException, IOException;

  @POST
  @Path("atms/withdraw")
  TheRockWithdrawalResponse withdraw(@HeaderParam("X-TRT-KEY") String publicKey, @HeaderParam("X-TRT-SIGN") TheRockDigest signer,
      @HeaderParam(X_TRT_NONCE) SynchronizedValueFactory nonceFactory, TheRockWithdrawal withdrawal) throws TheRockException, IOException;

  @GET
  @Path("balances/{currency}")
  TheRockBalance balance(@HeaderParam("X-TRT-KEY") String publicKey, @HeaderParam("X-TRT-SIGN") TheRockDigest signer,
      @HeaderParam(X_TRT_NONCE) SynchronizedValueFactory nonceFactory, @PathParam("currency") String currency)
          throws TheRockException, IOException;

  @GET
  @Path("balances")
  TheRockBalances balances(@HeaderParam("X-TRT-KEY") String publicKey, @HeaderParam("X-TRT-SIGN") TheRockDigest signer,
      @HeaderParam(X_TRT_NONCE) SynchronizedValueFactory nonceFactory) throws TheRockException, IOException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy