Place a deposit order
/dex/orders/depositapi_keyLock a deposit in an order that any miner can fill for executorFee. It fills only if the offer buys at least minShares against the pool when it executes, and waits otherwise. The fill sends the owner the new provision's ownerNFT and whatever the pool did not take.
Request body
LDDepositOrderExecuteRequest · application/jsonamountXstringrequiredMost nanoERG the order offers to the reserves, not counting the provision box. Decimal string.
amountYstringrequiredRaw token units the order offers. Decimal string.
minSharesstringrequiredFewest shares the order accepts, checked against the pool when it fills. Required and must be positive. A floor far under the quote's
shareslets a pool moved earlier in the same block take the difference. Decimal string.executorFeestringnanoERG paid to whoever fills the order. 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, a non-positive amount or `minShares`, or a `maxMinerFee` not below `executorFee`. ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
422The pool has no provision tokens left, or the wallet cannot cover the order.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