Time-sharing component condition list
time_slice_order
Input parameters
| Parameters | Category | Description |
|---|---|---|
| account | Account | account |
| start_date | string | Conditional start monitoring time |
| end_date | string | Condition end monitoring time |
| stop_sign | StopSign | Conditional stop conditions: Full until all transactions are completed, Partial until partial transactions are completed, UntilEnd until the end of the validity period |
| splitDescription | SplitDescription | Split order conditions |
| ConditionOrder Object | ConditionOrder Object | Order details |
Result return
| Parameters | Category | Description |
|---|---|---|
| is_success | bool | Whether it was successful |
| data | Object | Conditional order return information |
| message | string ? (optional) | Return error message when isSuccess = false |
Order information ConditionOrderResult field
Return type : Object
| Parameters | Category | Description |
|---|---|---|
| batchId | string | time-sharing component condition order number |
Request example
//Design condition content
SplitDescription split = SplitDescription{
TimeSliceOrderType::TYPE1,
30,
1000,
10000,
"083000",
std::nullopt
};
ConditionOrder sliceorder = ConditionOrder{
BsAction::BUY,
"2330",
"1000",
1000,
ConditionMarketType::COMMON,
ConditionPriceType::LIMIT,
TimeInForce::ROD,
ConditionOrderType::STOCK,
};
auto timeslice = sdk->stock->time_slice_order(target_account, "20250605","20250605", StopSign::FULL, split, sliceorder);
if (!timeslice.is_success) {
std::cout << "send timeslice result failed reason: "
<< (timeslice.message.has_value() ? timeslice.message.value() : "No message")
<< std::endl;
}
else {
if (timeslice.data.has_value()) {
const auto& send = timeslice.data.value();
std::cout << send << std::endl;
}
else {
std::cout << "send timeslice success but no data returned." << std::endl;
}
}
Return example
{
isSuccess = true,
message = ,
data = ConditionOrderResult {
guid = 24080500000002,
}
}