Skip to main content

移動鎖利條件單

caution

僅支援日盤交易

trailProfit

輸入參數

參數類別說明
accountAccount帳號
startDatestring條件開始監控時間
endDatestring條件結束監控時間
stopSignStopSign條件停止條件 : Full 全部成交為止、Partial部分成交為止、UntilEnd效期結束為止
futoptTrailOrderFutOptTrailOrder移動鎖利條件

Result 回傳

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

委託資訊 ConditionOrderResult 欄位

Return type : Object

參數類別說明
guidstring條件單號
reply_codestring回覆狀態代號
advisorystring回覆狀態內容

請求範例

// 設計條件內容
const trail = {
symbol: "TXO20000E4",
price: "100",
direction: Direction.Down,
tickNum: 5,
buySell: BSAction.Sell,
lot: 2,
priceType: FutOptConditionPriceType.MatchedPrice,
diff: 5,
timeInForce: TimeInForce.ROD,
orderType: FutOptConditionOrderType.Close

};


sdk.futopt.trailProfit(target_account, "20240427","20240516", StopSign.Full, trail)

回傳範例


{
isSuccess: true,
data : {
guid : "44150047-8977-40b1-953c-ce2XXXXXX"
}
}