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"
const response = await fetch(
'https://inkyswap.com/api/quote?' +
new URLSearchParams({
tokenIn: '0x0000000000000000000000000000000000000000',
tokenOut: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amount: '1000000000000000000'
})
);
const quote = await response.json();
const txResponse = await fetch(
'https://inkyswap.com/api/quote?' +
new URLSearchParams({
tokenIn: '0x0000000000000000000000000000000000000000',
tokenOut: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amount: '1000000000000000000',
slippage: '100',
buildTx: 'true',
userAddress: '0x1234567890abcdef1234567890abcdef12345678'
})
);
const txQuote = await txResponse.json();
import requests
response = requests.get(
"https://inkyswap.com/api/quote",
params={
"tokenIn": "0x0000000000000000000000000000000000000000",
"tokenOut": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1000000000000000000"
}
)
quote = response.json()
tx_response = requests.get(
"https://inkyswap.com/api/quote",
params={
"tokenIn": "0x0000000000000000000000000000000000000000",
"tokenOut": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1000000000000000000",
"slippage": "100",
"buildTx": "true",
"userAddress": "0x1234567890abcdef1234567890abcdef12345678"
}
)
tx_quote = tx_response.json()
{
"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"
}
}
InkySwap API
Get Swap Quote
Get a price quote for swapping tokens with optional transaction building
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"
const response = await fetch(
'https://inkyswap.com/api/quote?' +
new URLSearchParams({
tokenIn: '0x0000000000000000000000000000000000000000',
tokenOut: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amount: '1000000000000000000'
})
);
const quote = await response.json();
const txResponse = await fetch(
'https://inkyswap.com/api/quote?' +
new URLSearchParams({
tokenIn: '0x0000000000000000000000000000000000000000',
tokenOut: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amount: '1000000000000000000',
slippage: '100',
buildTx: 'true',
userAddress: '0x1234567890abcdef1234567890abcdef12345678'
})
);
const txQuote = await txResponse.json();
import requests
response = requests.get(
"https://inkyswap.com/api/quote",
params={
"tokenIn": "0x0000000000000000000000000000000000000000",
"tokenOut": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1000000000000000000"
}
)
quote = response.json()
tx_response = requests.get(
"https://inkyswap.com/api/quote",
params={
"tokenIn": "0x0000000000000000000000000000000000000000",
"tokenOut": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1000000000000000000",
"slippage": "100",
"buildTx": "true",
"userAddress": "0x1234567890abcdef1234567890abcdef12345678"
}
)
tx_quote = tx_response.json()
{
"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
string
required
Input token address (use
0x0000000000000000000000000000000000000000 for native ETH)string
required
Output token address (use
0x0000000000000000000000000000000000000000 for native ETH)string
Amount of input token (in smallest unit). Either
amount or amountOut must be providedstring
Desired amount of output token (in smallest unit). Either
amount or amountOut must be providedstring
Slippage tolerance in basis points (e.g., 100 = 1%). Range: 0-10000
boolean
default:"false"
Whether to build the transaction data
string
User’s wallet address (required if
buildTx is true)Response
string
Actual input amount in smallest unit
string
Expected output amount in smallest unit
string
Minimum output amount after slippage (if slippage provided)
string
Maximum input amount after slippage (if using exact output)
string
Exchange rate for this specific trade (accounts for price impact)
string
Current spot price without price impact
array
Token addresses in the swap route
number
Estimated price impact percentage (0-1)
string
Total LP fees in input token amount
object
object
{
"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"
const response = await fetch(
'https://inkyswap.com/api/quote?' +
new URLSearchParams({
tokenIn: '0x0000000000000000000000000000000000000000',
tokenOut: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amount: '1000000000000000000'
})
);
const quote = await response.json();
const txResponse = await fetch(
'https://inkyswap.com/api/quote?' +
new URLSearchParams({
tokenIn: '0x0000000000000000000000000000000000000000',
tokenOut: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
amount: '1000000000000000000',
slippage: '100',
buildTx: 'true',
userAddress: '0x1234567890abcdef1234567890abcdef12345678'
})
);
const txQuote = await txResponse.json();
import requests
response = requests.get(
"https://inkyswap.com/api/quote",
params={
"tokenIn": "0x0000000000000000000000000000000000000000",
"tokenOut": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1000000000000000000"
}
)
quote = response.json()
tx_response = requests.get(
"https://inkyswap.com/api/quote",
params={
"tokenIn": "0x0000000000000000000000000000000000000000",
"tokenOut": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1000000000000000000",
"slippage": "100",
"buildTx": "true",
"userAddress": "0x1234567890abcdef1234567890abcdef12345678"
}
)
tx_quote = tx_response.json()
⌘I