UNPKG

kucoin-universal-sdk

Version:
242 lines (241 loc) 7.61 kB
import { Serializable } from '../../../internal/interfaces/serializable'; export declare class FlexTransferReq implements Serializable { /** * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits */ clientOid: string; /** * currency */ currency: string; /** * Transfer amount: The amount is a positive integer multiple of the currency precision. */ amount: string; /** * Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers. */ fromUserId?: string; /** * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ fromAccountType: FlexTransferReq.FromAccountTypeEnum; /** * Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ fromAccountTag?: string; /** * Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account) */ type: FlexTransferReq.TypeEnum; /** * Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers. */ toUserId?: string; /** * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ toAccountType: FlexTransferReq.ToAccountTypeEnum; /** * Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ toAccountTag?: string; /** * Private constructor, please use the corresponding static methods to construct the object. */ private constructor(); /** * Creates a new instance of the `FlexTransferReq` class. * The builder pattern allows step-by-step construction of a `FlexTransferReq` object. */ static builder(): FlexTransferReqBuilder; /** * Creates a new instance of the `FlexTransferReq` class with the given data. */ static create(data: { /** * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits */ clientOid: string; /** * currency */ currency: string; /** * Transfer amount: The amount is a positive integer multiple of the currency precision. */ amount: string; /** * Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers. */ fromUserId?: string; /** * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ fromAccountType: FlexTransferReq.FromAccountTypeEnum; /** * Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ fromAccountTag?: string; /** * Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account) */ type: FlexTransferReq.TypeEnum; /** * Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers. */ toUserId?: string; /** * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ toAccountType: FlexTransferReq.ToAccountTypeEnum; /** * Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ toAccountTag?: string; }): FlexTransferReq; /** * Convert the object to a JSON string. */ toJson(): string; /** * Create an object from a JSON string. */ static fromJson(input: string): FlexTransferReq; /** * Create an object from Js Object. */ static fromObject(jsonObject: Object): FlexTransferReq; } export declare namespace FlexTransferReq { enum FromAccountTypeEnum { /** * Funding account */ MAIN, /** * Spot account */ TRADE, /** * Futures account */ CONTRACT, /** * Cross margin account */ MARGIN, /** * Isolated margin account */ ISOLATED, /** * Cross margin account */ MARGIN_V2, /** * Isolated margin account */ ISOLATED_V2, /** * Option account */ OPTION } enum TypeEnum { /** * */ INTERNAL, /** * */ PARENT_TO_SUB, /** * */ SUB_TO_PARENT } enum ToAccountTypeEnum { /** * Funding account */ MAIN, /** * Spot account */ TRADE, /** * Futures account */ CONTRACT, /** * Cross margin account */ MARGIN, /** * Isolated margin account */ ISOLATED, /** * Cross margin account */ MARGIN_V2, /** * Isolated margin account */ ISOLATED_V2, /** * Option account */ OPTION } } export declare class FlexTransferReqBuilder { readonly obj: FlexTransferReq; constructor(obj: FlexTransferReq); /** * Unique order ID created by users to identify their orders, e.g. UUID, with a maximum length of 128 bits */ setClientOid(value: string): FlexTransferReqBuilder; /** * currency */ setCurrency(value: string): FlexTransferReqBuilder; /** * Transfer amount: The amount is a positive integer multiple of the currency precision. */ setAmount(value: string): FlexTransferReqBuilder; /** * Transfer out UserId: This is required when transferring from sub-account to master-account. It is optional for internal transfers. */ setFromUserId(value: string): FlexTransferReqBuilder; /** * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ setFromAccountType(value: FlexTransferReq.FromAccountTypeEnum): FlexTransferReqBuilder; /** * Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ setFromAccountTag(value: string): FlexTransferReqBuilder; /** * Transfer type: INTERNAL (Transfer within account), PARENT_TO_SUB (Transfer from master-account to sub-account), SUB_TO_PARENT (Transfer from sub-account to master-account) */ setType(value: FlexTransferReq.TypeEnum): FlexTransferReqBuilder; /** * Transfer in UserId: This is required when transferring master-account to sub-account. It is optional for internal transfers. */ setToUserId(value: string): FlexTransferReqBuilder; /** * Account type: MAIN, TRADE, CONTRACT, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ setToAccountType(value: FlexTransferReq.ToAccountTypeEnum): FlexTransferReqBuilder; /** * Symbol: Required when the account type is ISOLATED or ISOLATED_V2, for example: BTC-USDT */ setToAccountTag(value: string): FlexTransferReqBuilder; /** * Get the final object. */ build(): FlexTransferReq; }