set_position_tp_sl
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"symbol": "<symbol>"
},
"name": "set_position_tp_sl"
}
}Input 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 |