Swap tokens in a pool
POST /v2/liquidity/swap
POST
/v2/liquidity/swap
Request Body required
Section titled “Request Body required ”object
poolId
required
UUID of the pool to swap tokens in
string
walletId
required
UUID of the wallet performing the swap
string
amountIn
required
Amount of input tokens to swap
string
isToken0ToToken1
required
Direction of the swap (true = token0 to token1, false = token1 to token0)
boolean
amountOutMin
Minimum amount of output tokens to receive (slippage protection)
string
slippageBps
Maximum allowed slippage in basis points (e.g., 50 = 0.5%)
number
Responses
Section titled “ Responses ”Swap executed successfully
object
transactionId
required
UUID of the swap transaction
string
poolId
required
UUID of the pool where the swap occurred
string
walletId
required
UUID of the wallet that performed the swap
string
inputToken
required
Input token (token0 or token1)
string
outputToken
required
Output token (token0 or token1)
string
inputTokenSymbol
required
Symbol of the input token
string
outputTokenSymbol
required
Symbol of the output token
string
inputAmount
required
Amount of input token swapped
string
outputAmount
required
Amount of output token received
string
minimumOutputAmount
required
Minimum amount of output token expected
string
priceImpact
required
Price impact of the swap as a percentage
string
status
required
Status of the swap transaction
string
timestamp
required
Timestamp of the swap transaction
string