Quote a direct swap on any pool
/dex/pools/{poolNft}/swap/checkWhat a swap spending the pool now would return, with its price impact and fees. No executor is paid; the wallet pays the network fee.
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 quoteLDPoolDirectSwapQuote▶
poolNFTstringrequiredtokenInstringrequiredtokenOutstringrequiredamountInstringrequiredamountOutstringrequiredminAmountInstringThe least input that still buys
amountOut. Absent when nothing comes out.executablebooleanrequiredpriceImpactnumber · doublerequiredHow far the swap falls short of the pool's price before it, fees included, as a fraction.
protocolFeestringrequiredOf
tokenIn, set aside for the pool's providers.ammFeestringrequiredOf
tokenIn, the curve's own fee, which stays in the reserves.networkFeestringrequiredpoolBoxIdstringrequiredThe pool box quoted against, to send back as
expectedPoolBoxId.
400The request is malformed, names a token the pool does not hold, or leaves out an acknowledgement it needs.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
422The pool can be drained, the pool cannot fill this at its depth or above the floor, or the wallet cannot cover it.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