set_target
Adjusts an open position’s take-profit to a new price on the live account, replacing older targets while leaving the stop and size unchanged.
Instructions
LIVE MONEY: acts on the real account. Move an open position's take-profit to tp_px. One limit take-profit for the whole position goes on first, then every older target on the coin is cancelled, so the position always has a target and a refused new order leaves the old one in place. Refused: no open position, or a target on the losing side of the mark (it would fill at once). Never changes the stop or the size. Use to raise or lower a target. To move the stop use set_stop; to exit now use close_position. Needs a trading key. Returns {ok, tp_px, size, replaced: old target prices}; a refusal is {ok: false, reason} with isError true and nothing sent.
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": {
"coin": "<coin>",
"tp_px": "<tp_px>"
},
"name": "set_target"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | Coin: a main-dex perp by name (BTC, ETH) or a HIP-3 perp as dex:SYMBOL (xyz:GOLD, xyz:BRENTOIL). | |
| tp_px | Yes | New target: above the mark for a long, below it for a short. |