Protocol
Trading

Take Profit Orders

Atomic on-fill TP orders, chaining with repeat, on-chain DCA ladders

Take Profit Orders

SB Chain supports automated take profit orders that trigger on the fill of a parent order, defined in limit_order_create_operation.extensions.on_fill. The TP order is placed atomically in the same block as the fill — no external bot or monitoring required.

ParameterDescription
fee_asset_idAsset used to pay the network fee for placing the TP order
spread_percentPrice distance from the fill price at which the TP order is placed
size_percentPercentage of the filled amount to include in the TP order
expiration_secondsHow long the TP order lives on the book (0 = maximum lifetime)
repeatIf true, a new TP order is created each time the TP order itself fills

Setting repeat = true creates a self-perpetuating take profit chain: each TP fill triggers the next at the same spread and size parameters, enabling fully on-chain automated DCA-sell ladders and grid-style strategies. There is no native stop loss type; the recommended approach is an external bot that monitors positions and submits an aggressive limit + FOK order on trigger.