Get Order Results
getOrderResults
Input Parameters
| Parameter | Type | Meaning |
|---|---|---|
| account | Account | Account |
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 | js:string / ts:MarketType | Trading session type : Common, Fixing, IntradayOdd, Odd, Emg, EmgOdd |
| stockNo | string | Symbol |
| buySell | js:string / ts:BSAction | Buy/Sell Type : Buy, Sell |
| priceType | js:string / ts:PriceType | Original order price type : Limit, LimitUp, LimitDown, Market, Reference |
| price | number | Order Price |
| quantity | number | Original order quantity |
| timeInForce | js:string / ts:TimeInForce | Time In Force ROD, FOK, IOC |
| orderType | js:string / ts: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 |
Request Example
var account = accounts.data[0];
const orders = sdk.stock.getOrderResults(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'
},
{
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'
},
...
]
}