Get Batch Order Detail
batch_order_detail
Input Parameters
| Parameter | Type | Description |
|---|---|---|
| account | Account | Account Object |
| BatchOrderList | BatchResult | Batch Order List |
Return Result
| Parameter | Type | Description |
|---|---|---|
| isSuccess | bool | Is Success |
| data | List | Returns Order Information |
| message | string | Returns Error Message when isSuccess = False |
Order Information OrderResult Fields
Return type: Object
| Parameter | Type | Description |
|---|---|---|
| function_type | int | Function Type: 0 New Order, 10 Exec New, 15 Mod Price, 20 Mod Qty, 30 Cancel, 90 Failed |
| date | string | Trade Date |
| seq_no | string | Sequence Number |
| branch_no | string | Branch Code |
| account | string | Account |
| order_no | string | Order Number |
| asset_type | int | Asset Type: 0 Stock |
| market | string | Market: TAIEX (Listed), TAISDAQ (OTC), TAIEMG (Emerging) |
| market_type | MarketType | Market Type: COMMON (Round Lot), FIXING, INTRADAY_ODD, ODD (Post-market Odd), EMG, EMG_ODD |
| stock_no | string | Stock Symbol |
| buy_sell | BSAction | Side: BUY, SELL |
| pric_type | PriceType | Price Type: LIMIT, LIMIT_UP, LIMIT_DOWN, MARKET, REFERENCE |
| price | double | Price |
| quantity | int | Original Order Quantity |
| time_in_force | TimeInForce | Time In Force: ROD, FOK, IOC |
| order_type | OrderType | Order Type: STOCK (Cash), MARGIN, SHORT, DAY_TRADE, SBL |
| is_pre_order | bool | Is Pre-order |
| status | int | Order Status: 0 Pre-order, 4 Sending, 9 Timeout, 10 Success, 30 Cancelled, 40 Partial Fill/Cancel Remainder, 50 Full Fill, 90 Failed |
| after_price_type | PriceType | Effective Price Type |
| after_price | double | Effective Price |
| unit | int | Unit Size |
| after_qty | int | Effective Quantity (Includes filled portion) |
| filled_qty | int | Filled Quantity |
| filled_money | int | Filled Amount |
| before_qty | int | Quantity Before Modification |
| before_price | double | Price Before Modification |
| user_def | string | User Defined Field |
| last_time | string | Last Modified Time |
| details | list | Order History (Available in order_result_detail or order_history) |
| error_message | string | Error Message |
caution
This function is only for querying the execution results of batch orders. To get the latest status of an order, please use the single order query function.
Request Example
auto batch_list = sdk->stock->batch_order_lists(target_account);
auto batch_res = batch_list.data.value()[0];
auto batch_list_res = sdk->stock->batch_order_detail(target_account, batch_res);
if (!batch_list_res.is_success) {
std::cout << "get order result failed reason: "
<< (batch_list_res.message.has_value() ? batch_list_res.message.value() : "No message")
<< std::endl;
}
else {
if (batch_list_res.data.has_value()) {
std::cout << batch_list_res << std::endl;
}
else {
std::cout << "Order result success but no data returned." << std::endl;
}
}
ReturnExample
{
isSuccess = true,
message = ,
data = [ OrderResult{
functionType = , // Function Type (int)
date = 2023/10/18, // Trade Date (date)
seqNo = 00000000007, // Sequence Number (string)
branchNo = 6460, // Branch Code (string)
account = 26, // Account (string)
orderNo = bA683, // Order Number (string)
assetType = 0, // Asset Type (int)
market = TAIEX, // Market (string)
marketType = Common, // Market Type (MarketType)
stockNo = 2888, // Stock Symbol (string)
buySell = Buy, // Side (BsAction)
priceType = Limit, // Original Price Type (PriceType)
price = 8.9, // Price (double)
quantity = 2000, // Original Quantity (int)
timeInForce = Rod, // Time In Force (TimeInForce)
orderType = Stock, // Order Type (OrderType)
isPreOrder = False, // Is Pre-order (bool)
status = 10, // Order Status (int)
afterPriceType = Limit, // Effective Price Type (PriceType)
afterPrice = 8.9, // Effective Price (double)
unit = 1000, // Unit Size (int)
afterQty = 2000, // Effective Quantity (int)
filledQty = 0, // Filled Quantity (int)
filledMoney = 0, // Filled Amount (int)
beforeQty = 0, // Quantity Before Mod (int)
beforePrice = 8.9, // Price Before Mod (double)
userDef = , // User Defined Field (string)
lastTime = 14:41:32.647, // Last Modified Time (string)
details = , // Order History (list)
errorMsg = // Error Message (string)
},
...
]
}