set_position_tp_sl
Destructive
Use this when the user asks to set or move the take-profit and/or stop-loss of an open Hyperliquid position. Only the legs you pass change: passing just stop_loss moves the stop and keeps the current take-profit (and vice versa). To remove a leg, cancel its order id from get_my_positions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Coin symbol of the open position, e.g. BTC | |
| stop_loss | No | New stop-loss trigger price. Omit to leave the current stop-loss as it is | |
| take_profit | No | New take-profit trigger price. Omit to leave the current take-profit as it is |