UNPKG

kucoin-universal-sdk

Version:
178 lines (177 loc) 5.72 kB
import { Serializable } from '../../../internal/interfaces/serializable'; export declare class GetTradeHistoryReq implements Serializable { /** * symbol */ symbol?: string; /** * Trade type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin trade */ tradeType?: GetTradeHistoryReq.TradeTypeEnum; /** * The unique order id generated by the trading system (If orderId is specified, please ignore the other query parameters) */ orderId?: string; /** * Specify if the order is to \'buy\' or \'sell\'. */ side?: GetTradeHistoryReq.SideEnum; /** * Specify if the order is a \'limit\' order or \'market\' order. */ type?: GetTradeHistoryReq.TypeEnum; /** * The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. */ lastId?: number; /** * Default20, Max100 */ limit?: number; /** * Start time (milliseconds) */ startAt?: number; /** * End time (milliseconds) */ endAt?: number; /** * Private constructor, please use the corresponding static methods to construct the object. */ private constructor(); /** * Creates a new instance of the `GetTradeHistoryReq` class. * The builder pattern allows step-by-step construction of a `GetTradeHistoryReq` object. */ static builder(): GetTradeHistoryReqBuilder; /** * Creates a new instance of the `GetTradeHistoryReq` class with the given data. */ static create(data: { /** * symbol */ symbol?: string; /** * Trade type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin trade */ tradeType?: GetTradeHistoryReq.TradeTypeEnum; /** * The unique order id generated by the trading system (If orderId is specified, please ignore the other query parameters) */ orderId?: string; /** * Specify if the order is to \'buy\' or \'sell\'. */ side?: GetTradeHistoryReq.SideEnum; /** * Specify if the order is a \'limit\' order or \'market\' order. */ type?: GetTradeHistoryReq.TypeEnum; /** * The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. */ lastId?: number; /** * Default20, Max100 */ limit?: number; /** * Start time (milliseconds) */ startAt?: number; /** * End time (milliseconds) */ endAt?: number; }): GetTradeHistoryReq; /** * Convert the object to a JSON string. */ toJson(): string; /** * Create an object from a JSON string. */ static fromJson(input: string): GetTradeHistoryReq; /** * Create an object from Js Object. */ static fromObject(jsonObject: Object): GetTradeHistoryReq; } export declare namespace GetTradeHistoryReq { enum TradeTypeEnum { /** * */ MARGIN_TRADE, /** * */ MARGIN_ISOLATED_TRADE } enum SideEnum { /** * */ BUY, /** * */ SELL } enum TypeEnum { /** * */ LIMIT, /** * */ MARKET } } export declare class GetTradeHistoryReqBuilder { readonly obj: GetTradeHistoryReq; constructor(obj: GetTradeHistoryReq); /** * symbol */ setSymbol(value: string): GetTradeHistoryReqBuilder; /** * Trade type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin trade */ setTradeType(value: GetTradeHistoryReq.TradeTypeEnum): GetTradeHistoryReqBuilder; /** * The unique order id generated by the trading system (If orderId is specified, please ignore the other query parameters) */ setOrderId(value: string): GetTradeHistoryReqBuilder; /** * Specify if the order is to \'buy\' or \'sell\'. */ setSide(value: GetTradeHistoryReq.SideEnum): GetTradeHistoryReqBuilder; /** * Specify if the order is a \'limit\' order or \'market\' order. */ setType(value: GetTradeHistoryReq.TypeEnum): GetTradeHistoryReqBuilder; /** * The ID of the last set of data from the previous data batch. By default, the latest information is given. lastId is used to filter data and paginate. If lastId is not entered, the default is a maximum of 100 returned data items. The return results include lastId, which can be used as a query parameter to look up new data from the next page. */ setLastId(value: number): GetTradeHistoryReqBuilder; /** * Default20, Max100 */ setLimit(value: number): GetTradeHistoryReqBuilder; /** * Start time (milliseconds) */ setStartAt(value: number): GetTradeHistoryReqBuilder; /** * End time (milliseconds) */ setEndAt(value: number): GetTradeHistoryReqBuilder; /** * Get the final object. */ build(): GetTradeHistoryReq; }