Skip to main content

Conditional Order Query

get_condition_order

Input Parameters

ParameterTypeDescription
accountAccountAccount
condition_statusConditionStatus (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
batch_nostringSplit-order batch number
order_levelstringConditional order level
last_timestringUpdate time
parent_guidstringParent order ID
symbolstringSymbol
order_amountstringOrder amount
child_batch_nostringChild split-order batch number
accountstringAccount
condition_contentstringCondition content
actionstringAction
condition_buy_sellstringSide
condition_symbolstringInstrument name
condition_pricestringPrice
condition_volumestringOrder quantity
condition_filled_volumestringFilled quantity
creat_timestringCreation time
start_datestringScheduled start time
statusstringCurrent status
error_messagestringCurrent statusErrorDescription
detail_records_countstringDetail record count
detail_recordsListDetail records
>> guidstringConditional Order ID
>> accountstringAccount
>> condition_contentstringCondition content
>> actionstringAction
>> condition_buy_sellstringSide
>> condition_symbolstringInstrument name
>> condition_pricestringPrice
>> condition_volumestringOrder quantity
>> condition_filled_volumestringFilled quantity
>> start_datestringScheduled time
>> statusstringCurrent status
>> error_messagestringCurrent statusErrorDescription
tpslCountstringTake-Profit/Stop-Lossrecord count
tpslRecordListTake-Profit/Stop-LossDetail records
>> guidstringConditional Order ID
>> accountstringAccount
>> condition_contentstringCondition content
>> actionstringAction
>> condition_buy_sellstringSide
>> condition_symbolstringInstrument name
>> condition_pricestringPrice
>> condition_volumestringOrder quantity
>> condition_filled_volumestringFilled quantity
>> start_datestringScheduled time
>> statusstringCurrent status
>> error_messagestringCurrent statusErrorDescription

Request Example

sdk.stock.get_condition_order(account)

Response Example


Result {
is_success: True,
message: None,
data : [
ConditionDetail {
guid: "8ff3472b-185a-488c-be5a-b478deda080c",
batch_no: "",
order_level: "1",
last_time: "2024-03-14 12:39:02",
condition_type: "Multiple conditions",
parent_guid: "58e7a51e-9701-4d26-bc16-18a392a840bd",
symbol: "2330",
order_amount: "0",
child_batch_no: "",
account: "1307515",
condition_content: "From2024/03/14to2024/07/04withinTSMCMatched priceGreater than or equal to580TWD Until fully filled",
action: "Place order (next-day offset) ",
condition_buy_sell: "Cash equitySell",
condition_symbol: "TSMC Cash equitySell",
condition_price: "580TWD(ROD)",
condition_volume: "5lots",
condition_filled_volume: "0lots",
creat_time: "2024-03-14 12:39:22",
start_date: "2024/03/14",
status: "Inactive(W)",
error_message: None,
detail_records_count: "0",
detail_records: [],
tpslCount: "0",
tpslRecord: [],
},
ConditionDetail {
guid: "8ff3472b-185a-488c-be5a-b478deda080c",
batch_no: "",
order_level: "1",
last_time: "2024-03-14 12:39:02",
condition_type: "Multiple conditions",
parent_guid: "58e7a51e-9701-4d26-bc16-18a392a840bd",
symbol: "2330",
order_amount: "0",
child_batch_no: "",
account: "1307515",
condition_content: "From2024/03/14to2024/07/04withinTSMCMatched priceLess than or equal to570TWD Until fully filled",
action: "Place order (next-day offset) ",
condition_buy_sell: "Cash equitySell",
condition_symbol: "TSMC Cash equitySell",
condition_price: "Market price(ROD)",
condition_volume: "5lots",
condition_filled_volume: "0lots",
creat_time: "2024-03-14 12:39:22",
start_date: "2024/03/14",
status: "Inactive(W)",
error_message: None,
detail_records_count: "0",
detail_records: [],
tpslCount: "0",
tpslRecord: [],
},
ConditionDetail {
guid: "ec757279-bcb3-46f4-80ac-fccfc786bc8d",
batch_no: "",
order_level: "0",
last_time: "2024-05-21 10:30:00",
condition_type: "Multiple conditions",
parent_guid: "ec757279-bcb3-46f4-80ac-fccfc786bc8d",
symbol: "2330",
order_amount: "0",
child_batch_no: "",
account: "1307515",
condition_content: "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) ",
condition_buy_sell: "Cash equityBuy",
condition_symbol: "TSMC Cash equityBuy",
condition_price: "576TWD(ROD)",
condition_volume: "5lots",
condition_filled_volume: "0lots",
creat_time: "2024-03-14 12:30:02",
start_date: "2024/03/14",
status: "Triggered - Order failed(X)",
error_message: "Invalid unit price[4385715]",
detail_records_count: "0",
detail_records: [],
tpslCount: "2",
tpslRecord: [
ParentChildRecord {
guid: "c94b552a-22da-43e4-be44-f27a9c2026e1",
account: "1307515",
condition_content: "From2024/03/14to2024/07/04withinTSMCMatched priceGreater than or equal to580TWD Until fully filled",
action: "Place order (next-day offset) ",
condition_buy_sell: "Cash equitySell",
condition_symbol: "TSMC Cash equitySell",
condition_price: "580TWD(ROD)",
condition_volume: "5lots",
condition_filled_volume: "0lots",
start_date: "2024/03/14",
status: "Inactive(W)",
error_message: "",
},
ParentChildRecord {
guid: "c94b552a-22da-43e4-be44-f27a9c2026e1",
account: "1307515",
condition_content: "From2024/03/14to2024/07/04withinTSMCMatched priceLess than or equal to570TWD Until fully filled",
action: "Place order (next-day offset) ",
condition_buy_sell: "Cash equitySell",
condition_symbol: "TSMC Cash equitySell",
condition_price: "Market price(ROD)",
condition_volume: "5lots",
condition_filled_volume: "0lots",
start_date: "2024/03/14",
status: "Inactive(W)",
error_message: "",
},
],
}
]
}