Skip to main content

Single Conditional Order

singleCondition

Input Parameters

ParameterTypeDescription
accountAccountAccount
start_datestringCondition monitoring start time
end_datestringCondition monitoring end time
stop_signStopSignCondition stop condition : Full Until fully filled、PartialUntil partially filled、UntilEndUntil expiry
conditionConditionTrigger condition
ConditionOrder ObjectConditionOrder ObjectOrder Details

Result

ParameterTypeDescription
isSuccessboolWhether successful
dataObjectConditional order response information
messagestring ? (optional)When isSuccess = false Returns an error message

Order Information ConditionOrderResult Fields

Return type : Object

ParameterTypeDescription
guidstringConditional Order ID

Request Example

// Define the condition
const condition = {
marketType: TradingType.Reference,
symbol: "2881",
trigger: TriggerContent.MatchedPrice,
triggerValue: "80",
comparison: Operator.LessThan
}

const order = {
buySell: BSAction.Buy,
symbol: "2881",
price: "66",
quantity: 2000,
marketType: ConditionMarketType.Common,
priceType: ConditionPriceType.Limit,
timeInForce: TimeInForce.ROD,
orderType: ConditionOrderType.Stock
};


sdk.stock.singleCondition(account, "20240426", "20240430", StopSign.Full, condition, order)

Response Example


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