Quote a swap order on any pool
/dex/pools/{poolNft}/orders/swap/checkWhat a swap order selling tokenIn would fill at against the pool now, for either kind of pool. tokenIn is ERG or one of the pool's tokens.
Path parameters
poolNftstringrequiredThe pool's NFT id, 64 hex characters
Request body
LDPoolSwapRequest · application/jsontokenInstringrequiredERG, or one of the pool's tokens
amountInstringrequiredBase units sold
executorFeestringnanoERG the filler keeps. Omitted, from lithosdex.orders.
maxMinerFeestringMost of the executor fee a broadcast fill may pay as a network fee. Below executorFee.
Responses
200The quoteLDPoolSwapQuote▶
poolNFTstringrequiredtokenInstringrequiredtokenOutstringrequiredERG, or the pool's other token
amountInstringrequiredamountOutstringrequiredWhat the pool gives for amountIn
minAmountInstringThe least input that still buys amountOut. Anything above it buys nothing more, which matters for a token whose single unit is worth a lot. Absent when nothing comes out.
netOutputstringrequiredWhat the owner receives
executablebooleanrequiredWhether the pool can fill this at all
executorFeestringrequiredmaxMinerFeestringrequiredtotalErgRequiredstringrequirednanoERG the order box holds
▶
tokensRequiredLDTokenAmount[]requiredTokens the order box holds
tokenIdstringrequiredamountstringrequiredRaw token units. Decimal string.
ergReturnedstringrequirednanoERG returned beside the fill
networkFeestringrequiredThe placement's own fee
priceImpactnumber · doubleHow far the fill falls short of the pool's price before it, fees included, as a fraction
protocolFeestringOf tokenIn, set aside for the pool's providers
ammFeestringOf tokenIn, the curve's own fee, which stays in the reserves
400The request is malformed, or names a token the pool does not hold.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
404No LithosDex pool with that NFT, or no live provision with that id.ApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description
503The pool index is still building, or the node could not be read. 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