Skip to main content

Get Order Results (With Details)

getOrderResultsDetail

Input Parameters

ParameterTypeMeaning
accountAccountAccount

Result

ParameterTypeMeaning
isSuccessboolWhether successful
dataObjectOrderResult list is returned
messagestring ? (optional)Error message returned when isSuccess = false

OrderResult Parameter

Return type : Object

ParameterTypeMeaning
functionTypenumber ? (Optional)Function Type : 0 New Order, 10 New Order Executed, 15 Change Price, 20 Change Quantity, 30 Cancel, 90 Failed
datestringTransaction date
seqNostringOrder serial number
branchNostringBranch number
accountstringAccount
orderNostringOrder number
assetTypenumberAsset type : 0 Stock
marketstringMarket type : TAIEX Listed, TAISDAQ OTC, TAIEMG EMG
marketTypejs:string / ts:MarketTypeTrading session type : Common, Fixing, IntradayOdd, Odd, Emg, EmgOdd
stockNostringSymbol
buySelljs:string / ts:BSActionBuy/Sell Type : Buy, Sell
priceTypejs:string / ts:PriceTypeOriginal order price type : Limit, LimitUp, LimitDown, Market, Reference
pricenumberOrder Price
quantitynumberOriginal order quantity
timeInForcejs:string / ts:TimeInForceTime In Force ROD, FOK, IOC
orderTypejs:string / ts:OrderTypeOrder Type : Stock, Margin, Short Short sale, DayTrade, SBL
isPreOrderboolReservation Flag
statusnumberOrder status, for details please refer to STATUS
afterPriceTypePriceTypeValid order price type : Limit, LimitUp, LimitDown, Market, Reference
afterPricenumberValid order price
unitnumberTrading Unit
afterQtynumberValid Order Quantity (filled quantity included)
filledQtynumberFilled Quantity
filledMoneynumberFilled Value
beforeQtynumberBefore the Quantity Modification
beforePricenumberBefore the Price Modification
useDefstringCustom Fields
lastTimestringLast Modification Time
errorMessagestringError Message
detailslistOrder Process
>> functionTypenumberFunction Type : 0 New Order, 10 New Order Executed, 15 Change Price, 20 Change Quantity, 30 Cancel, 50 Fully Filled, 90 Failed
>> modifiedTimestringOrder Modified Time
>> beforeQtynumberOriginal Order Quantity
>> afterQtynumberValid Order Quantity (filled quantity included)
>> beforePricenumberOriginal Order Price
>> afterPricenumberValid Order Price
>> filledMoneynumberFilled Value
>> statusintOrder Status
>> errMsgstringError Message

Request Example

var account = accounts.data[0];
const orders = sdk.stock.getOrderResultsDetail(account);
console.log(orders);

Response Example

{
isSuccess: true,
data:[
{
date: '2023/10/24',
seqNo: '00005000001',
branchNo: '6460',
account: '26',
orderNo: 'bA719',
assetType: 0,
market: 'TAIEX',
marketType: Common,
stockNo: '2888',
buySell: Buy,
priceType: Limit,
price: 9,
quantity: 2000,
timeInForce: ROD,
orderType: Stock,
isPreOrder: false,
status: 10,
afterPrice: 9,
unit: 1000,
afterQty: 2000,
filledQty: 0,
filledMoney: 0,
userDef: 'fromJs',
lastTime: '10:26:22.140',
details:[
functionType: 10,
modifiedTime: '10:26:22.140',
beforeQty: 0,
afterQty: 2000,
beforePrice: 9,
afterPrice: 9
]
},
{
date: '2023/10/24',
seqNo: '00005000002',
branchNo: '6460',
account: '26',
....
unit: 1000,
afterQty: 2000,
filledQty: 0,
filledMoney: 0,
userDef: 'fromJs',
lastTime: '10:26:25.140'
},
...
]
}