v3.4.0: feat(#219) add support for account asset v3 REST endpoints

This commit is contained in:
tiagosiebler
2023-02-13 17:20:03 +00:00
parent 0c0900e608
commit 6fa204e8bd
11 changed files with 870 additions and 49 deletions

View File

@@ -19,6 +19,24 @@ export interface InternalTransferRequest {
to_account_type: TransferAccountType;
}
export interface InternalTransferRequestV3 {
transferId: string;
coin: string;
amount: string;
fromAccountType: string;
toAccountType: string;
}
export interface QueryInternalTransfersRequestV3 {
transferId?: string;
coin: string;
status?: string;
startTime?: number;
endTime?: number;
limit?: number;
cursor?: string;
}
export interface SubAccountTransferRequest {
transfer_id: string;
coin: string;
@@ -27,6 +45,16 @@ export interface SubAccountTransferRequest {
type: TransferType;
}
export interface SubAccountTransferRequestV3 {
transferId?: string;
coin?: string;
status?: string;
startTime?: number;
endTime?: number;
limit?: number;
cursor?: string;
}
export interface TransferQueryRequest {
transfer_id?: string;
coin?: string;
@@ -52,7 +80,6 @@ export interface UniversalTransferRequest {
from_account_type: TransferAccountType;
to_account_type: TransferAccountType;
}
export interface SupportedDepositListRequest {
coin?: string;
chain?: string;
@@ -92,3 +119,140 @@ export interface WithdrawalRequest {
chain: string;
tag?: string;
}
export interface UniversalTransferRequestV3 {
transferId: string;
coin: string;
amount: string;
fromMemberId: string;
toMemberId: string;
fromAccountType: TransferAccountType;
toAccountType: TransferAccountType;
}
export interface UniversalTransferListRequestV3 {
transferId?: string;
coin: string;
status?: string;
startTime?: number;
endTime?: number;
limit?: number;
cursor?: string;
}
export interface TransferCoinListRequestV3 {
fromAccountType: TransferAccountType;
toAccountType: TransferAccountType;
}
export interface SingleAccountCoinBalanceRequestV3 {
memberId?: string;
accountType: TransferAccountType;
coin: string;
withBonus?: '0' | '1';
}
export interface AccountCoinBalancesRequestV3 {
memberId?: string;
accountType: TransferAccountType;
coin?: string;
withBonus?: '0' | '1';
}
export interface AssetInfoRequestV3 {
accountType?: TransferAccountType;
coin?: string;
}
export interface SupportedDepositListRequestV3 {
coin?: string;
chain?: string;
cursor?: string;
limit?: number;
}
export interface DepositRecordQueryRequestV3 {
startTime?: number;
endTime?: number;
coin?: string;
cursor?: string;
limit?: number;
}
export interface SubDepositRecordQueryRequestV3 {
subMemberId: number;
startTime?: number;
endTime?: number;
coin?: string;
cursor?: string;
limit?: number;
}
export interface WithdrawRecordQueryRequestV3 {
withdrawID?: number;
startTime?: number;
endTime?: number;
coin?: string;
withdrawType?: string;
cursor?: string;
limit?: number;
}
export interface WithdrawCreateRequestV3 {
coin: string;
chain: string;
address: string;
tag?: string;
amount: string;
timestamp: number;
forceChain?: 0 | 1;
}
export interface QueryDepositAddressRequestV3 {
coin?: string;
chainType?: string;
}
export interface QuerySubAccountDepositAddressRequestV3 {
coin?: string;
chainType?: string;
subMemberId: string;
}
export interface CreateSubMemberRequestV3 {
username: string;
memberType: 1 | 6;
switch?: 0 | 1;
note?: string;
}
export interface CreateSubAPIKeyRequestV3 {
subuid: string;
note?: string;
readOnly: 0 | 1;
ips?: string[];
permissions: {
ContractTrade?: [];
Spot?: string[];
Wallet?: string[];
Options?: string[];
Derivatives?: string[];
Exchange?: string[];
};
}
export interface ModifyAPIKeyRequestV3 {
readOnly: number;
ips?: string[];
permissions: {
ContractTrade?: string[];
Spot?: string[];
Wallet?: string[];
Options?: string[];
Derivatives?: string[];
CopyTrading?: string[];
BlockTrade?: string[];
Exchange?: string[];
NFT?: string[];
};
}