feat(): add new v5 user endpoints. add user examples.

This commit is contained in:
tiagosiebler
2023-06-09 14:21:36 +01:00
parent f739ec8550
commit 987b3f81d0
13 changed files with 239 additions and 0 deletions

View File

@@ -1030,6 +1030,17 @@ export class RestClientV5 extends BaseRestClient {
return this.get('/v5/asset/deposit/query-allowed-list', params);
}
/**
* Set auto transfer account after deposit. The same function as the setting for Deposit on web GUI
*/
setDepositAccount(params: { accountType: AccountTypeV5 }): Promise<
APIResponseV3WithTime<{
status: 0 | 1;
}>
> {
return this.postPrivate('/v5/asset/deposit/deposit-to-account', params);
}
/**
* Query deposit records.
*
@@ -1091,6 +1102,21 @@ export class RestClientV5 extends BaseRestClient {
});
}
/**
* Query the deposit address information of SUB account.
*/
getSubDepositAddress(
coin: string,
chainType: string,
subMemberId: string,
): Promise<APIResponseV3WithTime<DepositAddressResultV5>> {
return this.getPrivate('/v5/asset/deposit/query-sub-member-address', {
coin,
chainType,
subMemberId,
});
}
/**
* Query the deposit address information of SUB account.
*
@@ -1130,6 +1156,15 @@ export class RestClientV5 extends BaseRestClient {
return this.getPrivate('/v5/asset/withdraw/query-record', params);
}
/**
* Query withdrawable amount.
*/
getWithdrawableAmount(params: {
coin: string;
}): Promise<APIResponseV3<{ rows: WithdrawalRecordV5[] }>> {
return this.getPrivate('/v5/asset/withdraw/withdrawable-amount', params);
}
/**
* Withdraw assets from the SPOT account.
*