Get Batch Order Detail
batchOrderDetail
Input Parameters
| Parameter | Type | Meaning |
|---|---|---|
| account | Account | Account |
| BatchOrderList | BatchResult | Batch order list |
Result
| Parameter | Type | Meaning |
|---|---|---|
| isSuccess | bool | Whether successful |
| data | Object | OrderResult list is returned |
| message | string ? (optional) | Error message returned when isSuccess = false |
OrderResult Parameter
Return type : Object
| Parameter | Type | Meaning |
|---|---|---|
| functionType | number ? (Optional) | Function Type : 0 New Order, 10 New Order Executed, 15 Change Price, 20 Change Quantity, 30 Cancel, 90 Failed |
| date | string | Transaction date |
| seqNo | string | Order serial number |
| branchNo | string | Branch number |
| account | string | Account |
| orderNo | string | Order number |
| assetType | number | Asset type : 0 Stock |
| market | string | Market type : TAIEX Listed, TAISDAQ OTC, TAIEMG EMG |
| marketType | MarketType | Trading session type : Common, Fixing, IntradayOdd, Odd, Emg, EmgOdd |
| stockNo | string | Symbol |
| buySell | BSAction | Buy/Sell Type : Buy, Sell |
| priceType | PriceType | Original order price type : Limit, LimitUp, LimitDown, Market, Reference |
| price | number | Order Price |
| quantity | number | Original order quantity |
| timeInForce | TimeInForce | Time In Force ROD, FOK, IOC |
| orderType | OrderType | Order Type : Stock, Margin, Short Short sale, DayTrade, SBL |
| isPreOrder | bool | Reservation Flag |
| status | number | Order status, for details please refer to STATUS |
| afterPriceType | PriceType | Valid order price type : Limit, LimitUp, LimitDown, Market, Reference |
| afterPrice | number | Valid order price |
| unit | number | Trading Unit |
| afterQty | number | Valid Order Quantity (filled quantity included) |
| filledQty | number | Filled Quantity |
| filledMoney | number | Filled Value |
| beforeQty | number | Before the Quantity Modification |
| beforePrice | number | Before the Price Modification |
| user_def | string | Custom Fields |
| lastTime | string | Last Modification Time |
| details | list | Order Process (Return value when query orderResultDetail or orderHistory ) |
| errorMessage | string | Error Message |
caution
This function is only for querying the execution results of batch orders. To obtain the latest status of an order, please use the single order inquiry function.
Request Example
const batch_order_list = sdk.stock.batchOrderLists(account)
sdk.stock.batchOrderDetail(account, batch_order_list.data[0])
Response Example
{
isSuccess: true,
data: [
{
date: '2023/10/23',
seqNo: '00000000023',
branchNo: '6460',
account: '26',
assetType: 0,
market: 'TAIEX',
marketType: Common,
stockNo: '1101',
buySell: Buy,
priceType: Limit,
price: 35,
quantity: 1000,
timeInForce: ROD,
orderType: Stock,
isPreOrder: false,
status: 90,
afterPriceType: Limit,
afterPrice: 35,
unit: 1000,
afterQty: 0,
filledQty: 0,
filledMoney: 0,
beforeQty: 0,
beforePrice: 35,
userDef: 'batch 1',
lastTime: '16:24:28.732'
},
...
]
}