Skip to content

Get Swap Quote

GET
/liquidity/quote/swap

Get a quote for swapping tokens.

Authorizations

Parameters

Query Parameters

poolId
required
string format: uuid

The ID of the pool to swap in

inputTokenAmount
required
string

Amount of input token to swap

inputTokenIsToken0
required
string
Allowed values: true false

Whether the input token is token0

Responses

200

Swap quote

object
poolInfo
object
token0Symbol

Token symbol for token0 (e.g., “USDC”)

string
token1Symbol

Token symbol for token1 (e.g., “ETH”)

string
token0Reserve

Current amount of token0 in the pool

string
token1Reserve

Current amount of token1 in the pool

string
token0Price

Exchange rate - How much token1 you get for 1 token0

string
token1Price

Exchange rate - How much token0 you get for 1 token1

string
token0ContractDeploymentId

Contract deployment ID of token0

string
token1ContractDeploymentId

Contract deployment ID of token1

string
contractDeploymentId

Contract deployment ID of the pool

string
expectedAmountOut

Amount of output tokens you will receive

string
effectiveRate

Effective exchange rate for this swap

string
priceImpact

How much this trade will affect the price (in percent)

string
fee

Trading fee amount in input token units

string
feeRate

Trading fee rate in basis points

string

400

Bad Request

object
code
integer
400
message
string
Bad Request
details
string
Invalid input parameters