Close futures position
close_futures_positionClose or partially reduce a mock futures position. fraction in (0,1] reduces partially; omit (or 1) for a full close. idempotencyKey is REQUIRED. Requires the trade:futures scope. Paper trading only (virtual mUSD). Fills follow paper_execution_v1 with a disclosed execution cost; see executionModel in quote/trade results.
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": {
"positionId": "<positionId>",
"idempotencyKey": "<idempotencyKey>"
},
"name": "close_futures_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fraction | No | (0,1] portion to close; omit/1 = full close. | |
| agentTrace | No | Optional private trace metadata stored in the caller's ledger. | |
| positionId | Yes | Open futures position id to close or reduce. | |
| idempotencyKey | Yes | Unique per close intent; reuse replays the original result. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| body | No | ||
| httpStatus | Yes | ||
| ledgerStatus | No | ||
| ledgerEventId | No |