public interface AccountAPI
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,String> |
createAccount(String currency,
String type)
已过时。
|
SubApiKeyResponse |
createSubApiKey(String subName,
String passphrase,
String remark,
String permission,
String ipWhitelist,
String expire)
This endpoint can be used to create Spot APIs for sub-accounts.
|
SubUserCreateResponse |
createSubUser(String subName,
String password,
String access,
String remarks)
This endpoint can be used to create sub-accounts.
|
SubApiKeyResponse |
deleteSubApiKey(String subName,
String apiKey,
String passphrase)
This endpoint can be used to delete sub-account Spot APIs.
|
AccountBalanceResponse |
getAccount(String accountId)
Information for a single account.
|
Pagination<AccountDetailResponse> |
getAccountLedgers(String currency,
String direction,
String bizType,
long startAt,
long endAt,
int currentPage,
int pageSize)
List account activity.
|
List<AccountDetailResponse> |
getHFAccountLedgers(String currency,
String direction,
String bizType,
Long lastId,
Integer limit,
Long startAt,
Long endAt)
This API endpoint returns all transfer (in and out) records in high-frequency trading account and supports multi-coin queries.
|
SubAccountBalanceResponse |
getSubAccount(String subUserId)
Get info for a single sub-account.
|
Pagination<SubAccountBalanceResponse> |
getSubAccountPageList(int currentPage,
int pageSize)
This endpoint can be used to get paginated sub-account information.
|
List<SubApiKeyResponse> |
getSubApiKey(String subName,
String apiKey)
This endpoint can be used to obtain a list of Spot APIs pertaining to a sub-account.
|
UserSummaryInfoResponse |
getUserSummaryInfo()
This endpoint can be used to obtain account summary information.
|
Map<String,String> |
innerTransfer2(AccountTransferV2Request request)
The inner transfer interface is used for assets transfer among the accounts of a user and is free of charges on the platform.
|
List<AccountBalancesResponse> |
listAccounts(String currency,
String type)
Get a list of accounts.
|
List<SubAccountBalanceResponse> |
listSubAccounts()
Get a list of sub-accounts.
|
TransferableBalanceResponse |
transferable(String currency,
String type,
String tag)
This endpoint returns the transferable balance of a specified account.
|
Map<String,String> |
transferBetweenSubAndMasterV2(String clientOid,
String currency,
BigDecimal amount,
String direction,
String subUserId,
String subAccountType,
String accountType)
Transfer the assets between the master user and the sub-user and only supports main account.
|
List<AccountBalancesResponse> |
transferToHFAccount(String clientOid,
String currency,
String from,
BigDecimal amount)
transfer to the high-frequency account
|
SubApiKeyResponse |
updateSubApiKey(String subName,
String apiKey,
String passphrase,
String permission,
String ipWhitelist,
String expire)
This endpoint can be used to modify sub-account Spot APIs.
|
List<AccountBalancesResponse> listAccounts(String currency, String type) throws IOException
Your accounts are separate from your KuCoin accounts. See the Deposits section for documentation on how to deposit funds to begin trading.
currency - The code of the currencytype - Account type:,"main" or "trade" or "trade_hf"IOException - on socket errors.KucoinApiException - when errors are returned from the exchange.AccountBalanceResponse getAccount(String accountId) throws IOException
accountId - id of the accountIOException - on socket errors.KucoinApiException - when errors are returned from the exchange.@Deprecated Map<String,String> createAccount(String currency, String type) throws IOException
currency - the code of the currencytype - Account type ,"main" or "trade"IOException - on socket errors.KucoinApiException - when errors are returned from the exchange.Pagination<AccountDetailResponse> getAccountLedgers(String currency, String direction, String bizType, long startAt, long endAt, int currentPage, int pageSize) throws IOException
currency - Id of the accountdirection - [Optional] Side: in - Receive, out - SendbizType - [Optional] Business type: DEPOSIT, WITHDRAW, TRANSFER, SUB_TRANSFER,TRADE_EXCHANGE, MARGIN_EXCHANGE, KUCOIN_BONUS.startAt - Start time. unix timestamp calculated in seconds, the creation time queried shall posterior to the start timeendAt - End time. unix timestamp calculated in seconds, the creation time queried shall prior to the end time.currentPage - The page to fetchpageSize - The page size.IOException - on socket errors.KucoinApiException - when errors are returned from the exchange.Map<String,String> innerTransfer2(AccountTransferV2Request request) throws IOException
request - IOExceptionList<SubAccountBalanceResponse> listSubAccounts() throws IOException
You need to create the account by using the API-KEY of sub user firstly if the account of sub user is not exist. Attention only trade account can be used for trading
IOException - on socket errors.KucoinApiException - when errors are returned from the exchange.SubAccountBalanceResponse getSubAccount(String subUserId) throws IOException
subUserId - id of the sub userIOException - on socket errors.KucoinApiException - when errors are returned from the exchange.Map<String,String> transferBetweenSubAndMasterV2(String clientOid, String currency, BigDecimal amount, String direction, String subUserId, String subAccountType, String accountType) throws IOException
clientOid - Request idcurrency - currency codeamount - Transfer amount, a multiple and positive number of the amount precision.direction - OUT — the master user to sub user;IN — the sub user to the master user.subUserId - id of the sub usersubAccountType - The account type of the sub user: MAIN or TRADEaccountType - The account type of the user: MAIN or TRADEIOException - on socket errors.KucoinApiException - when errors are returned from the exchange.TransferableBalanceResponse transferable(String currency, String type, String tag) throws IOException
currency - type - The account type: MAIN, TRADE, TRADE_HF, MARGIN or POOLtag - [Optional] Trading pair, required when the account type is ISOLATED; other types are not passed, e.g.: BTC-USDTIOExceptionUserSummaryInfoResponse getUserSummaryInfo() throws IOException
IOException - on socket errors.KucoinApiException - when errors are returned from the exchange.SubUserCreateResponse createSubUser(String subName, String password, String access, String remarks) throws IOException
subName - Sub-account name(must contain 7-32 characters, at least one number and one letter. Cannot contain any spaces)password - Password(7-24 characters, must contain letters and numbers, cannot only contain numbers or include special characters)access - Permission (types include Spot, Futures, Margin permissions, which can be used alone or in combination)remarks - [Optional] Remarks(1~24 characters)IOException - on socket errors.KucoinApiException - when errors are returned from the exchange.List<SubApiKeyResponse> getSubApiKey(String subName, String apiKey) throws IOException
subName - Sub-account nameapiKey - [Optional] API-Key.IOException - on socket errors.KucoinApiException - when errors are returned from the exchange.SubApiKeyResponse createSubApiKey(String subName, String passphrase, String remark, String permission, String ipWhitelist, String expire) throws IOException
subName - Sub-account name, create sub account name of API Keypassphrase - Password(Must contain 7-32 characters. Cannot contain any spaces.)remark - Remarks(1~24 characters)permission - [Optional] Permissions(Only "General" and "Trade" permissions can be set, such as "General, Trade". The default is "General")ipWhitelist - [Optional] IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP)expire - [Optional] API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360IOException - on socket errors.KucoinApiException - when errors are returned from the exchange.SubApiKeyResponse updateSubApiKey(String subName, String apiKey, String passphrase, String permission, String ipWhitelist, String expire) throws IOException
subName - Sub-account name, create sub account name of API Keypassphrase - Password(Must contain 7-32 characters. Cannot contain any spaces.)apiKey - API-Key(Sub-account APIKey)permission - [Optional] Permissions(Only "General" and "Trade" permissions can be set, such as "General, Trade". The default is "General")ipWhitelist - [Optional] IP whitelist(You may add up to 20 IPs. Use a halfwidth comma to each IP)expire - [Optional] API expiration time; Never expire(default)-1,30Day30,90Day90,180Day180,360Day360IOException - on socket errors.KucoinApiException - when errors are returned from the exchange.SubApiKeyResponse deleteSubApiKey(String subName, String apiKey, String passphrase) throws IOException
subName - Sub-account name, create sub account name of API Keypassphrase - Password(Must contain 7-32 characters. Cannot contain any spaces.)apiKey - API-Key(Sub-account APIKey)IOException - on socket errors.KucoinApiException - when errors are returned from the exchange.Pagination<SubAccountBalanceResponse> getSubAccountPageList(int currentPage, int pageSize) throws IOException
currentPage - Sub-account name, create sub account name of API KeypageSize - Password(Must contain 7-32 characters. Cannot contain any spaces)IOException - on socket errors.KucoinApiException - when errors are returned from the exchange.List<AccountBalancesResponse> transferToHFAccount(String clientOid, String currency, String from, BigDecimal amount) throws IOException
clientOid - Client Order Id,a unique identifier created by the user, using UUID is recommendedcurrency - currencyfrom - Payment account type: main(main account), trade(trading account), trade_hf(high-frequency trading account)amount - Transfer amount, the precision is the precision of the currency multiplied by a positive integerIOExceptionList<AccountDetailResponse> getHFAccountLedgers(String currency, String direction, String bizType, Long lastId, Integer limit, Long startAt, Long endAt) throws IOException
currency - [Optional] Id of the accountdirection - [Optional] Side: in - Receive, out - SendbizType - [Optional] Business type: DEPOSIT, WITHDRAW, TRANSFER, SUB_TRANSFER,TRADE_EXCHANGE, MARGIN_EXCHANGE, KUCOIN_BONUS.startAt - [Optional] Start time. unix timestamp calculated in seconds, the creation time queried shall posterior to the start timeendAt - [Optional] End time. unix timestamp calculated in seconds, the creation time queried shall prior to the end time.lastId - [Optional] The id of the last set of data from the previous batch of data. By default, the latest information is given.limit - [Optional] Default100,Max200IOException - on socket errors.KucoinApiException - when errors are returned from the exchange.Copyright © 2023. All rights reserved.