Build close
build_closeBuild the steps that close a position in full. Returns UNSIGNED transaction steps for the owner to sign in order; this server never holds keys or sends transactions. The build expires after 180 seconds (expiresAt, unix ms): build immediately before signing, not as a plan for later. Builds are single-use: rebuilding an open predicts a different position address, so never replay one. A successful build does not guarantee a successful transaction: pass steps to simulate and check ok before asking anyone to sign.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | EOA that owns the position and signs the steps. The smart account is derived from it server-side. | |
| chainId | Yes | EVM chain id | |
| slippage | No | Slippage tolerance as a decimal: 0.005 means 0.5% (not 1e18 fixed-point) | |
| strategyId | Yes | Strategy id from list_strategies (`strategyId`) | |
| forceSwapper | No | Retry only: route the swap through the swapper instead of the routing engine. Set it when simulate reports a build as failing, then rebuild. | |
| receiveToken | No | Token to receive (defaults to the deposit token) | |
| positionAddress | Yes | Position (vault) address |