Trail Profit Condition
trail_profit
caution
Only Support Future Regular Sessions
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 |
TrailOrder | FutOptTrailOrder | Trail Order Condition |
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
# Condition Content
trail = FutOptTrailOrder(
symbol ="TXFL4",
baseprice = "20000",
direction = Direction.Up,
tick_num = 5, # Up or Down Percent
buysell = BSAction.Buy,
lot = 2,
price_type = FutOptConditionPriceType.MatchedPrice,
tickers = 5, # base price ticker (negative represent down)
time_in_force = TimeInForce.ROD,
order_type = FutOptConditionOrderType.Close,
)
sdk.futopt.trail_profit(target_account, "20240427","20240516", StopSign.Full, trail)
Response Example
{
is_success : True,
message : None,
data : ConditionOrderResult {
guid : 44150047-8977-40b1-953c-ce2XXXXXX
}
}