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.
| Parameter | Description |
|---|---|
| fee_asset_id | Asset used to pay the network fee for placing the TP order |
| spread_percent | Price distance from the fill price at which the TP order is placed |
| size_percent | Percentage of the filled amount to include in the TP order |
| expiration_seconds | How long the TP order lives on the book (0 = maximum lifetime) |
| repeat | If 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.