feat(): updated all remaining categories for response and request types
This commit is contained in:
@@ -170,7 +170,6 @@ import {
|
||||
SpotBorrowCheckResultV5,
|
||||
SpotLeveragedTokenOrderHistoryV5,
|
||||
SpotMarginStateV5,
|
||||
SubAccountAllApiKeysResultV5,
|
||||
SubMemberV5,
|
||||
SwitchIsolatedMarginParamsV5,
|
||||
SwitchPositionModeParamsV5,
|
||||
@@ -1691,15 +1690,6 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.getPrivate('/v5/user/submembers', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query all api keys information of a sub UID.
|
||||
*/
|
||||
getSubAccountAllApiKeys(
|
||||
params: GetSubAccountAllApiKeysParamsV5,
|
||||
): Promise<APIResponseV3WithTime<SubAccountAllApiKeysResultV5>> {
|
||||
return this.getPrivate('/v5/user/sub-apikeys', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Froze sub uid. Use master user's api key only.
|
||||
*
|
||||
@@ -1723,6 +1713,18 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.getPrivate('/v5/user/query-api');
|
||||
}
|
||||
|
||||
/**
|
||||
* Query all api keys information of a sub UID.
|
||||
*/
|
||||
getSubAccountAllApiKeys(params: GetSubAccountAllApiKeysParamsV5): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
result: ApiKeyInfoV5[];
|
||||
nextPageCursor: string;
|
||||
}>
|
||||
> {
|
||||
return this.getPrivate('/v5/user/sub-apikeys', params);
|
||||
}
|
||||
|
||||
getUIDWalletType(params: { memberIds: string }): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
accounts: {
|
||||
@@ -1731,7 +1733,7 @@ export class RestClientV5 extends BaseRestClient {
|
||||
}[];
|
||||
}>
|
||||
> {
|
||||
return this.getPrivate('/v5/user/query-api', params);
|
||||
return this.getPrivate('/v5/user/get-member-type', params);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1760,6 +1762,19 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.postPrivate('/v5/user/update-sub-api', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a sub UID. Before deleting the UID, please make sure there are no assets.
|
||||
*
|
||||
* TIP:
|
||||
* The API key must have one of the permissions to be allowed to call the following API endpoint.
|
||||
* - master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
|
||||
*/
|
||||
deleteSubMember(
|
||||
params: DeleteSubMemberParamsV5,
|
||||
): Promise<APIResponseV3WithTime<{}>> {
|
||||
return this.postPrivate('/v5/user/del-submember', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the api key of master account. Use the api key pending to be delete to call the endpoint. Use master user's api key only.
|
||||
*
|
||||
@@ -1789,19 +1804,6 @@ export class RestClientV5 extends BaseRestClient {
|
||||
return this.postPrivate('/v5/user/delete-sub-api', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a sub UID. Before deleting the UID, please make sure there are no assets.
|
||||
*
|
||||
* TIP:
|
||||
* The API key must have one of the permissions to be allowed to call the following API endpoint.
|
||||
* - master API key: "Account Transfer", "Subaccount Transfer", "Withdrawal"
|
||||
*/
|
||||
deleteSubMember(
|
||||
params: DeleteSubMemberParamsV5,
|
||||
): Promise<APIResponseV3WithTime<{}>> {
|
||||
return this.postPrivate('/v5/user/del-submember', params);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
****** Affiliate APIs
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
export interface CollateralCoinV5 {
|
||||
collateralAccuracy: number;
|
||||
currency: string;
|
||||
initialLTV: string;
|
||||
liquidationLTV: string;
|
||||
marginCallLTV: string;
|
||||
|
||||
@@ -27,26 +27,44 @@ export interface SubMemberV5 {
|
||||
}
|
||||
export type ApiKeyType = 1 | 2;
|
||||
|
||||
export interface ApiKeyPermissionsV5 {
|
||||
ContractTrade: string[];
|
||||
Spot: string[];
|
||||
Wallet: string[];
|
||||
Options: string[];
|
||||
Derivatives: string[];
|
||||
CopyTrading: string[];
|
||||
BlockTrade: string[];
|
||||
Exchange: string[];
|
||||
NFT: string[];
|
||||
Affiliate: string[];
|
||||
}
|
||||
|
||||
export interface ApiKeyInfoV5 {
|
||||
id: string;
|
||||
note: string;
|
||||
apiKey: string;
|
||||
readOnly: 0 | 1;
|
||||
secret: string;
|
||||
permissions: PermissionsV5;
|
||||
ips?: string[];
|
||||
type: ApiKeyType;
|
||||
deadlineDay?: number;
|
||||
expiredAt?: string;
|
||||
permissions: ApiKeyPermissionsV5;
|
||||
ips: string[];
|
||||
type: 1 | 2; // 1: personal, 2: connected to third-party app
|
||||
deadlineDay: number;
|
||||
expiredAt: string;
|
||||
createdAt: string;
|
||||
unified: 0 | 1;
|
||||
uta: 0 | 1;
|
||||
/** @deprecated */
|
||||
unified: number;
|
||||
uta: 0 | 1; // 0: regular account, 1: unified trade account
|
||||
userID: number;
|
||||
inviterID: number;
|
||||
vipLevel?: string;
|
||||
mktMakerLevel?: string;
|
||||
affiliateID?: number;
|
||||
vipLevel: string;
|
||||
mktMakerLevel: string;
|
||||
affiliateID: number;
|
||||
rsaPublicKey: string;
|
||||
isMaster: boolean;
|
||||
parentUid: string;
|
||||
kycLevel: 'LEVEL_DEFAULT' | 'LEVEL_1' | 'LEVEL_2';
|
||||
kycRegion: string;
|
||||
}
|
||||
|
||||
export interface UpdateApiKeyResultV5 {
|
||||
|
||||
Reference in New Issue
Block a user