close_position
Close an existing position entirely with a market or limit order. Specify instrument and optionally price to flatten the position.
Instructions
Close an existing position entirely. Places a market or limit order to flatten the position.
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": {
"instrument_name": "<instrument_name>",
"type": "<type>"
},
"name": "close_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Order type for closing | |
| price | No | Limit price (required if type is 'limit') | |
| instrument_name | Yes | Instrument name of the position to close |