EVM Swaps
KyberSwap Aggregator EVM APIs
Last updated
KyberSwap Aggregator EVM APIs
Last updated
In order to continuously improve the KyberSwap Aggregator, our APIs implement a clientData
or source
field that enables us to understand how the APIs are being utilized. As a developer integrating with our APIs, please add your clientID (i.e. company name) to the clientData
/source
fields to enable us to serve you better.
[V1]GET
clientData={"source":"yourCompanyNameHere"}
[V2]POST
source="yourCompanyNameHere"
Retrieve the information about a Swap between 2 tokens with encoded data to submit to KyberSwap router contract
Supported chains:
Swap Found
The input amount of tokenIn
, in wei
The input amount of tokenOut
, in wei
Estimated gas fee
Current gas price in Gwei
Current gas price in USD
Estimate of input value, in USD
Estimate of out value, in USD
Estimate of final received value, in USD
Swap path, a 2-dimen array describe how swap is executed
The encoded data to be sent to our router address
The KyberSwap router address
Retrieve the route information about a Swap between 2 tokens. Please use V2 GET
API for a more performant route query. The route returned can then be combined with transaction specific params in the POST
API payload to get the encoded data for submission to the KyberSwap router contract.
Supported chains:
Swap Found
Response code
Response message
Response data
Get the encoded swap route to be forwarded to the KyberSwap router contract. For simplicity, the request body should contain the routeSummary
returned by [V2] Get Swap Route appended with the additional tx parameters.
Supported chains:
The summarised routing data
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 bip. The value is in ranges [0, 2000], 10 means 0.1%. Default value is 50/10000 ~ 0.5%.
Address which the swap input tokens will be debited from
Address which the swap output tokens will be sent to
String to present to your client (i.e. clientID)
Returns the encoded data without price impact checks. For advanced trades.
Successfully encoded
Response code
Response message
Response data for encoded swap