Historical Conditional Order Query
getConditionHistory
Input Parameters
| Parameter | Type | Description |
|---|---|---|
| account | Account | Account |
| start_date | string | Query start date |
| end_date | string | QueryEnd date |
| condition_history_status | History Status (Optional) | Historical conditional order status |
info
Historical data dates are based on the conditional order creation date
Result
| Parameter | Type | Description |
|---|---|---|
| isSuccess | bool | Whether successful |
| data | list | Conditional order response information |
| message | string ? (optional) | When isSuccess : false Returns an error message |
Order Information ConditionDetail Fields
Return type : Object
| Parameter | Type | Description |
|---|---|---|
| guid | string | Conditional Order ID |
| batchNo | string | Split-order batch number |
| orderLevel | string | Conditional order level |
| lastTime | string | Update time |
| parentGuid | string | Parent order ID |
| symbol | string | Symbol |
| orderAmount | string | Order amount |
| childBatchNo | string | Child split-order batch number |
| account | string | Account |
| conditionContent | string | Condition content |
| action | string | Action |
| conditionBuySell | string | Side |
| conditionSymbol | string | Instrument name |
| conditionPrice | string | Price |
| conditionVolume | string | Order quantity |
| conditionFilledVolume | string | Filled quantity |
| createTime | string | Creation time |
| startDate | string | Scheduled start time |
| status | string | Current status |
| errorMessage | string | Current statusErrorDescription |
| detailRecordsCount | string | QueryDetail record count |
| detailRecords | List | QueryDetail records |
| >> guid | string | Conditional Order ID |
| >> account | string | Account |
| >> conditionContent | string | Condition content |
| >> action | string | Action |
| >> conditionBuySell | string | Side |
| >> conditionSymbol | string | Instrument name |
| >> conditionPrice | string | Price |
| >> conditionVolume | string | Order quantity |
| >> conditionFilledVolume | string | Filled quantity |
| >> startDate | string | Scheduled time |
| >> status | string | Current status |
| >> errorMessage | string | Current statusErrorDescription |
| tpslCount | string | Take-Profit/Stop-Lossrecord count |
| tpslRecord | List | Take-Profit/Stop-LossDetail records |
| >> guid | string | Conditional Order ID |
| >> account | string | Account |
| >> conditionContent | string | Condition content |
| >> action | string | Action |
| >> conditionBuySell | string | Side |
| >> conditionSymbol | string | Instrument name |
| >> conditionPrice | string | Price |
| >> conditionVolume | string | Order quantity |
| >> conditionFilledVolume | string | Filled quantity |
| >> startDate | string | Scheduled time |
| >> status | string | Current status |
| >> errorMessage | string | Current statusErrorDescription |
Request Example
sdk.stock.getConditionHistory(account,"20240301","20240601")
Response Example
{
isSuccess: true,
data :[
{
guid : "8ff3472b-185a-488c-be5a-b478deda080c",
batchNo : "",
orderLevel : "1",
lastTime : "2024-03-14 12:39:02",
conditionType : "Multiple conditions",
parentGuid : "58e7a51e-9701-4d26-bc16-18a392a840bd",
symbol : "2330",
orderAmount : "0",
childBatchNo : "",
account : "1307515",
conditionContent : "From2024/03/14to2024/07/04withinTSMCMatched priceGreater than or equal to580TWD Until fully filled",
action : "Place order (next-day offset)",
conditionBuySell : "Cash equitySell",
conditionSymbol : "TSMC Cash equitySell",
conditionPrice : "580TWD(ROD)",
conditionVolume : "5lots",
conditionFilledVolume : "0lots",
createTime : "2024-03-14 12:39:22",
startDate : "2024/03/14",
status : "Inactive(W)",
detailRecordsCount : "0",
tPSLCount : "0"
},
{
guid : "ec757279-bcb3-46f4-80ac-fccfc786bc8d",
batchNo : ,
orderLevel : "0",
lastTime : "2024-05-21 10:30:00",
conditionType : "Multiple conditions",
parentGuid : "ec757279-bcb3-46f4-80ac-fccfc786bc8d",
symbol : "2330",
orderAmount : "0",
childBatchNo : ,
account : "1307515",
conditionContent : "From2024/03/14to2024/07/04withinTSMCMatched priceGreater than or equal to575TWD,and TSMCfilledTotal quantityGreater than or equal to1001lots,and TSMCTimeGreater than or equal to10:30:00 Until partially filled",
action : "Place order (day trade)",
conditionBuySell : "Cash equityBuy",
conditionSymbol : "TSMC Cash equityBuy",
conditionPrice :" 576TWD(ROD)",
conditionVolume : "5lots",
conditionFilledVolume : "0lots",
createTime : "2024-03-14 12:30:02",
startDate : "2024/03/14",
status : "Triggered - Order failed(X)",
errorMessage : "Invalid unit price[4385715]",
detailRecordsCount : "0",
tPSLCount : "2",
tPSLRecord : [
{
guid : "c94b552a-22da-43e4-be44-f27a9c2026e1",
account : "1307515",
conditionContent : "From2024/03/14to2024/07/04withinTSMCMatched priceGreater than or equal to580TWD Until fully filled",
action : "Place order (next-day offset)",
conditionBuySell : "Cash equitySell",
conditionSymbol : "TSMC Cash equitySell",
conditionPrice : "580TWD(ROD)",
conditionVolume : "5lots",
conditionFilledVolume : "0lots",
startDate : "2024/03/14",
status : "Inactive(W)",
},
{
guid : "c94b552a-22da-43e4-be44-f27a9c2026e1",
account : "1307515",
conditionContent : "From2024/03/14to2024/07/04withinTSMCMatched priceLess than or equal to570TWD Until fully filled",
action : "Place order (next-day offset)",
conditionBuySell : "Cash equitySell",
conditionSymbol : "TSMC Cash equitySell",
conditionPrice : "Market price(ROD)",
conditionVolume : "5lots",
conditionFilledVolume : "0lots",
startDate : "2024/03/14",
status : "Inactive(W)",
}
]
}
]
}