feat(): updated all remaining categories for response and request types
This commit is contained in:
@@ -170,7 +170,6 @@ import {
|
|||||||
SpotBorrowCheckResultV5,
|
SpotBorrowCheckResultV5,
|
||||||
SpotLeveragedTokenOrderHistoryV5,
|
SpotLeveragedTokenOrderHistoryV5,
|
||||||
SpotMarginStateV5,
|
SpotMarginStateV5,
|
||||||
SubAccountAllApiKeysResultV5,
|
|
||||||
SubMemberV5,
|
SubMemberV5,
|
||||||
SwitchIsolatedMarginParamsV5,
|
SwitchIsolatedMarginParamsV5,
|
||||||
SwitchPositionModeParamsV5,
|
SwitchPositionModeParamsV5,
|
||||||
@@ -1691,15 +1690,6 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
return this.getPrivate('/v5/user/submembers', params);
|
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.
|
* 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');
|
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<
|
getUIDWalletType(params: { memberIds: string }): Promise<
|
||||||
APIResponseV3WithTime<{
|
APIResponseV3WithTime<{
|
||||||
accounts: {
|
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);
|
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.
|
* 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);
|
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
|
****** Affiliate APIs
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
export interface CollateralCoinV5 {
|
export interface CollateralCoinV5 {
|
||||||
collateralAccuracy: number;
|
collateralAccuracy: number;
|
||||||
currency: string;
|
|
||||||
initialLTV: string;
|
initialLTV: string;
|
||||||
liquidationLTV: string;
|
liquidationLTV: string;
|
||||||
marginCallLTV: string;
|
marginCallLTV: string;
|
||||||
|
|||||||
@@ -27,26 +27,44 @@ export interface SubMemberV5 {
|
|||||||
}
|
}
|
||||||
export type ApiKeyType = 1 | 2;
|
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 {
|
export interface ApiKeyInfoV5 {
|
||||||
id: string;
|
id: string;
|
||||||
note: string;
|
note: string;
|
||||||
apiKey: string;
|
apiKey: string;
|
||||||
readOnly: 0 | 1;
|
readOnly: 0 | 1;
|
||||||
secret: string;
|
secret: string;
|
||||||
permissions: PermissionsV5;
|
permissions: ApiKeyPermissionsV5;
|
||||||
ips?: string[];
|
ips: string[];
|
||||||
type: ApiKeyType;
|
type: 1 | 2; // 1: personal, 2: connected to third-party app
|
||||||
deadlineDay?: number;
|
deadlineDay: number;
|
||||||
expiredAt?: string;
|
expiredAt: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
unified: 0 | 1;
|
/** @deprecated */
|
||||||
uta: 0 | 1;
|
unified: number;
|
||||||
|
uta: 0 | 1; // 0: regular account, 1: unified trade account
|
||||||
userID: number;
|
userID: number;
|
||||||
inviterID: number;
|
inviterID: number;
|
||||||
vipLevel?: string;
|
vipLevel: string;
|
||||||
mktMakerLevel?: string;
|
mktMakerLevel: string;
|
||||||
affiliateID?: number;
|
affiliateID: number;
|
||||||
|
rsaPublicKey: string;
|
||||||
isMaster: boolean;
|
isMaster: boolean;
|
||||||
|
parentUid: string;
|
||||||
|
kycLevel: 'LEVEL_DEFAULT' | 'LEVEL_1' | 'LEVEL_2';
|
||||||
|
kycRegion: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UpdateApiKeyResultV5 {
|
export interface UpdateApiKeyResultV5 {
|
||||||
|
|||||||
Reference in New Issue
Block a user