UNPKG

kucoin-universal-sdk

Version:
164 lines (163 loc) 5.93 kB
import { Serializable } from '../../../internal/interfaces/serializable'; export declare class AddOcoOrderReq implements Serializable { /** * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ clientOid: string; /** * specify if the order is to \'buy\' or \'sell\' */ side: AddOcoOrderReq.SideEnum; /** * symbol */ symbol: string; /** * Order placement remarks, length cannot exceed 20 characters (ASCII) */ remark?: string; /** * Specify price for order */ price: string; /** * Specify quantity for order */ size: string; /** * trigger price. */ stopPrice: string; /** * The limit order price after take-profit and stop-loss are triggered. */ limitPrice: string; /** * Transaction Type, currently only supports TRADE (spot transactions), the default is TRADE */ tradeType?: AddOcoOrderReq.TradeTypeEnum; /** * Private constructor, please use the corresponding static methods to construct the object. */ private constructor(); /** * Creates a new instance of the `AddOcoOrderReq` class. * The builder pattern allows step-by-step construction of a `AddOcoOrderReq` object. */ static builder(): AddOcoOrderReqBuilder; /** * Creates a new instance of the `AddOcoOrderReq` class with the given data. */ static create(data: { /** * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ clientOid: string; /** * specify if the order is to \'buy\' or \'sell\' */ side: AddOcoOrderReq.SideEnum; /** * symbol */ symbol: string; /** * Order placement remarks, length cannot exceed 20 characters (ASCII) */ remark?: string; /** * Specify price for order */ price: string; /** * Specify quantity for order */ size: string; /** * trigger price. */ stopPrice: string; /** * The limit order price after take-profit and stop-loss are triggered. */ limitPrice: string; /** * Transaction Type, currently only supports TRADE (spot transactions), the default is TRADE */ tradeType?: AddOcoOrderReq.TradeTypeEnum; }): AddOcoOrderReq; /** * Convert the object to a JSON string. */ toJson(): string; /** * Create an object from a JSON string. */ static fromJson(input: string): AddOcoOrderReq; /** * Create an object from Js Object. */ static fromObject(jsonObject: Object): AddOcoOrderReq; } export declare namespace AddOcoOrderReq { enum SideEnum { /** * */ BUY, /** * */ SELL } enum TradeTypeEnum { /** * Spot Trading */ TRADE } } export declare class AddOcoOrderReqBuilder { readonly obj: AddOcoOrderReq; constructor(obj: AddOcoOrderReq); /** * Client Order Id,The ClientOid field is a unique ID created by the user(we recommend using a UUID), and can only contain numbers, letters, underscores (_), and hyphens (-). This field is returned when order information is obtained. You can use clientOid to tag your orders. ClientOid is different from the order ID created by the service provider. Please do not initiate requests using the same clientOid. The maximum length for the ClientOid is 40 characters. Please remember the orderId created by the service provider, it used to check for updates in order status. */ setClientOid(value: string): AddOcoOrderReqBuilder; /** * specify if the order is to \'buy\' or \'sell\' */ setSide(value: AddOcoOrderReq.SideEnum): AddOcoOrderReqBuilder; /** * symbol */ setSymbol(value: string): AddOcoOrderReqBuilder; /** * Order placement remarks, length cannot exceed 20 characters (ASCII) */ setRemark(value: string): AddOcoOrderReqBuilder; /** * Specify price for order */ setPrice(value: string): AddOcoOrderReqBuilder; /** * Specify quantity for order */ setSize(value: string): AddOcoOrderReqBuilder; /** * trigger price. */ setStopPrice(value: string): AddOcoOrderReqBuilder; /** * The limit order price after take-profit and stop-loss are triggered. */ setLimitPrice(value: string): AddOcoOrderReqBuilder; /** * Transaction Type, currently only supports TRADE (spot transactions), the default is TRADE */ setTradeType(value: AddOcoOrderReq.TradeTypeEnum): AddOcoOrderReqBuilder; /** * Get the final object. */ build(): AddOcoOrderReq; }