UNPKG

kucoin-universal-sdk

Version:
156 lines (155 loc) 5.02 kB
import { Serializable } from '../../../internal/interfaces/serializable'; export declare class GetTradeHistoryReq implements Serializable { /** * symbol */ symbol?: string; /** * 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 an \'limit\' order or \'market\' order. */ type?: GetTradeHistoryReq.TypeEnum; /** * The id of the last set of data from the previous batch of data. 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 (milisecond) */ startAt?: number; /** * End time (milisecond) */ 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; /** * 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 an \'limit\' order or \'market\' order. */ type?: GetTradeHistoryReq.TypeEnum; /** * The id of the last set of data from the previous batch of data. 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 (milisecond) */ startAt?: number; /** * End time (milisecond) */ 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 SideEnum { /** * */ BUY, /** * */ SELL } enum TypeEnum { /** * */ LIMIT, /** * */ MARKET } } export declare class GetTradeHistoryReqBuilder { readonly obj: GetTradeHistoryReq; constructor(obj: GetTradeHistoryReq); /** * symbol */ setSymbol(value: string): 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 an \'limit\' order or \'market\' order. */ setType(value: GetTradeHistoryReq.TypeEnum): GetTradeHistoryReqBuilder; /** * The id of the last set of data from the previous batch of data. 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 (milisecond) */ setStartAt(value: number): GetTradeHistoryReqBuilder; /** * End time (milisecond) */ setEndAt(value: number): GetTradeHistoryReqBuilder; /** * Get the final object. */ build(): GetTradeHistoryReq; }