Place a redeem order
/dex/orders/redeemapi_keyMove a provision's ownerNFT into an order that any miner can fill for executorFee, closing the provision and paying the owner its share of the reserves. Settled fees are claimed in the same transaction; fees not yet flushed, and any earned while the order waits, are lost when it fills. Until then the provision cannot be claimed, resized or redeemed directly.
Request body
LDRedeemOrderRequest · application/jsonprovisionBoxIdstringrequiredexecutorFeestringnanoERG paid to whoever fills the order, out of the ERG it releases. A fill broadcast to the mempool pays its miner fee out of this. Miners skip orders paying less than they accept. Omit for the client's default. Decimal string.
maxMinerFeestringMost nanoERG a fill may pay as a miner fee, out of
executorFee. Must be belowexecutorFee. Omit for the client's default. Decimal string.
Responses
200The placement transaction and the order it createdLDOrderPlacementResult▶
outcomestringrequiredNode submission outcome; uncertain retains the known transaction ID and input ownership.
one ofacceptedrejecteduncertaintxIdstringrequired▶
orderLDOrderrequiredAn outstanding LithosDex order owned by this wallet. Which term fields are present depends on
type.boxIdstringrequiredOrder box id. Pass it to
POST /dex/orders/{boxId}/cancel.typestringrequiredone ofSWAPDEPOSITREDEEMstatusstringrequiredPENDING: the placement is unconfirmed. OPEN: placed and waiting for a fill. FILLING: an unconfirmed transaction fills it. CANCELLING: an unconfirmed transaction cancels it. Only PENDING and OPEN orders can be cancelled.
one ofPENDINGOPENFILLINGCANCELLINGplacementTxIdstringrequiredTransaction that created the order box
placedHeightinteger · int32Height the placement confirmed at. Absent while it is unconfirmed.
spendingTxIdstringThe unconfirmed transaction filling or cancelling the order. Present when FILLING or CANCELLING.
ownerstringrequiredAddress that receives the fill, and the only key that can cancel
valuestringrequirednanoERG held by the order box. Decimal string.
executorFeestringrequirednanoERG the order pays whoever fills it. Decimal string.
maxMinerFeestringrequiredMost nanoERG a fill may pay as a miner fee, out of
executorFee. Decimal string.ergInbooleanSWAP only. True when selling ERG for the token.
amountInstringSWAP only. nanoERG or raw token units sold into the pool. Decimal string.
minOutputstringSWAP only. Least the owner receives: tokens when selling ERG, or nanoERG after
executorFeewhen selling the token. Decimal string.amountXstringDEPOSIT only. Most nanoERG offered to the reserves. Decimal string.
amountYstringDEPOSIT only. Raw token units offered. Decimal string.
minSharesstringDEPOSIT only. Fewest shares the order accepts. Decimal string.
ownerNFTstringREDEEM only. Ownership NFT of the provision the order closes.
provisionBoxIdstringREDEEM only. Current box of that provision. Absent when it cannot be found.
fillableNowbooleanrequiredWhether the order would fill against the current pool. False when the pool cannot meet the order's minimum or refuses it; the order waits until that changes or it is cancelled. Always true while
FILLINGand false whileCANCELLING.
claimedXstringREDEEM only. Settled ERG fees the placement claimed. Decimal string.
claimedYstringREDEEM only. Token side of
claimedX. Decimal string.
400Malformed body, or a `maxMinerFee` not below `executorFee`.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 vault or provision moved. Re-read and try again.LDStateChangedResponse▶
errorintegerrequiredreasonstringrequireddetailstringrequiredWhat moved, and what it moved to
poolBoxIdstringCurrent pool box id
vaultBoxIdstringCurrent vault box id
provisionBoxIdstringCurrent provision box id
422Closing the provision would take supply under the pool's minimum, the vault cannot pay the fees the placement claims, this wallet does not hold its `ownerNFT`, or the wallet cannot cover the network fee. 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