EVM Swaps
KyberSwap Aggregator EVM APIs
Download OpenAPI specification:
EVM swap APIs
Latest

Chain name. Full list of supported chains available in Docs.
ethereumAddress of the input token
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE in case of native token
Address of the output token
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE in case of native token
Amount of the input token (in wei)
DEX IDs included in the route, separated by comma
DEX IDs excluded from the route, separated by comma
Exclude RFQ sources
Exclude unscalable sources and only use sources that accept scaling input amounts
Only routes directly from tokenIn to tokenOut (without hop tokens)
Determines whether to only return single-path route
Determines whether gas costs are accounted for when searching for best route. Defaults to true
Custom gas price in wei used when searching for the best swap route. Use result from eth_gasPrice otherwise
Fee amount(s) to be collected.
If isInBps = true, feeAmount is the percentage of fees to take with base unit = 10000, i.e feeAmount = 10 and isInBps = true then fee = 0.1%;
If isInBps = false, feeAmount is the amount of token to take as fee, i.e feeAmount = 10 and isInBps = 'false' then fee = 10 token weis.
It also accepts a comma-separated list of numbers to support multiple fee receivers, for example: feeAmount=10,20
Indicates that the API client wants to charge fee by input token (currency_in) or output token (currency_out).
Default is empty whereby no fee is charged.
if true, fee is taken in bps of the amount in/out, instead of absolute wei value
The API client's wallet address(es) to receive fee (if chargeFeeBy is not empty). It can accept a comma separated list of addresses to collect multiple fee amounts into multiple addresses
The origin address (user wallet) of the swap tx. Include this to get access to exclusive pools and rates
ClientID of the party calling the API. Provide a value to identify your client and avoid getting rate limited. If an even higher rate limit is needed, contact bd.
MyAwesomeAppSwap Found
WETH is not configured on this network
Query parameters are malformed
Request body is malformed
feeAmount is greater than amountIn
feeAmount is greater than amountOut
Route not found
amountIn is greater than max allowed
No pool is eligible to find route on
tokenIn / tokenOut can not be found
Chain name. Full list of supported chains available on Docs.
ethereumClientID of the party calling the API. Provide a value to identify your client and avoid getting rate limited. Please use the same ClientID as the source field in the body.
Address from which the swap input tokens will be transferred from
Origin address (user wallet) of the swap tx. Include this to avoid getting rate limited by liquidity sources if you use a fixed sender.
Address to which the swap output tokens will be sent to
Encoded token's permit calldata to swap without approving. The permit's spender should be the routerAddress returned in the Get Swap Route API response. See /permit
Deadline (in Unix time second) for the transaction to be executed. Default will be +20 minute. Cannot be in the past.
This is the amount of slippage the user can accept for his trade. The unit is bps (1/100 of 1%). The value is in ranges [0, 2000], with 10 meaning 0.1%, and 0.1 meaning 0.001%. If no value is provided, slippageTolerance will be set to 0.
If true, the slippage tolerance can be any value. Please use with caution.
If true, call eth_gasEstimate to get rpc-based gas estimation for the transaction. Also helps to detect any potential reverts.
The source of the swap to be recorded on-chain. You should use (and it defaults to be) the same value as the x-client-id in the header, unless you want to track separate sources.
Referral info to include in the swap transaction's ClientData event.
Successfully encoded
WETH is not configured on this network
Query parameters are malformed
Request body is malformed
feeAmount is greater than amountIn
feeAmount is greater than amountOut
Route not found
amountIn is greater than max allowed
No pool is eligible to find route on
tokenIn / tokenOut can not be found
Legacy
Full list of supported chains available on Docs.
Address of the input token
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE in case of native token
Address of the output token
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE in case of native token
Amount of the input token (in wei)
DEX IDs included in the route, separated by comma
Exclude unscalable sources and only use sources that accept scaling input amounts
Determines whether gas costs are accounted for when searching for best route
Custom gas price in wei used when searching for the best swap route. Use result from eth_gasPrice otherwise
This is the amount of slippage the user can accept for his trade. The unit is bps (1/100 of 1%). The value is in ranges [0, 2000], with 10 meaning 0.1%, and 0.1 meaning 0.001%. If no value is provided, slippageTolerance will be set to 0.
Indicates that the API client wants to charge fee by input token (currency_in) or output token (currency_out).
Default is empty whereby no fee is charged.
The API client's wallet address to receive fee (if chargeFeeBy is not empty)
if true, fee is taken in bps of the amount in/out, instead of absolute wei value
Fee amount to be collected.
If isInBps = true, feeAmount is the percentage of fees to take with base unit = 10000, i.e feeAmount = 10 and isInBps = true then fee = 0.1%;
If isInBps = false, feeAmount is the amount of token to take as fee, i.e feeAmount = 10 and isInBps = 'false' then fee = 10 token weis
Deadline (in Unix epoch second) for the transaction to be executed by. Default will be +20 minute. Cannot be in the past.
1744196804Address to receive the output token
Json string to include your client id in the source field if header cannot be used
{"source":"MyAwesomeApp"}Referral info to include in the swap transaction's ClientData event.
Encoded token's permit calldata to swap without approving. The permit's spender should be the routerAddress returned in the Get Swap Route API response. See /permit
If true, the slippage tolerance can be any value. Please use with caution.
ClientID of the party calling the API. Provide a value to identify your client and avoid getting rate limited. If an even higher rate limit is needed, contact bd.
MyAwesomeAppSwap Found
Swap Found
KyberSwap positive slippage surplus collection
Last updated
Was this helpful?