close_position
Closes an existing leveraged perpetual futures position at market price on Jupiter Perpetuals, returning collateral as USDC. Specify asset (SOL, BTC, or ETH) and side (Long or Short) to execute.
Instructions
Submits a transaction to fully close an existing position at market price. The protocol processes asynchronously (may take a few seconds) - use get_account_portfolio to verify closure. Returns transaction signature (for logging) and confirmation message. Collateral is returned as USDC.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | Yes | The asset of the position to close | |
| side | Yes | The side of the position to close |