Close position (agent wallet)
hl_close_positionClose an open perpetual position using a reduce-only market order through your local agent wallet. Dry-run by default; set confirm=true and dryRun=false to execute.
Instructions
Close an open perp position with a reduce-only market (IOC) order via your local agent wallet, builder code attached. Dry-run by default; set confirm=true AND dryRun=false to submit. Irreversible; not investment advice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | Perp coin symbol of the position to close. | |
| dryRun | No | ||
| address | No | Account holding the position; defaults to the agent wallet address. | |
| confirm | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| action | Yes | ||
| reason | No | ||
| response | No | ||
| agentAddress | No | ||
| builderAttached | Yes |