Features
- Route API - Get optimal swap routes across DEXs
- Build API - Get transaction calldata for execution
- Multi-chain - Supports the 19 EVM chains KyberSwap lists as active
Installation
[]
= "0.2"
= { = "1", = ["full"] }
Quick Start
use ;
async
Getting Transaction Data
use ;
// First get route data (routeSummary is kept as raw JSON)
let route_data = client.get_route_data.await?;
// Then build for execution - the summary must be sent back unmodified
let build_request = BuildRouteRequest ;
let tx_data = client.build_route.await?;
println!;
println!;
Supported Chains
Ethereum, BSC, Polygon, Arbitrum, Optimism, Avalanche, Base, Linea, Sonic, Berachain, Unichain, Ronin, HyperEVM, Plasma, Monad, Etherlink, MegaETH, Robinhood Chain, Arc
Chain::all() returns this list. KyberSwap has deactivated Fantom, Scroll,
zkSync, Blast and Mantle, and Polygon zkEVM is no longer listed, so those
variants were removed.
Terms of Service
This is an unofficial client. By using this library, you agree to comply with KyberSwap Terms of Use.
Disclaimer
This crate is not affiliated with or endorsed by Kyber Network.
License
MIT