Skip to main content

Multi-Condition with TP & SL

MultiCondition

info

TP & SL will be activated after the master order has been fully filled.

Request Parameter

ParameterTypeMeaning
accountAccountAccount
startDatestringCondition Start Date
endDatestringCondition End Date
stopSignStopSignStop Condition : Full Until Fully filled、Partial Once Filled happened 、 UntilEnd Until Expiry
MultiConditionCondition ListList of Condition Content
ConditionOrder ObjectConditionOrder ObjectConditionOrder Object
TPSLTPSLWrapperTPSL ConditionOrder 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
reply_codestringStatus Code
advisorystringReturn Content

Request Example


var condition1 = new Condition(
TradingType.Reference,
"2881",
TriggerContent.MatchedPrice,
"66",
Operator.LessThan
);

var condition2 = new Condition(
TradingType.Reference,
"2881",
TriggerContent.TotalQuantity,
"8000",
Operator.LessThan
);

List<Condition> conditions = new List<Condition>();

conditions.Add(condition1);
conditions.Add(condition2);


var order = new ConditionOrder(
BsAction.Buy,
"2881",
"66",
2000,
ConditionMarketType.Common,
ConditionPriceType.Limit,
TimeInForce.Rod,
ConditionOrderType.Stock
);

var tp = new TpslOrder(
TimeInForce.Rod,
ConditionPriceType.Limit,
ConditionOrderType.Stock,
"85",
"85",
null // For version >= 2.2.0, detail refer to [List of Enumerations] -> [TpslOrder Object]
);

var sl = new TpslOrder(
TimeInForce.Rod,
ConditionPriceType.Limit,
ConditionOrderType.Stock,
"60",
"60",
null // For version >= 2.2.0, detail refer to [List of Enumerations] -> [TpslOrder Object]
);

var tpsl = new TpslWrapper(
StopSign.Full,
tp,
sl,
"20240517",
false
);


sdk.Stock.MultiCondition(account, "20240426", "20240430", StopSign.Full, conditions, order, tpsl);

Response Example


{
isSuccess = True,
message = ,
data = ConditionOrderResult {
guid = 44150047-8977-40b1-953c-ce2XXXXXX
}
}