trade_close
Close an existing perpetual futures position on a supported exchange via a reduce-only market order after previewing impact and confirming; residual partial fills are flagged for review.
Instructions
Close an existing position. IMPORTANT: Call trade_preview first with the opposite side to show impact, then get user confirmation. Verified close: closedSize is the measured / venue-final fill (one residual market close is attempted); a residual still open → ORDER_PARTIAL error (symbol quarantined). Includes the uniform OrderResult of the reduce-only market order. Hyperliquid: native perps only (HIP-3 dexes via the CLI --dex).
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": {
"exchange": "<exchange>",
"symbol": "<symbol>"
},
"name": "trade_close"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Symbol to close (e.g., BTC, ETH) | |
| exchange | Yes | Exchange: pacifica, hyperliquid, lighter, aster, lighter-rh, ondo, arcus, qfex, risex, txflow (aliases accepted) |