kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
166 lines (165 loc) • 5.19 kB
TypeScript
import { Serializable } from '../../../internal/interfaces/serializable';
export declare class GetClosedOrdersReq implements Serializable {
/**
* symbol
*/
symbol?: string;
/**
* Transaction type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin trade
*/
tradeType?: GetClosedOrdersReq.TradeTypeEnum;
/**
* Specify if the order is to \'buy\' or \'sell\'.
*/
side?: GetClosedOrdersReq.SideEnum;
/**
* Specify if the order is a \'limit\' order or \'market\' order.
*/
type?: GetClosedOrdersReq.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 `GetClosedOrdersReq` class.
* The builder pattern allows step-by-step construction of a `GetClosedOrdersReq` object.
*/
static builder(): GetClosedOrdersReqBuilder;
/**
* Creates a new instance of the `GetClosedOrdersReq` class with the given data.
*/
static create(data: {
/**
* symbol
*/
symbol?: string;
/**
* Transaction type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin trade
*/
tradeType?: GetClosedOrdersReq.TradeTypeEnum;
/**
* Specify if the order is to \'buy\' or \'sell\'.
*/
side?: GetClosedOrdersReq.SideEnum;
/**
* Specify if the order is a \'limit\' order or \'market\' order.
*/
type?: GetClosedOrdersReq.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;
}): GetClosedOrdersReq;
/**
* Convert the object to a JSON string.
*/
toJson(): string;
/**
* Create an object from a JSON string.
*/
static fromJson(input: string): GetClosedOrdersReq;
/**
* Create an object from Js Object.
*/
static fromObject(jsonObject: Object): GetClosedOrdersReq;
}
export declare namespace GetClosedOrdersReq {
enum TradeTypeEnum {
/**
*
*/
MARGIN_TRADE,
/**
*
*/
MARGIN_ISOLATED_TRADE
}
enum SideEnum {
/**
*
*/
BUY,
/**
*
*/
SELL
}
enum TypeEnum {
/**
*
*/
LIMIT,
/**
*
*/
MARKET
}
}
export declare class GetClosedOrdersReqBuilder {
readonly obj: GetClosedOrdersReq;
constructor(obj: GetClosedOrdersReq);
/**
* symbol
*/
setSymbol(value: string): GetClosedOrdersReqBuilder;
/**
* Transaction type: MARGIN_TRADE - cross margin trade, MARGIN_ISOLATED_TRADE - isolated margin trade
*/
setTradeType(value: GetClosedOrdersReq.TradeTypeEnum): GetClosedOrdersReqBuilder;
/**
* Specify if the order is to \'buy\' or \'sell\'.
*/
setSide(value: GetClosedOrdersReq.SideEnum): GetClosedOrdersReqBuilder;
/**
* Specify if the order is a \'limit\' order or \'market\' order.
*/
setType(value: GetClosedOrdersReq.TypeEnum): GetClosedOrdersReqBuilder;
/**
* 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): GetClosedOrdersReqBuilder;
/**
* Default20, Max100
*/
setLimit(value: number): GetClosedOrdersReqBuilder;
/**
* Start time (milliseconds)
*/
setStartAt(value: number): GetClosedOrdersReqBuilder;
/**
* End time (milliseconds)
*/
setEndAt(value: number): GetClosedOrdersReqBuilder;
/**
* Get the final object.
*/
build(): GetClosedOrdersReq;
}