package org.knowm.xchange.bitfinex.v1; import java.io.IOException; import javax.ws.rs.Consumes; import javax.ws.rs.HeaderParam; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.knowm.xchange.bitfinex.v1.dto.BitfinexException; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexBalancesRequest; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexBalancesResponse; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexDepositAddressRequest; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexDepositAddressResponse; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexDepositWithdrawalHistoryRequest; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexDepositWithdrawalHistoryResponse; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexMarginInfosRequest; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexMarginInfosResponse; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexWithdrawalRequest; import org.knowm.xchange.bitfinex.v1.dto.account.BitfinexWithdrawalResponse; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexActiveCreditsRequest; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexActivePositionsResponse; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexCancelOfferRequest; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexCancelOrderMultiRequest; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexCancelOrderMultiResponse; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexCancelOrderRequest; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexCreditResponse; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexNewOfferRequest; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexNewOrderMultiRequest; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexNewOrderMultiResponse; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexNewOrderRequest; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexNonceOnlyRequest; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexOfferStatusRequest; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexOfferStatusResponse; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexOrderStatusRequest; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexOrderStatusResponse; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexPastTradesRequest; import org.knowm.xchange.bitfinex.v1.dto.trade.BitfinexTradeResponse; import si.mazi.rescu.ParamsDigest; @Path("v1") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public interface BitfinexAuthenticated extends Bitfinex { @POST @Path("order/new") BitfinexOrderStatusResponse newOrder(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexNewOrderRequest newOrderRequest) throws IOException, BitfinexException; @POST @Path("order/new/multi") BitfinexNewOrderMultiResponse newOrderMulti(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexNewOrderMultiRequest newOrderMultiRequest) throws IOException, BitfinexException; @POST @Path("offer/new") BitfinexOfferStatusResponse newOffer(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexNewOfferRequest newOfferRequest) throws IOException, BitfinexException; @POST @Path("balances") BitfinexBalancesResponse[] balances(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexBalancesRequest balancesRequest) throws IOException, BitfinexException; @POST @Path("order/cancel") BitfinexOrderStatusResponse cancelOrders(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexCancelOrderRequest cancelOrderRequest) throws IOException, BitfinexException; @POST @Path("order/cancel/multi") BitfinexCancelOrderMultiResponse cancelOrderMulti(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexCancelOrderMultiRequest cancelOrderRequest) throws IOException, BitfinexException; @POST @Path("offer/cancel") BitfinexOfferStatusResponse cancelOffer(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexCancelOfferRequest cancelOfferRequest) throws IOException, BitfinexException; @POST @Path("orders") BitfinexOrderStatusResponse[] activeOrders(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexNonceOnlyRequest nonceOnlyRequest) throws IOException, BitfinexException; @POST @Path("offers") BitfinexOfferStatusResponse[] activeOffers(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexNonceOnlyRequest nonceOnlyRequest) throws IOException, BitfinexException; @POST @Path("positions") BitfinexActivePositionsResponse[] activePositions(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexNonceOnlyRequest nonceOnlyRequest) throws IOException, BitfinexException; @POST @Path("order/status") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) BitfinexOrderStatusResponse orderStatus(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexOrderStatusRequest orderStatusRequest) throws IOException, BitfinexException; @POST @Path("offer/status") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) BitfinexOfferStatusResponse offerStatus(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexOfferStatusRequest offerStatusRequest) throws IOException, BitfinexException; @POST @Path("mytrades") BitfinexTradeResponse[] pastTrades(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexPastTradesRequest pastTradesRequest) throws IOException, BitfinexException; @POST @Path("credits") BitfinexCreditResponse[] activeCredits(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexActiveCreditsRequest activeCreditsRequest) throws IOException, BitfinexException; @POST @Path("margin_infos") BitfinexMarginInfosResponse[] marginInfos(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexMarginInfosRequest marginInfosRequest) throws IOException, BitfinexException; @POST @Path("withdraw") BitfinexWithdrawalResponse[] withdraw(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexWithdrawalRequest withdrawalRequest) throws IOException, BitfinexException; @POST @Path("deposit/new") BitfinexDepositAddressResponse requestDeposit(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexDepositAddressRequest depositRequest) throws IOException, BitfinexException; @POST @Path("history/movements") BitfinexDepositWithdrawalHistoryResponse[] depositWithdrawalHistory(@HeaderParam("X-BFX-APIKEY") String apiKey, @HeaderParam("X-BFX-PAYLOAD") ParamsDigest payload, @HeaderParam("X-BFX-SIGNATURE") ParamsDigest signature, BitfinexDepositWithdrawalHistoryRequest request) throws IOException, BitfinexException; }