分時分量查詢
get_time_slice_order
輸入參數
| 參數 | 類別 | 說明 |
|---|---|---|
| account | Account | 帳號 |
| batchNo | string | 分時分量條件單號 |
Result 回傳
| 參數 | 類別 | 說明 |
|---|---|---|
| is_success | bool | 是否成功 |
| data | List | 條件單回傳資訊 |
| message | string ? (optional) | 當isSuccess = false 回傳錯誤訊息 |
委託資訊 ConditionDetail 欄位
Return type : Object
| 參數 | 類別 | 說明 |
|---|---|---|
| guid | string | 條件單號 |
| batch_no | string | 分單批號 |
| order_level | string | 條件單層級 |
| last_time | string | 更新時間 |
| parent_guid | string | 父單單號 |
| symbol | string | 商品代號 |
| order_amount | string | 委託金額 |
| child_batch_no | string | 子單分單批號 |
| account | string | 帳號 |
| condition_content | string | 條件內容 |
| action | string | 處理方式 |
| condition_buy_sell | string | 買賣別 |
| condition_symbol | string | 商品名稱 |
| condition_price | string | 價格 |
| condition_volume | string | 委託數量 |
| condition_filled_volume | string | 成交數量 |
| create_time | string | 建立時間 |
| start_date | string | 預約開始時間 |
| status | string | 目前狀態 |
| error_message | string | 目前狀態異常說明 |
| detail_records_count | string | 查詢明細筆數 |
| detail_records | List | 查詢明細資料 |
| >> guid | string | 條件單號 |
| >> account | string | 帳號 |
| >> condition_content | string | 條件內容 |
| >> action | string | 處理方式 |
| >> condition_buy_sell | string | 買賣別 |
| >> condition_symbol | string | 商品名稱 |
| >> condition_price | string | 價格 |
| >> condition_volume | string | 委託數量 |
| >> condition_filled_volume | string | 成交數量 |
| >> start_date | string | 預約時間 |
| >> status | string | 目前狀態 |
| >> error_message | string | 目前狀態異常說明 |
| tpsl_count | string | 停損停利筆數 |
| tpsl_record | List | 停損停利明細資料 |
| >> guid | string | 條件單號 |
| >> account | string | 帳號 |
| >> condition_content | string | 條件內容 |
| >> action | string | 處理方式 |
| >> condition_buy_sell | string | 買賣別 |
| >> condition_symbol | string | 商品名稱 |
| >> condition_price | string | 價格 |
| >> condition_volume | string | 委託數量 |
| >> condition_filled_volume | string | 成交數量 |
| >> start_date | string | 預約時間 |
| >> status | string | 目前狀態 |
| >> error_message | string | 目前狀態異常說明 |
請求範例
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;
}
}
回傳範例
{
isSuccess = true,
message = ,
data = [
ConditionDetail{
Guid = c4dc90c1-4277-42ea-b585-085dc347eac0,
BatchNo = ,
OrderLevel = 0,
LastTime = 2024-07-23 17:30:01,
ConditionType = 分時分量,
ParentGuid = ,
Symbol = 2881,
OrderAmount = 0,
ChildBatchNo = ,
Account = 1307515,
ConditionContent = 當於2024/07/23 定時單時間大於等於08:40:00 全部成交為止,
Action = 下單,
ConditionBuySell = 現股買,
ConditionSymbol = 富邦金 現股買,
ConditionPrice = 66元(ROD),
ConditionVolume = 1張,
ConditionFilledVolume = 0張,
CreateTime = 2024-07-22 17:30:03,
StartDate = 2024/07/23,
Status = 條件單中止(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 = 分時分量,
ParentGuid = ,
Symbol = 2881,
OrderAmount = 0,
ChildBatchNo = ,
Account = 1307515,
ConditionContent = 當於2024/07/23 定時單時間大於等於09:10:00 全部成交為止,
Action = 下單,
ConditionBuySell = 現股買,
ConditionSymbol = 富邦金 現股買,
ConditionPrice = 66元(ROD),
ConditionVolume = 1張,
ConditionFilledVolume = 0張,
CreateTime = 2024-07-22 17:30:03,
StartDate = 2024/07/23,
Status = 條件單中止(I),
ErrorMessage = ,
DetailRecordsCount = 0,
DetailRecords = [],
TpslCount = 0,
TpslRecord = []
}
]
}