Close position
close_positionExit a full position in a contract at market. Resting stop or target orders are not canceled, so review open orders and cancel any leftovers.
Instructions
Flatten the whole position in a contract at market. Does NOT cancel resting stop/target orders; check list_open_orders and cancel leftovers.
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": {
"accountId": "<accountId>",
"contractId": "<contractId>"
},
"name": "close_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why; saved to the journal. | |
| accountId | Yes | Trading account ID from list_accounts. | |
| contractId | Yes | Contract ID, e.g. "CON.F.US.MNQ.Z25". Get it from search_contracts. |