Time-sharing component query
get_time_slice_order
Input parameters
| Parameters | Category | Description |
|---|---|---|
| account | Account | account |
| batchNo | string | time-sharing component condition order number |
Result return
| Parameters | Category | Description |
|---|---|---|
| is_success | bool | Whether it was successful |
| data | List | Conditional order return information |
| message | string ? (optional) | Return error message when isSuccess = false |
Commission information ConditionDetail field
Return type : Object
| Parameters | Category | Description |
|---|---|---|
| guid | string | condition order number |
| batch_no | string | order batch number |
| order_level | string | Conditional single level |
| last_time | string | update time |
| parent_guid | string | Parent tracking number |
| symbol | string | product code |
| order_amount | string | Order amount |
| child_batch_no | string | Child order batch number |
| account | string | account number |
| condition_content | string | condition content |
| action | string | processing method |
| condition_buy_sell | string | Buy and sell type |
| condition_symbol | string | product name |
| condition_price | string | price |
| condition_volume | string | Order quantity |
| condition_filled_volume | string | Transaction quantity |
| create_time | string | Creation time |
| start_date | string | Reservation start time |
| status | string | current status |
| error_message | string | Current status exception description |
| detail_records_count | string | Query the number of detailed records |
| detail_records | List | Query detailed information |
| >> guid | string | condition order number |
| >> account | string | account number |
| >> condition_content | string | condition content |
| >> action | string | processing method |
| >> condition_buy_sell | string | Buy and sell type |
| >> condition_symbol | string | product name |
| >> condition_price | string | price |
| >> condition_volume | string | Order quantity |
| >> condition_filled_volume | string | Transaction quantity |
| >> start_date | string | Appointment time |
| >> status | string | current status |
| >> error_message | string | Current status exception description |
| tpsl_count | string | The number of stop loss and profit stops |
| tpsl_record | List | Stop loss and stop profit details |
| >> guid | string | condition order number |
| >> account | string | account number |
| >> condition_content | string | condition content |
| >> action | string | processing method |
| >> condition_buy_sell | string | Buy and sell type |
| >> condition_symbol | string | product name |
| >> condition_price | string | price |
| >> condition_volume | string | Order quantity |
| >> condition_filled_volume | string | Transaction quantity |
| >> start_date | string | Appointment time |
| >> status | string | current status |
| >> error_message | string | Current status exception description |
Request example
auto get_timeslice = sdk->stock->get_time_slice_order(target_account, "25060500000002");
if (!get_timeslice.is_success) {
std::cout << "get order result failed reason: "
<< (get_timeslice.message.has_value() ? get_timeslice.message.value() : "No message")
<< std::endl;
}
else {
if (get_timeslice.data.has_value()) {
for (const auto& result : get_timeslice.data.value()) {
std::cout << result << std::endl;
}
}
else {
std::cout << "Order result success but no data returned." << std::endl;
}
}
Return example
{
isSuccess = true,
message = ,
data = [
ConditionDetail{
Guid = c4dc90c1-4277-42ea-b585-085dc347eac0,
BatchNo = ,
OrderLevel = 0,
LastTime = 2024-07-23 17:30:01,
ConditionType = 分時分quantity,
ParentGuid = ,
Symbol = 2881,
OrderAmount = 0,
ChildBatchNo = ,
Account = 1307515,
ConditionContent = whenat2024/07/23 fixed時orders時間greateratequalat08:40:00 allfilledis止,
Action = downorders,
ConditionBuySell = currentstockBuy,
ConditionSymbol = FubonFinancialfinancial currentstockBuy,
ConditionPrice = 66元(ROD),
ConditionVolume = 1lots,
ConditionFilledVolume = 0lots,
CreateTime = 2024-07-22 17:30:03,
StartDate = 2024/07/23,
Status = 條件orders中止(I),
ErrorMessage = ,
DetailRecordsCount = 0,
DetailRecords = [],
TpslCount = 0,
TpslRecord = []
},
ConditionDetail
{
Guid = 2975702e-f36f-4da4-bab6-1310344ec05d,
BatchNo = ,
OrderLevel = 0,
LastTime = 2024-07-23 17:30:01,
ConditionType = 分時分quantity,
ParentGuid = ,
Symbol = 2881,
OrderAmount = 0,
ChildBatchNo = ,
Account = 1307515,
ConditionContent = whenat2024/07/23 fixed時orders時間greateratequalat09:10:00 allfilledis止,
Action = downorders,
ConditionBuySell = currentstockBuy,
ConditionSymbol = FubonFinancialfinancial currentstockBuy,
ConditionPrice = 66元(ROD),
ConditionVolume = 1lots,
ConditionFilledVolume = 0lots,
CreateTime = 2024-07-22 17:30:03,
StartDate = 2024/07/23,
Status = 條件orders中止(I),
ErrorMessage = ,
DetailRecordsCount = 0,
DetailRecords = [],
TpslCount = 0,
TpslRecord = []
}
]
}