Swap Quotes
getUniswapV2Quote
Gets a swap quote from the Uniswap V2 Router02 contract using getAmountsOut (constant-product x*y=k AMM). On-chain read - no transaction needed. Router02 only deployed on Ethereum.
Parameters
| Name | Required | Description |
|---|---|---|
| chain | yes | Network slug |
| tokenIn | yes | Input token contract address e.g. 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 |
| tokenOut | yes | Output token contract address e.g. 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| amount | yes | Input amount (human-readable, e.g. "1.0") e.g. 1.0 |
Response Fields
| Field | Type |
|---|---|
data | object |
chain | string |
tokenIn | string |
tokenOut | string |
amountIn | string |
amountOut | string |
Supported Networks
Ethereum
getUniswapV3Quote
Gets an exact-input swap quote from the Uniswap V3 QuoterV2 contract. On-chain read - no transaction needed.
Parameters
| Name | Required | Description |
|---|---|---|
| chain | yes | Network slug |
| tokenIn | yes | Input token contract address e.g. 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 |
| tokenOut | yes | Output token contract address e.g. 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| amount | yes | Input amount (human-readable, e.g. "1.0") e.g. 1.0 |
| fee | no | Pool fee tier in bps Options: 500, 3000, 10000 |
| blockHeight | no | Historical EVM block number (archive nodes only) e.g. 19834521 |
Response Fields
| Field | Type |
|---|---|
data | object |
chain | string |
tokenIn | string |
tokenOut | string |
amountIn | string |
amountOut | string |
fee | integer |
blockHeight | integer |
gasEstimate | string |
Supported Networks
EthereumPolygonArbitrumOptimismBaseBNB ChainAvalanche
getUniswapV4Quote
Gets a swap quote from the Uniswap V4 Quoter contract (singleton PoolManager architecture with hooks). On-chain read via staticCall.
Parameters
| Name | Required | Description |
|---|---|---|
| chain | yes | Network slug |
| tokenIn | yes | Input token contract address e.g. 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 |
| tokenOut | yes | Output token contract address e.g. 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| amount | yes | Input amount (human-readable, e.g. "1.0") e.g. 1.0 |
| fee | no | Pool fee in bps (default 3000) e.g. 3000 |
| tickSpacing | no | Tick spacing (default 60) e.g. 60 |
| blockHeight | no | Historical EVM block number (archive nodes only) e.g. 19834521 |
Response Fields
| Field | Type |
|---|---|
data | object |
chain | string |
tokenIn | string |
tokenOut | string |
amountIn | string |
amountOut | string |
fee | integer |
tickSpacing | integer |
blockHeight | integer |
gasEstimate | string |
Supported Networks
EthereumOptimismBaseArbitrumPolygonBNB ChainAvalanche
Endpoint "defi-uniswap-v3-token" not found
getJupiterQuote
Gets a swap quote from the Jupiter aggregator for Solana SPL tokens. Returns route plan, price impact, and output amount. Chain is fixed to Solana.
Parameters
| Name | Required | Description |
|---|---|---|
| inputMint | yes | Input SPL token mint address e.g. So11111111111111111111111111111111111111112 |
| outputMint | yes | Output SPL token mint address e.g. EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
| amount | yes | Input amount in raw units (lamports) e.g. 1000000000 |
| slippageBps | no | Slippage tolerance in bps (default 50) e.g. 50 |
Response Fields
| Field | Type |
|---|---|
data | object |
inputMint | string |
outputMint | string |
amountIn | string |
amountOut | string |
priceImpactPct | string |
routePlan | object[] |
swapInfo | object |
ammKey | string |
label | string |
inputMint | string |
outputMint | string |
percent | integer |
Supported Networks
Solana
getJupiterPrice
Gets the current price of a Solana token by quoting 1 unit against a reference token (e.g. USDC). Derived from Jupiter quote API. Chain is fixed to Solana.
Parameters
| Name | Required | Description |
|---|---|---|
| inputMint | yes | Token mint to price e.g. So11111111111111111111111111111111111111112 |
| outputMint | yes | Reference token mint (e.g. USDC) e.g. EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
Response Fields
| Field | Type |
|---|---|
data | object |
price | number |
Supported Networks
Solana