Close futures position
close_futures_positionClose or partially reduce a mock futures position in CoinRithm paper trading; omit fraction for full close or pass a fraction to reduce. Requires trade:futures scope and an idempotency key.
Instructions
Close 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.
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 |