Arm position exits
set_exitsArm or replace venue-native SL and/or TP on an open CEX position (spot or futures across binance, bybit, okx, kucoin, gateio, mexc, bitget, bingx, coinbase, kraken). Clears existing stops on the pair and arms the new legs sized against the live position. Needs trade:execute + YOLO eligibility.
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": {
"exchange": "<exchange>",
"pair": "<pair>"
},
"name": "set_exits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | Yes | e.g. BTC/USDT | |
| market | No | Which market the open position is on (default futures). Spot needs quantity. | |
| slPrice | No | Stop-loss trigger. Must sit on the loss side of the entry (long: below, short: above). | |
| tpPrice | No | Take-profit trigger. Must sit on the profit side of the entry (long: above, short: below). | |
| exchange | Yes | CEX slug, e.g. binance, bybit, okx, kucoin, gateio, mexc, bitget, bingx, coinbase, kraken | |
| quantity | No | Spot only: position size in base units (the venue reports no spot position to size against) | |
| connectionId | No | CEX connection id (see list_connections). Takes precedence over exchange. | |
| referencePrice | No | The price the stop and take-profit were DERIVED FROM. The server rebases both legs onto the position's ACTUAL entry price, keeping their distances, so a fill that came in better than the reference cannot leave a take-profit on the wrong side of the entry (where its trigger is already satisfied and it would close the position instantly for a fee). |