Get Day Trade Condition Order
get_condition_daytrade_by_id
Input Parameters
| Parameter | Type | Description |
|---|---|---|
| account | Account | Account |
| guid | string | Condition Order GUID |
Result Return
| Parameter | Type | Description |
|---|---|---|
| is_success | bool | Is Success |
| data | List | Condition Order Return Info |
| message | string ? (optional) | Error message when isSuccess = false |
Order Info ConditionDetail Fields
Return type : Object
| Parameter | Type | Description |
|---|---|---|
| guid | string | Condition Order GUID |
| batch_no | string | Batch No |
| order_level | string | Order Level |
| last_time | string | Last Update Time |
| parent_guid | string | Parent Order GUID |
| symbol | string | Stock Symbol |
| order_amount | string | Order Amount |
| child_batch_no | string | Child Batch No |
| account | string | Account |
| condition_content | string | Condition Content |
| action | string | Action |
| condition_buy_sell | string | Condition Buy/Sell |
| condition_symbol | string | Condition Symbol |
| condition_price | string | Price |
| condition_volume | string | Order Volume |
| condition_filled_volume | string | Filled Volume |
| create_time | string | Create Time |
| start_date | string | Scheduled Start Time |
| status | string | Current Status |
| error_message | string | Error Message |
| detail_records_count | string | Detail Records Count |
| detail_records | List | Detail Records Data |
| >> guid | string | Condition Order GUID |
| >> account | string | Account |
| >> condition_content | string | Condition Content |
| >> action | string | Action |
| >> condition_buy_sell | string | Condition Buy/Sell |
| >> condition_symbol | string | Condition Symbol |
| >> condition_price | string | Price |
| >> condition_volume | string | Order Volume |
| >> condition_filled_volume | string | Filled Volume |
| >> start_date | string | Scheduled Start Time |
| >> status | string | Current Status |
| >> error_message | string | Error Message |
| tpsl_count | string | TPSL Count |
| tpsl_record | List | TPSL Detail Records Data |
| >> guid | string | Condition Order GUID |
| >> account | string | Account |
| >> condition_content | string | Condition Content |
| >> action | string | Action |
| >> condition_buy_sell | string | Condition Buy/Sell |
| >> condition_symbol | string | Condition Symbol |
| >> condition_price | string | Price |
| >> condition_volume | string | Order Volume |
| >> condition_filled_volume | string | Filled Volume |
| >> start_date | string | Scheduled Start Time |
| >> status | string | Current Status |
| >> error_message | string | Error Message |
Request Example
auto get_daytrade_conditionid = sdk->stock->get_condition_daytrade_by_id(target_account, "564b7ad6-a332-470c-93ea-cf3fea00d7fa");
if (!get_daytrade_conditionid.is_success) {
std::cout << "get condition result failed reason: "
<< (get_daytrade_conditionid.message.has_value() ? get_daytrade_conditionid.message.value() : "No message")
<< std::endl;
}
else {
if (get_daytrade_conditionid.data.has_value()) {
for (const auto& result : get_daytrade_conditionid.data.value()) {
std::cout << result << std::endl;
}
}
else {
std::cout << "Condition result success but no data returned." << std::endl;
}
}
Return Example
{
isSuccess = true,
message = ,
data =
ConditionDetail {
guid = 8ff3472b-185a-488c-be5a-b478deda080c,
batchNo = ,
orderLevel = 1,
lastTime = 2024-03-14 12:39:02,
conditionType = Multi-Condition,
parentGuid = 58e7a51e-9701-4d26-bc16-18a392a840bd,
symbol = 2330,
orderAmount = 0,
childBatchNo = ,
account = 1307515,
conditionContent = When TSMC price >= 580 from 2024/03/14 to 2024/07/04, until full execution,
action = Order (Next Day Cover),
conditionBuySell = Stock Sell,
conditionSymbol = TSMC Stock Sell,
conditionPrice = 580(ROD),
conditionVolume = 5 lots,
conditionFilledVolume = 0 lots,
createTime = 2024-03-14 12:39:22,
startDate = 2024/03/14,
status = Pending(W),
errorMessage = null,
detailRecordsCount = 0,
detailRecords = ,
tPSLCount = 0,
tPSLRecord =
}
}