Interface AccountAPI


  • @Path("api")
    @Produces("application/json")
    public interface AccountAPI
    • Method Detail

      • getAccountList

        @GET
        @Path("v1/accounts")
        KucoinResponse<List<AccountBalancesResponse>> getAccountList​(@HeaderParam("KC-API-KEY")
                                                                     String apiKey,
                                                                     @HeaderParam("KC-API-SIGN")
                                                                     si.mazi.rescu.ParamsDigest signature,
                                                                     @HeaderParam("KC-API-TIMESTAMP")
                                                                     si.mazi.rescu.SynchronizedValueFactory<Long> nonce,
                                                                     @HeaderParam("KC-API-PASSPHRASE")
                                                                     String apiPassphrase,
                                                                     @QueryParam("currency")
                                                                     String currency,
                                                                     @QueryParam("type")
                                                                     String type)
                                                              throws IOException
        Get a list of accounts.

        Your accounts are separate from your KuCoin accounts. See the Deposits section for documentation on how to deposit funds to begin trading.

        Parameters:
        currency - The code of the currency
        type - Account type:,"main" or "trade"
        Returns:
        The accounts.
        Throws:
        IOException - on socket errors.
        KucoinApiException - when errors are returned from the exchange.
      • createAccount

        @POST
        @Path("v1/accounts")
        @Consumes("application/json")
        KucoinResponse<Void> createAccount​(@HeaderParam("KC-API-KEY")
                                           String apiKey,
                                           @HeaderParam("KC-API-SIGN")
                                           si.mazi.rescu.ParamsDigest signature,
                                           @HeaderParam("KC-API-TIMESTAMP")
                                           si.mazi.rescu.SynchronizedValueFactory<Long> nonce,
                                           @HeaderParam("KC-API-PASSPHRASE")
                                           String apiPassphrase,
                                           CreateAccountRequest req)
                                    throws IOException
        Throws:
        IOException
      • getAccountLedgers

        @GET
        @Path("v1/accounts/{accountId}/ledgers")
        KucoinResponse<Pagination<AccountLedgersResponse>> getAccountLedgers​(@HeaderParam("KC-API-KEY")
                                                                             String apiKey,
                                                                             @HeaderParam("KC-API-SIGN")
                                                                             si.mazi.rescu.ParamsDigest signature,
                                                                             @HeaderParam("KC-API-TIMESTAMP")
                                                                             si.mazi.rescu.SynchronizedValueFactory<Long> nonce,
                                                                             @HeaderParam("KC-API-PASSPHRASE")
                                                                             String apiPassphrase,
                                                                             @PathParam("accountId")
                                                                             String accountId,
                                                                             @QueryParam("startAt")
                                                                             Long startAt,
                                                                             @QueryParam("endAt")
                                                                             Long endAt,
                                                                             @QueryParam("pageSize")
                                                                             Integer pageSize,
                                                                             @QueryParam("currentPage")
                                                                             Integer currentPage)
                                                                      throws IOException
        Throws:
        IOException