Skip to main content

Max debt swap range (with body)

POST 

/v1/data/loop/range/debt-swap

Compute the maximum amount for a debt swap.

The max swappable amount equals the user's total debt (variable + stable) in the source (input) asset.

Use denomination=exactInput (default) to base the range on the source debt, or exactOutput to base it on the target debt.

Requires positions[] in the POST body (or account for GET) to read the user's debt balances.

POST accepts a JSON body with the user's current portfolio state, avoiding an on-chain fetch.

Request

Responses

Max debt swap range