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 client identifier field that enables us to understand how the APIs are being utilized. A stricter rate limit will be applied if a clientId is not provided. As a developer integrating with our APIs, please preferably use the same clientID (i.e. company name or your app name) for:
[V1] Get Swap Route
Header: x-client-id
[V1] Post Swap Route For Encoded Data
Header: x-client-id
This will enable us to serve you better as we continuously strive to improve our Aggregator API. For integrators who have previously integrated with our Legacy
API, we highly encourage migrating to the Latest
APIs to ensure access to the latest features as well as improved service quality and efficiency.
[V1] GET
/routes
Header
x-client-id: MyAwesomeApp
[V1] POST
/route/build
Header
x-client-id: MyAwesomeApp
If you're just getting started with the KyberSwap Aggregator, you can refer to our Execute A Swap With The Aggregator API dev guide for information and code samples on how to query and execute swaps at superior rates. Note that there is also a KyberSwap Widget option for integrators who require a simple minimal-code implementation. For existing integrators, please refer to Upgrading To APIv1 for further details on the motivation behind the upgrade as well as the relevant changes to swap flow and parameters.
To support more performant queries and the use of RFQ liquidity sources, KyberSwap highly encourages all integrators to implement the latest API [V1]
version. While both versions of the API remains backwards compatible, only the [V1]
APIs will continue to receive updates and can make use of RFQ liquidity sources, and hence developers are highly encouraged to implement the latest [V1]
APIs to avoid any disruptions as the non-versioned API will eventually be deprecated.
Chain identifiers
The Aggregator APIs require a chain name to be included in the path when calling the APIs:
Ethereum (ChainID: 1) -> ethereum
BSC (ChainID: 56) -> bsc
Arbitrum (ChainID: 42161) -> arbitrum
Polygon PoS (ChainID: 137) -> polygon
Optimism (ChainID: 10) -> optimism
Avalanche (ChainID: 43114) -> avalanche
Base (ChainID: 8453) -> base
zkSync Era (ChainID: 324) -> zksync
Fantom (ChainID: 250) -> fantom
Linea (ChainID: 59144) -> linea
Polygon zkEVM (ChainID: 1101) -> polygon-zkevm
Scroll (ChainID: 534352) -> scroll
Mantle (ChainID: 5000) -> mantle
Blast (ChainID: 81457) -> blast
Sonic (ChainID: 146) -> sonic
Latest
Legacy