
org.knowm.xchange.bithumb.BithumbAuthenticated Maven / Gradle / Ivy
package org.knowm.xchange.bithumb;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.FormParam;
import jakarta.ws.rs.HeaderParam;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;
import org.knowm.xchange.bithumb.dto.BithumbResponse;
import org.knowm.xchange.bithumb.dto.account.BithumbAccount;
import org.knowm.xchange.bithumb.dto.account.BithumbBalance;
import org.knowm.xchange.bithumb.dto.account.BithumbOrder;
import org.knowm.xchange.bithumb.dto.account.BithumbOrderDetail;
import org.knowm.xchange.bithumb.dto.account.BithumbWalletAddress;
import org.knowm.xchange.bithumb.dto.marketdata.BithumbTicker;
import org.knowm.xchange.bithumb.dto.trade.BithumbTradeResponse;
import org.knowm.xchange.bithumb.dto.trade.BithumbUserTransaction;
import si.mazi.rescu.ParamsDigest;
import si.mazi.rescu.SynchronizedValueFactory;
@Path("/")
@Produces(MediaType.APPLICATION_JSON)
public interface BithumbAuthenticated {
String API_KEY = "Api-Key";
String API_SIGN = "Api-Sign";
String API_NONCE = "Api-Nonce";
String ENDPOINT = "endpoint";
String API_CLIENT_TYPE = "api-client-type";
@POST
@Path("info/account")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
BithumbResponse getAccount(
@HeaderParam(API_KEY) String apiKey,
@HeaderParam(API_SIGN) ParamsDigest signature,
@HeaderParam(API_NONCE) SynchronizedValueFactory nonce,
@HeaderParam(API_CLIENT_TYPE) String apiClientType,
@FormParam(ENDPOINT) ParamsDigest endpointGenerator,
@FormParam("order_currency") String order_currency,
@FormParam("payment_currency") String payment_currency)
throws BithumbException, IOException;
@POST
@Path("info/balance")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
BithumbResponse getBalance(
@HeaderParam(API_KEY) String apiKey,
@HeaderParam(API_SIGN) ParamsDigest signature,
@HeaderParam(API_NONCE) SynchronizedValueFactory nonce,
@HeaderParam(API_CLIENT_TYPE) String apiClientType,
@FormParam(ENDPOINT) ParamsDigest endpointGenerator,
@FormParam("currency") String currency)
throws BithumbException, IOException;
@POST
@Path("info/wallet_address")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
BithumbResponse getWalletAddress(
@HeaderParam(API_KEY) String apiKey,
@HeaderParam(API_SIGN) ParamsDigest signature,
@HeaderParam(API_NONCE) SynchronizedValueFactory nonce,
@HeaderParam(API_CLIENT_TYPE) String apiClientType,
@FormParam(ENDPOINT) ParamsDigest endpointGenerator,
@FormParam("currency") String currency)
throws BithumbException, IOException;
@POST
@Path("info/ticker")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
BithumbResponse getTicker(
@HeaderParam(API_KEY) String apiKey,
@HeaderParam(API_SIGN) ParamsDigest signature,
@HeaderParam(API_NONCE) SynchronizedValueFactory nonce,
@HeaderParam(API_CLIENT_TYPE) String apiClientType,
@FormParam(ENDPOINT) ParamsDigest endpointGenerator,
@FormParam("order_currency") String orderCurrency,
@FormParam("payment_currency") String payment_currency)
throws BithumbException, IOException;
@POST
@Path("info/orders")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
BithumbResponse> getOrders(
@HeaderParam(API_KEY) String apiKey,
@HeaderParam(API_SIGN) ParamsDigest signature,
@HeaderParam(API_NONCE) SynchronizedValueFactory nonce,
@HeaderParam(API_CLIENT_TYPE) String apiClientType,
@FormParam(ENDPOINT) ParamsDigest endpointGenerator,
@FormParam("order_id") String orderId,
@FormParam("type") String type,
@FormParam("count") Integer count,
@FormParam("after") Integer after,
@FormParam("order_currency") String orderCurrency,
@FormParam("payment_currency") String payment_currency)
throws BithumbException, IOException;
@POST
@Path("info/order_detail")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
BithumbResponse getOrderDetail(
@HeaderParam(API_KEY) String apiKey,
@HeaderParam(API_SIGN) ParamsDigest signature,
@HeaderParam(API_NONCE) SynchronizedValueFactory nonce,
@HeaderParam(API_CLIENT_TYPE) String apiClientType,
@FormParam(ENDPOINT) ParamsDigest endpointGenerator,
@FormParam("order_id") String orderId,
@FormParam("order_currency") String orderCurrency,
@FormParam("payment_currency") String payment_currency)
throws BithumbException, IOException;
@POST
@Path("info/user_transactions")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
BithumbResponse> getUserTransactions(
@HeaderParam(API_KEY) String apiKey,
@HeaderParam(API_SIGN) ParamsDigest signature,
@HeaderParam(API_NONCE) SynchronizedValueFactory nonce,
@HeaderParam(API_CLIENT_TYPE) String apiClientType,
@FormParam(ENDPOINT) ParamsDigest endpointGenerator,
@FormParam("offset") Integer offset,
@FormParam("count") Integer count,
@FormParam("searchGb") Integer searchGb,
@FormParam("order_currency") String order_currency,
@FormParam("payment_currency") String payment_currency)
throws BithumbException, IOException;
@POST
@Path("trade/place")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
BithumbTradeResponse placeOrder(
@HeaderParam(API_KEY) String apiKey,
@HeaderParam(API_SIGN) ParamsDigest signature,
@HeaderParam(API_NONCE) SynchronizedValueFactory nonce,
@HeaderParam(API_CLIENT_TYPE) String apiClientType,
@FormParam(ENDPOINT) ParamsDigest endpointGenerator,
@FormParam("order_currency") String orderCurrency,
@FormParam("payment_currency") String paymentCurrency,
@FormParam("units") BigDecimal units,
@FormParam("price") BigDecimal price,
@FormParam("type") String type)
throws BithumbException, IOException;
@POST
@Path("trade/cancel")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
BithumbResponse cancelOrder(
@HeaderParam(API_KEY) String apiKey,
@HeaderParam(API_SIGN) ParamsDigest signature,
@HeaderParam(API_NONCE) SynchronizedValueFactory nonce,
@HeaderParam(API_CLIENT_TYPE) String apiClientType,
@FormParam(ENDPOINT) ParamsDigest endpointGenerator,
@FormParam("type") String type,
@FormParam("order_id") String orderId,
@FormParam("order_currency") String order_currency,
@FormParam("payment_currency") String payment_currency)
throws BithumbException, IOException;
@POST
@Path("trade/market_buy")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
BithumbTradeResponse marketBuy(
@HeaderParam(API_KEY) String apiKey,
@HeaderParam(API_SIGN) ParamsDigest signature,
@HeaderParam(API_NONCE) SynchronizedValueFactory nonce,
@HeaderParam(API_CLIENT_TYPE) String apiClientType,
@FormParam(ENDPOINT) ParamsDigest endpointGenerator,
@FormParam("units") BigDecimal units,
@FormParam("order_currency") String order_currency,
@FormParam("payment_currency") String payment_currency)
throws BithumbException, IOException;
@POST
@Path("trade/market_sell")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
BithumbTradeResponse marketSell(
@HeaderParam(API_KEY) String apiKey,
@HeaderParam(API_SIGN) ParamsDigest signature,
@HeaderParam(API_NONCE) SynchronizedValueFactory nonce,
@HeaderParam(API_CLIENT_TYPE) String apiClientType,
@FormParam(ENDPOINT) ParamsDigest endpointGenerator,
@FormParam("units") BigDecimal units,
@FormParam("order_currency") String order_currency,
@FormParam("payment_currency") String payment_currency)
throws BithumbException, IOException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy