Close CEX position
close_positionClose an open CEX futures position (or reduce it) with a reduce-only market order. Real money. Needs the trade:execute scope AND user YOLO eligibility; per-call kill-switch/autonomy check. NEVER touch positions the user marked manual unless explicitly asked.
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>",
"side": "<side>"
},
"name": "close_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | Yes | e.g. BTC/USDT | |
| side | Yes | Side of the OPEN position | |
| size | No | Base units to close; omit to close the entire position, or pass a smaller amount to reduce partially | |
| exchange | Yes | CEX slug, e.g. kucoin | |
| connectionId | No | CEX connection id (see list_connections). Takes precedence over exchange. |