Quote a liquidity redemption
/dex/redeem/checkQuote closing a provision. amountX / amountY are the liquidity only; unclaimedX / unclaimedY are fees that would be lost if the provision is spent without claiming.
Request body
LDRedeemRequest · application/jsonprovisionBoxIdstringrequiredminAmountXstringLeast you will accept back on the ERG side. Decimal string.
minAmountYstringThe same on the token side. Decimal string.
expectedPoolBoxIdstringThe pool box this was quoted against
acknowledgeUnclaimedFeesbooleanMust be true to redeem a provision that still has unclaimed fees, which are lost when it is spent. Ignored when there are none.
Responses
200Quote for the requested redemptionLDRedeemQuote▶
sharesstringrequiredLP shares that would be closed. Decimal string.
amountXstringrequirednanoERG returned. Liquidity only — fees settle separately. Decimal string.
amountYstringrequiredRaw token units returned. Decimal string.
withinMinSupplybooleanrequiredFalse when closing this provision would take supply under the contract's minimum, which the pool refuses.
unclaimedXstringrequiredUnclaimed ERG fees. Lost if the provision is redeemed without claiming them first. Decimal string.
unclaimedYstringrequiredToken side of the same. Decimal string.
400Malformed body.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
404No live provision with that id.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
409The provision moved. Re-read to find its current box id.LDStateChangedResponse▶
errorintegerrequiredreasonstringrequireddetailstringrequiredWhat moved, and what it moved to
poolBoxIdstringCurrent pool box id
vaultBoxIdstringCurrent vault box id
provisionBoxIdstringCurrent provision box id
503Node unavailable. Retry.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
defaultErrorApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description