close_position
Close an open cTrader position for the authenticated account, with optional partial close by specifying a volume.
Instructions
Close a cTrader position.
This override ensures:
Account ID is always bound to the authenticated session
Position ID is validated as a non-empty string
Volume (if provided) is validated to be positive
Partial closes are supported via volume parameter
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": {
"account_id": "<account_id>",
"position_id": "<position_id>"
},
"name": "close_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| volume | No | Optional volume for partial close | |
| account_id | Yes | The cTrader account ID (from session) | |
| position_id | Yes | The position ID to close |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||