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

com.kucoin.sdk.rest.interfaces.retrofit.LoanAPIRetrofit Maven / Gradle / Ivy

The newest version!
/**
 * Copyright 2019 Mek Global Limited.
 */
package com.kucoin.sdk.rest.interfaces.retrofit;

import com.kucoin.sdk.rest.request.*;
import com.kucoin.sdk.rest.response.*;
import retrofit2.Call;
import retrofit2.http.*;

import java.util.List;
import java.util.Map;

/**
 * Created by ezreal on 2020/12/08.
 */
public interface LoanAPIRetrofit {

    @POST("api/v3/margin/borrow")
    Call> borrowV3(@Body BorrowV3Request request);

    @GET("api/v3/margin/borrow")
    Call>> queryBorrowV3(@QueryMap Map request);

    @POST("api/v3/margin/repay")
    Call> repayV3(@Body RepayV3Request request);

    @GET("api/v3/margin/repay")
    Call>> queryRepayV3(@QueryMap Map request);

    @GET("api/v3/margin/interest")
    Call>> queryInterestV3(@QueryMap Map request);

    @GET("api/v3/project/list")
    Call>> getProjectList(@Query("currency") String currency);

    @GET("api/v3/project/marketInterestRate")
    Call>> getProjectMarketInterestRate(@Query("currency") String currency);

    @POST("api/v3/purchase")
    Call> purchase(@Body PurchaseRequest request);

    @POST("api/v3/lend/purchase/update")
    Call> updatePurchase(@Body UpdatePurchaseRequest request);

    @GET("api/v3/purchase/orders")
    Call>> queryPurchase(@QueryMap Map request);

    @POST("api/v3/redeem")
    Call> redeem(@Body RedeemRequest request);

    @GET("api/v3/redeem/orders")
    Call>> queryRedeem(@QueryMap Map request);

    @Deprecated
    @POST("api/v1/margin/borrow")
    Call> borrow(@Body BorrowRequest request);

    @Deprecated
    @GET("api/v1/margin/borrow")
    Call> queryBorrow(@Query("orderId") String orderId);

    @Deprecated
    @GET("api/v1/margin/borrow/outstanding")
    Call>> queryBorrowOutstanding(
            @Query("currency") String currency,
            @Query("currentPage") Integer currentPage,
            @Query("pageSize") Integer pageSize);

    @Deprecated
    @GET("api/v1/margin/borrow/repaid")
    Call>> queryBorrowRepaid(
            @Query("currency") String currency,
            @Query("currentPage") Integer currentPage,
            @Query("pageSize") Integer pageSize);

    @Deprecated
    @POST("api/v1/margin/repay/all")
    Call> repayAll(@Body RepayAllRequest request);

    @Deprecated
    @POST("api/v1/margin/repay/single")
    Call> repaySingle(@Body RepaySingleRequest request);

    @Deprecated
    @POST("api/v1/margin/lend")
    Call> lend(@Body LendRequest request);

    @Deprecated
    @DELETE("api/v1/margin/lend/{orderId}")
    Call> cancelLendOrder(@Path("orderId") String orderId);

    @Deprecated
    @POST("api/v1/margin/toggle-auto-lend")
    Call> toggleAutoLend(@Body ToggleAutoLendRequest request);

    @Deprecated
    @GET("api/v1/margin/lend/active")
    Call>> queryActiveLend(
            @Query("currency") String currency,
            @Query("currentPage") Integer currentPage,
            @Query("pageSize") Integer pageSize);

    @Deprecated
    @GET("api/v1/margin/lend/done")
    Call>> queryDoneLend(
            @Query("currency") String currency,
            @Query("currentPage") Integer currentPage,
            @Query("pageSize") Integer pageSize);

    @Deprecated
    @GET("api/v1/margin/lend/trade/unsettled")
    Call>> queryUnsettledTrade(
            @Query("currency") String currency,
            @Query("currentPage") Integer currentPage,
            @Query("pageSize") Integer pageSize);

    @Deprecated
    @GET("api/v1/margin/lend/trade/settled")
    Call>> querySettledTrade(
            @Query("currency") String currency,
            @Query("currentPage") Integer currentPage,
            @Query("pageSize") Integer pageSize);

    @Deprecated
    @GET("api/v1/margin/lend/assets")
    Call>> queryLendAssets(@Query("currency") String currency);

    @Deprecated
    @GET("api/v1/margin/market")
    Call>> queryMarket(
            @Query("currency") String currency,
            @Query("term") Integer term);

    @Deprecated
    @GET("api/v1/margin/trade/last")
    Call>> queryLastTrade(@Query("currency") String currency);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy