Update Orders Examples
Examples of changing the stop-loss and take-profit after a position is open. MOVE_STOP_LOSS replaces both protective orders with the prices in the signal, so always send every level you want to keep.
Move Stop Loss to Break Even
{
"strategy_key": "your_strategy_key_here",
"exchange": "BINANCE",
"ticker": "BTCUSDT.P",
"position_side": "MOVE_STOP_LOSS",
"stop_loss_price": 50000,
"take_profit_price": 55000,
"reason": "Move to break even after 1:1 RR"
}
Update Both SL and TP
{
"strategy_key": "your_strategy_key_here",
"exchange": "BINANCE",
"ticker": "BTCUSDT.P",
"position_side": "MOVE_STOP_LOSS",
"stop_loss_price": 51000,
"take_profit_price": 58000
}
Progressive Stop Loss Trail
// Entry at 50000, initial SL at 48000, TP at 60000
// Price reaches 52000 - move SL to entry
{
"strategy_key": "your_strategy_key_here",
"exchange": "BINANCE",
"ticker": "BTCUSDT.P",
"position_side": "MOVE_STOP_LOSS",
"stop_loss_price": 50000,
"take_profit_price": 60000
}
// Price reaches 54000 - trail SL
{
"strategy_key": "your_strategy_key_here",
"exchange": "BINANCE",
"ticker": "BTCUSDT.P",
"position_side": "MOVE_STOP_LOSS",
"stop_loss_price": 52000,
"take_profit_price": 60000
}
// Price reaches 56000 - trail SL and extend TP
{
"strategy_key": "your_strategy_key_here",
"exchange": "BINANCE",
"ticker": "BTCUSDT.P",
"position_side": "MOVE_STOP_LOSS",
"stop_loss_price": 54000,
"take_profit_price": 62000
}
Remove Orders for Manual Management
{
"strategy_key": "your_strategy_key_here",
"exchange": "BINANCE",
"ticker": "BTCUSDT.P",
"position_side": "CANCEL_ORDERS",
"cancel_stop_loss": true,
"cancel_take_profit": true
}
Without a stop-loss the position is unprotected. Only do this when you manage the exit yourself.
Paper bots
Paper bots have no exchange-side stop-loss or take-profit orders, so MOVE_STOP_LOSS and CANCEL_ORDERS have no effect there. Close paper positions with a CLOSE signal.