Skip to main content

Mobile lock profit query

get_trail_order

Input parameters

ParametersCategoryDescription
accountAccountaccount

Result return

ParametersCategoryDescription
isSuccessboolWhether it was successful
dataListConditional order return information
messagestring ? (optional)Return error message when isSuccess = false

Commission information ConditionDetail field

Return type : Object

ParametersCategoryDescription
guidstringcondition order number
batch_nostringorder batch number
order_levelstringConditional single level
last_timestringupdate time
parent_guidstringParent tracking number
symbolstringproduct code
order_amountstringOrder amount
child_batch_nostringChild order batch number
accountstringaccount number
condition_contentstringcondition content
actionstringprocessing method
condition_buy_sellstringBuy and sell type
condition_symbolstringproduct name
condition_pricestringprice
condition_volumestringOrder quantity
condition_filled_volumestringTransaction quantity
create_timestringCreation time
start_datestringReservation start time
statusstringcurrent status
error_messagestringCurrent status exception description
detail_records_countstringQuery the number of detailed records
detail_recordsListQuery detailed information
>> guidstringcondition order number
>> accountstringaccount number
>> condition_contentstringcondition content
>> actionstringprocessing method
>> condition_buy_sellstringBuy and sell type
>> condition_symbolstringproduct name
>> condition_pricestringprice
>> condition_volumestringOrder quantity
>> condition_filled_volumestringTransaction quantity
>> start_datestringAppointment time
>> statusstringcurrent status
>> error_messagestringCurrent status exception description
tpsl_countstringThe number of stop loss and profit stops
tpsl_recordListStop loss and stop profit details
>> guidstringcondition order number
>> accountstringaccount number
>> condition_contentstringcondition content
>> actionstringprocessing method
>> condition_buy_sellstringBuy and sell type
>> condition_symbolstringproduct name
>> condition_pricestringprice
>> condition_volumestringOrder quantity
>> condition_filled_volumestringTransaction quantity
>> start_datestringAppointment time
>> statusstringcurrent status
>> error_messagestringCurrent status exception description

Request example

auto get_trail = sdk->stock->get_trail_order(target_account);

if (!get_trail.is_success) {
std::cout << "get order result failed reason: "
<< (get_trail.message.has_value() ? get_trail.message.value() : "No message")
<< std::endl;
}
else {
if (get_trail.data.has_value()) {
for (const auto& result : get_trail.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 = 5c154a76-e7ef-4b8f-94b5-80bf08fa4b8e,
BatchNo = ,
OrderLevel = 0,
LastTime = 2024-08-02 16:45:01,
ConditionType = ,
ParentGuid = ,
Symbol = 2889,
OrderAmount = 0,
ChildBatchNo = ,
Account = 1307515,
ConditionContent = from2024/08/02to2024/08/02withinwhennationalticketfinancialfrom1000(original基準price),down跌reaches10%,持續至預fixedlotscountallfilledorexpirytoreachesis止,
Action = downorders,
ConditionBuySell = currentstockBuy,
ConditionSymbol = nationalticketfinancial (2889),
ConditionPrice = filledprice(1) level(ROD),
ConditionVolume = 1lots,
ConditionFilledVolume = 0lots,
CreateTime = 2024-08-02 10:07:31,
StartDate = 2024/08/02,
Status = 條件orders中止(I),
ErrorMessage = null,
DetailRecordsCount = 0,
DetailRecords = [],
TpslCount = 0,
TpslRecord = []
},
ConditionDetail
{
Guid = c71117c8-aa70-4477-9f04-ff4c73a4fad0,
BatchNo = "",
OrderLevel = 0,
LastTime = 2024-07-29 17:30:00,
ConditionType = ,
ParentGuid = ,
Symbol = 2330,
OrderAmount = 0,
ChildBatchNo = "",
Account = 1307515,
ConditionContent = from2024/07/29to2024/07/29withinwhenTaiwanproductelectricfrom860(original基準price),up漲reaches5%,持續至預fixedlotscountallfilledorexpirytoreachesis止,
Action = downorders,
ConditionBuySell = currentstockBuy,
ConditionSymbol = Taiwanproductelectric (2330),
ConditionPrice = filledprice(5) level(ROD),
ConditionVolume = 2lots,
ConditionFilledVolume = 0lots,
CreateTime = 2024-07-29 11:01:49,
StartDate = 2024/07/29,
Status = 條件orders中止(I),
ErrorMessage = null,
DetailRecordsCount = 0,
DetailRecords = [],
TpslCount = 0,
TpslRecord = []
}
]
}