GET
/
api
/
quote
curl -X GET "https://inkyswap.com/api/quote?tokenIn=0x0000000000000000000000000000000000000000&tokenOut=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&amount=1000000000000000000"

curl -X GET "https://inkyswap.com/api/quote?tokenIn=0x0000000000000000000000000000000000000000&tokenOut=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&amount=1000000000000000000&slippage=100&buildTx=true&userAddress=0x1234567890abcdef1234567890abcdef12345678"
{
  "amountIn": "1000000000000000000",
  "amountOut": "2500000000",
  "minimumAmountOut": "2475000000",
  "executionRate": "2500000000000000000000",
  "spotRate": "2505000000000000000000",
  "path": [
    "0x0000000000000000000000000000000000000000",
    "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
  ],
  "priceImpact": 0.002,
  "lpFee": "3000000000000000",
  "metadata": {
    "lpFeePercent": 0.003,
    "routerAddress": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
    "slippageBps": 100
  },
  "transaction": {
    "from": "0x1234567890abcdef1234567890abcdef12345678",
    "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
    "data": "0x7ff36ab500000...",
    "value": "1000000000000000000",
    "gasPrice": "50000000000",
    "gas": "250000"
  }
}

Query Parameters

tokenIn
string
required
Input token address (use 0x0000000000000000000000000000000000000000 for native ETH)
tokenOut
string
required
Output token address (use 0x0000000000000000000000000000000000000000 for native ETH)
amount
string
Amount of input token (in smallest unit). Either amount or amountOut must be provided
amountOut
string
Desired amount of output token (in smallest unit). Either amount or amountOut must be provided
slippage
string
Slippage tolerance in basis points (e.g., 100 = 1%). Range: 0-10000
buildTx
boolean
default:"false"
Whether to build the transaction data
userAddress
string
User’s wallet address (required if buildTx is true)

Response

amountIn
string
Actual input amount in smallest unit
amountOut
string
Expected output amount in smallest unit
minimumAmountOut
string
Minimum output amount after slippage (if slippage provided)
maximumAmountIn
string
Maximum input amount after slippage (if using exact output)
executionRate
string
Exchange rate for this specific trade (accounts for price impact)
spotRate
string
Current spot price without price impact
path
array
Token addresses in the swap route
priceImpact
number
Estimated price impact percentage (0-1)
lpFee
string
Total LP fees in input token amount
metadata
object
Additional quote information
transaction
object
Transaction data (if buildTx is true)
{
  "amountIn": "1000000000000000000",
  "amountOut": "2500000000",
  "minimumAmountOut": "2475000000",
  "executionRate": "2500000000000000000000",
  "spotRate": "2505000000000000000000",
  "path": [
    "0x0000000000000000000000000000000000000000",
    "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
  ],
  "priceImpact": 0.002,
  "lpFee": "3000000000000000",
  "metadata": {
    "lpFeePercent": 0.003,
    "routerAddress": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
    "slippageBps": 100
  },
  "transaction": {
    "from": "0x1234567890abcdef1234567890abcdef12345678",
    "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
    "data": "0x7ff36ab500000...",
    "value": "1000000000000000000",
    "gasPrice": "50000000000",
    "gas": "250000"
  }
}
curl -X GET "https://inkyswap.com/api/quote?tokenIn=0x0000000000000000000000000000000000000000&tokenOut=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&amount=1000000000000000000"

curl -X GET "https://inkyswap.com/api/quote?tokenIn=0x0000000000000000000000000000000000000000&tokenOut=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&amount=1000000000000000000&slippage=100&buildTx=true&userAddress=0x1234567890abcdef1234567890abcdef12345678"