Skip to main content

Trail Profit Condition

Fubon Neo API supports trail profit orders.

Trailing Profit Mechanism: After the initial condition is triggered, the order will not be activated if the set pullback range is not reached. As the stock price continues to rise, the new price will be used as the benchmark. If the pullback range reaches the set value at this point, the order will be submitted.

trailProfit

Request Example

# 設計條件內容
trail = TrailOrder(
symbol = "2330",
price = "1000",
direction = Direction.Down ,
percentage = 5, # 漲跌 % 數
buy_sell = BSAction.Sell,
quantity = 2000,
price_type = ConditionPriceType.MatchedPrice,
diff = 1, # 向上 or 向下追買 tick數 (向下為負值)
time_in_force = TimeInForce.ROD,
order_type = ConditionOrderType.Stock
)

sdk.stock.trail_profit(target_account, "20240427","20240516", StopSign.Full, trail)