Max close range
GET/v1/data/loop/range/close
Compute the maximum amount for closing (deleveraging) a position.
The max closeable amount is bounded by the smaller of the user's collateral and debt. amountIn = collateral withdrawn, amountOut = debt repaid.
Use denomination=exactInput (default) to base the range on collateral, or exactOutput to base it on debt.
Requires positions[] in the POST body (or account for GET) to read collateral and debt balances.
Request
Responses
- 200
- 400
Max close range
Validation error