Skip to main content

多條件單

MultiCondition

輸入參數

參數類別說明
accountAccount帳號
start_datestring條件開始監控時間
end_datestring條件結束監控時間
stop_signStopSign條件停止條件 :Full 全部成交為止、Partial部分成交為止、UntilEnd效期結束為止
MultiConditionCondition List觸發條件
OrderObjectOrderObject委託內容

Result 回傳

參數類別說明
isSuccessbool是否成功
dataObject條件單回傳資訊
messagestring ? (optional)當isSuccess = false 回傳錯誤訊息

委託資訊 ConditionOrderResult 欄位

Return type : Object

參數類別說明
guidstring條件單號

請求範例

// 設計條件內容
var condition1 = new Condition(
TradingType.Reference,
"TXO20000E4",
TriggerContent.MatchedPrice,
"100",
Operator.LessThan
);

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

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

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

var order = new FutOptConditionOrder(
BsAction.Buy,
"TXO20000E4",
"500",
1,
FutOptConditionMarketType.Option,
FutOptConditionPriceType.Limit,
TimeInForce.Rod,
FutOptConditionOrderType.New
);


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

回傳範例


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