Multi-Condition
multiCondition
Request Parameter
Parameter | Type | Meaning |
---|---|---|
account | Account | Account |
start_date | string | Condition Start Date |
end_date | string | Condition End Date |
stop_sign | StopSign | Stop Condition : Full Until Fully filled、Partial Once Filled happened 、 UntilEnd Until Expiry |
MultiCondition | Condition List | List of Condition Content |
OrderObject | OrderObject | Order Object |
Result Response
Parameter | Type | Meaning |
---|---|---|
isSuccess | bool | Interface result |
data | Object | ConditionOrderResult is returned |
message | string ? (optional) | isSuccess = false error description is returned |
ConditionOrderResult Parameter
Return type : Object
Parameter | Type | Meaning |
---|---|---|
guid | string | Condition Serial Number |
Request Example
// 設計條件內容
const condition = {
marketType: TradingType.Reference,
symbol: "TXO20000E4",
trigger: TriggerContent.MatchedPrice,
triggerValue: "100",
comparison: Operator.LessThan
}
const condition2 = {
marketType: TradingType.Reference,
symbol: "TXO20000E4",
trigger: TriggerContent.TotalQuantity,
triggerValue: "30",
comparison: Operator.GreaterThan
}
const order = {
buySell: BSAction.Buy,
symbol: "TXO20000E4",
price: "100",
lot: 1,
marketType: FutOptConditionMarketType.Option,
priceType: FutOptConditionPriceType.Limit,
timeInForce: TimeInForce.ROD,
orderType: FutOptConditionOrderType.New
};
sdk.futopt.multiCondition(account, "20240426", "20240430", StopSign.Full, [condition,condition2], order)
Response Example
{
isSuccess: true,
data : {
guid : "44150047-8977-40b1-953c-ce2XXXXXX"
}
}