Swap Tokens
POST /liquidity/swap
Swap tokens in a pool.
Authorizations
Request Body required
object
UUID of the pool to swap tokens in
UUID of the wallet performing the swap
Amount of input tokens to swap
Direction of the swap (true = token0 to token1, false = token1 to token0)
Minimum amount of output tokens to receive (slippage protection)
Maximum allowed slippage in basis points (e.g., 50 = 0.5%)
Responses
200
Swap executed successfully
object
UUID of the swap transaction
UUID of the pool where the swap occurred
UUID of the wallet that performed the swap
Input token (token0 or token1)
Output token (token0 or token1)
Symbol of the input token
Symbol of the output token
Amount of input token swapped
Amount of output token received
Minimum amount of output token expected
Price impact of the swap as a percentage
Status of the swap transaction
Timestamp of the swap transaction
400
Bad Request
object
400
Bad Request
Invalid input parameters