Single-Condition Order
SingleCondition
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| account | Account | Account |
| start_date | string | Condition monitoring start time |
| end_date | string | Condition monitoring end time |
| stop_sign | StopSign | Stop condition: Full until fully filled, Partial until partially filled, or UntilEnd until the validity period ends |
| condition | Condition | Trigger condition |
| OrderObject | FutOptConditionOrder | Order details |
Result
| Parameter | Type | Description |
|---|---|---|
| isSuccess | bool | Whether the request succeeded |
| data | Object | Condition-order result |
| message | string ? (optional) | Error message returned when isSuccess = false |
ConditionOrderResult Fields
Return type: Object
| Parameter | Type | Description |
|---|---|---|
| guid | string | Condition-order ID |
Request Example
// Define the condition
var condition = new Condition(
TradingType.Reference,
"TXO20000E4",
TriggerContent.MatchedPrice,
"100",
Operator.LessThan
);
var order = new FutOptConditionOrder(
BsAction.Buy,
"TXO20000E4",
"500",
1,
FutOptConditionMarketType.Option,
FutOptConditionPriceType.Limit,
TimeInForce.Rod,
FutOptConditionOrderType.New,
);
sdk.FutOpt.SingleCondition(account, "20240426", "20240430", StopSign.Full, condition, order);
Response Example
{
isSuccess = True,
message = ,
data = ConditionOrderResult {
guid = 44150047-8977-40b1-953c-ce2XXXXXX
}
}