Skip to main content

Conditional Order Query

getConditionOrder

Input Parameters

ParameterTypeDescription
accountAccountAccount
conditionStatusConditionStatus (Optional)Conditional order status

Result

ParameterTypeDescription
isSuccessboolWhether successful
dataListConditional order response information
messagestring ? (optional)When isSuccess : false Returns an error message

Order Information ConditionDetail Fields

Return type : Object

ParameterTypeDescription
guidstringConditional Order ID
batchNostringSplit-order batch number
orderLevelstringConditional order level
lastTimestringUpdate time
parentGuidstringParent order ID
symbolstringSymbol
orderAmountstringOrder amount
childBatchNostringChild split-order batch number
accountstringAccount
conditionContentstringCondition content
actionstringAction
conditionBuySellstringSide
conditionSymbolstringInstrument name
conditionPricestringPrice
conditionVolumestringOrder quantity
conditionFilledVolumestringFilled quantity
createTimestringCreation time
startDatestringScheduled start time
statusstringCurrent status
errorMessagestringCurrent statusErrorDescription
detailRecordsCountstringQueryDetail record count
detailRecordsListQueryDetail records
>> guidstringConditional Order ID
>> accountstringAccount
>> conditionContentstringCondition content
>> actionstringAction
>> conditionBuySellstringSide
>> conditionSymbolstringInstrument name
>> conditionPricestringPrice
>> conditionVolumestringOrder quantity
>> conditionFilledVolumestringFilled quantity
>> startDatestringScheduled time
>> statusstringCurrent status
>> errorMessagestringCurrent statusErrorDescription
tpslCountstringTake-Profit/Stop-Lossrecord count
tpslRecordListTake-Profit/Stop-LossDetail records
>> guidstringConditional Order ID
>> accountstringAccount
>> conditionContentstringCondition content
>> actionstringAction
>> conditionBuySellstringSide
>> conditionSymbolstringInstrument name
>> conditionPricestringPrice
>> conditionVolumestringOrder quantity
>> conditionFilledVolumestringFilled quantity
>> startDatestringScheduled time
>> statusstringCurrent status
>> errorMessagestringCurrent statusErrorDescription

Request Example

sdk.stock.getConditionOrder(account)

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",
detailRecords : [],
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)",
errorMessage :
},
{
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)",
errorMessage :
}
]
}
]
}