Time-Sliced Order
timeSliceOrder
Input Parameters
| Parameter | Type | Description |
|---|---|---|
| account | Account | Account |
| start_date | string | Condition monitoring start time |
| end_date | string | Condition monitoring end time |
| stop_sign | StopSign | Condition stop condition : Full Until fully filled、PartialUntil partially filled、UntilEndUntil expiry |
| splitDescription | SplitDescription | Trigger condition |
| ConditionOrder Object | ConditionOrder Object | Order Details |
Result
| Parameter | Type | Description |
|---|---|---|
| isSuccess | bool | Whether successful |
| data | Object | Conditional order response information |
| message | string ? (optional) | When isSuccess = false Returns an error message |
Order Information ConditionOrderResult Fields
Return type : Object
| Parameter | Type | Description |
|---|---|---|
| guid | string | Conditional Order ID |
Request Example
// Define the condition
const split = {
method: TimeSliceOrderType.Type1,
interval: 300,
singleQuantity: 1000,
totalQuantity: 10000,
startTime: '083000',
};
const order = {
buySell: BSAction.Buy,
symbol: "2881",
price: "66",
quantity: 2000,
marketType: ConditionMarketType.Common,
priceType: ConditionPriceType.Limit,
timeInForce: TimeInForce.ROD,
orderType: ConditionOrderType.Stock
};
sdk.stock.timeSliceOrder(target_account, "20240427","20240516", StopSign.Full, split, order)
Response Example
{
isSuccess: true,
data : {
guid : "24080500000002"
}
}