Resize a provision
/dex/provisions/{boxId}/resizeapi_keyChange a provision's size without closing it. Bound it with maxAmountX / maxAmountY when increasing or minAmountX / minAmountY when decreasing. The provision gets a new box id, returned as boxId.
Path parameters
boxIdstringrequiredUTXO id of the provision box
Request body
LDResizeRequest · application/jsonnewSharesstringrequiredSize the provision should become. Must be positive — a resize to zero is a redemption. Decimal string.
maxAmountXstringMost you will contribute on the ERG side, when increasing. Decimal string.
maxAmountYstringMost you will contribute on the token side, when increasing. Decimal string.
minAmountXstringLeast you will take back on the ERG side, when decreasing. Decimal string.
minAmountYstringLeast you will take back on the token side, when decreasing. Decimal string.
expectedPoolBoxIdstringThe pool box this was quoted against
expectedVaultBoxIdstringVault box the quote was made against. A resize also flushes.
expectedProvisionBoxIdstringThe provision box this was quoted against
Responses
200Result of the resize transactionLDResizeResult▶
outcomestringrequiredNode submission outcome; uncertain retains the known transaction ID and input ownership.
one ofacceptedrejecteduncertainboxIdstringrequiredNew provision box id. Use it for the next request.
newSharesstringrequiredamountXstringrequiredamountYstringrequiredtxIdstringrequired
400Malformed body, or `newShares` is not a different positive size.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 pool, vault or provision moved. Re-read and quote again.LDStateChangedResponse▶
errorintegerrequiredreasonstringrequireddetailstringrequiredWhat moved, and what it moved to
poolBoxIdstringCurrent pool box id
vaultBoxIdstringCurrent vault box id
provisionBoxIdstringCurrent provision box id
422Falls outside the given bounds, or the pool refuses the resize.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
503Node or wallet 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