Skip to main content

Single Condition

single_condition

Request Parameter

ParameterTypeMeaning
accountAccountAccount
start_datestringCondition Start Date
end_datestringCondition End Date
stop_signStopSignStop Condition : Full Until Fully filled、Partial Once Filled happened 、 UntilEnd Until Expiry
Condition ObjectConditionCondition Content
ConditionOrder ObjectConditionOrder ObjectConditionOrder Object

Result Response

ParameterTypeMeaning
isSuccessboolInterface result
dataObjectConditionOrderResult is returned
messagestring ? (optional)isSuccess = false error description is returned

ConditionOrderResult Parameter

Return type : Object

ParameterTypeMeaning
guidstringCondition Serial Number

Resquest Example

# Condition Content
condition = Condition(
market_type = TradingType.Reference,
symbol = "2881",
trigger = TriggerContent.MatchedPrice,
trigger_value = "80",
comparison = Operator.LessThan
)

order = ConditionOrder(
buy_sell= BSAction.Sell,
symbol = "2881",
quantity = 1000,
price = "60",
market_type = ConditionMarketType.Common,
price_type = ConditionPriceType.Limit,
time_in_force = TimeInForce.ROD,
order_type = ConditionOrderType.Stock
)

res = sdk.stock.single_condition(account, "2024/04/27","2024/05/16", StopSign.Full , condition, order)

Response Example


Result {
is_success: True,
message: None,
data : ConditionOrderResult {
guid : "44150047-8977-40b1-953c-ce270f36150",
}
}