Skip to main content
Version: V1


The KyberSwap dex aggregator API, helps to query which exchanges offers best rates for certain source amount. The off-chain algorithm loops through all the dexes that KyberSwap is monitoring with small portions of amount and then, algorithm splits trade to multiple dexes/pools to obtain the optimal path. Parameters , input/output formats are listed below

Basic GET API:

  • network can be replaced with ethereum, bsc , polygon, avalanche, fantom & cronos
  • dmm(Dynamic Market Maker) refers to KyberSwap

Description of query parameters#

Parameter NameTypeDescription
tokenInstringERC20 token contract address to sell
tokenOutstringERC20 token contract address to buy
amountInintegerbuy amount of ERC20 tokens in wei
saveGasboolean0 = maximize return, 1 = no splitting
gasIncludeboolean0 = doesn't account for transaction fee in finding optimal path, 1= accounts for transaction fee in finding optimal path
dexesstringfetch prices only from selected dexes, eg: pancake, KyberSwap, etc.