Kyberswap (Aggregator)
/getprice
Returns the best swap quotation for the given token pair.
GET
https://api.expand.network/dex/getprice
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
dexId* | String | Refer to the DEX ID page for details. |
path* | String | Comma separated values of token addresses/token symbol whose price is to be fetched. |
amountIn* | String | Amount of token. |
https://api.expand.network/dex/getprice?dexId=2200&path=0xdAC17F958D2ee523a2206206994597C13D831ec7%2C0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2&amountIn=100000000000
{
"status": 200,
"msg": "success",
"data": {
"amountIn": "100000000000",
"path": [
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
],
"amountsOut": [
"100000000000",
"43382075587262580147"
]
}
}
/getliquiditysources
Get the liquidity sources for the specified dex aggregator(on the basis of chain), supported by expand.network.
GET
https://api.expand.network/dex/getliquiditysources
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
dexId* | String | Refer to the DEX ID page for details. |
https://api.expand.network/dex/getliquiditysources?dexId=2200
{
"status": 200,
"msg": "success",
"data": [
"KyberSwap Classic",
"KyberSwap Elastic",
"KyberSwap Limit Order",
"KyberSwap Limit Order V2",
"KyberSwap Professional Market Maker",
"Balancer Weighted",
"Balancer Composable",
"Curve (3pool, aave, saave, hbtc, ren, sbtc, eurs, link)",
"DefiSwap",
"DODO (v2)",
"Fraxswap",
"Lido stETH",
"Lido wstETH",
"Maker PSM",
"Maverick",
"PancakeSwap V2",
"PancakeSwap V3",
"POL",
"Saddle",
"ShibaSwap",
"SushiSwap",
"SushiSwap V3",
"Synapse",
"TraderJoe V21",
"Uniswap (v2)",
"Uniswap (v3)",
"Verse",
"Wombat"
]
}
/swap
Initiate a swap transaction on the DEX providing best swap quote.
POST
https://api.expand.network/dex/swap
Request Body
Name | Type | Description |
---|---|---|
dexId* | String | Refer to the DEX ID page for details. |
path* | Array | Comma-separated values of token addresses/token symbol, inside an array, to swap. |
amountIn* | String | Amount of token to be swapped. |
from* | String | Address of the sender of the token. |
gas* | String | Maximum gas limit provided by the sender, for the transaction. |
rpc | String | Remote procedural call URL. |
slippage | String | Percentage of total swap value. By default, 1. 0 <= slippage value <= 10 |
amountOutMin* | String | Minimum amount accepted as the result of swap. |
to* | String | Address of the recipient of the token. |
gasPriority | String | low, medium or high. |
involveBaseToken | String | If a base token is involved in the swap;
By default, |
{
"dexId": "2200",
"amountIn": "100000",
"amountOutMin": "0",
"path": [
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
],
"to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"gas": "400000",
"deadline": "1706168424"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"to": "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",
"value": "0",
"gas": "400000",
"data": "0xe21fd0e90000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f081470f5c6fbccf48cc4e5b82dd926409dcdd67000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000007a000000000000000000000000000000000000000000000000000000000000004a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b4020000000000000000000000000000000000000000000000000000000066c61b2a000000000000000000000000000000000000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000408cc7a56b0000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8d6855f0a3c26a1b1b2785ba2604758c0878169bc000100000000000000000317000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000400e00deaa000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000b93f696e5c46b6772fc2ff65e459cf9685fac7820000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000179725d316425fb00000000000000000000000000000000000000000000000000000000000000400e00deaa0000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000800000000000000000000000000e3e2781ee4ed14758c04eca5b4cc4a7aee459cd0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000fb0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000039e996700000000000000000000373ac847abb2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000037395e53bf28000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f081470f5c6fbccf48cc4e5b82dd926409dcdd67000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022c7b22536f75726365223a22657870616e64222c22416d6f756e74496e555344223a22302e3130313034303637363930343033313632222c22416d6f756e744f7574555344223a22302e31353830343236373438343932393436222c22526566657272616c223a22222c22466c616773223a302c22416d6f756e744f7574223a223630373235363037373731303538222c2254696d657374616d70223a313732343235373931342c22496e74656772697479496e666f223a7b224b65794944223a2231222c225369676e6174757265223a224d5a586e314e57504c624a466b612f685544636a615655454a71766f4d396d6d774a724b525855505930776a4e47656341535137384a534c38426c655063506d2b65716c4554577773774f644a6d65306a2b516c4b344448357078494c51684850302f7276564a634a4d536e30706f33627549614149423261626f6578357468367050476f6a434f64397a6a746e71474d624146757a6e4142616739396b5958554570675630306632673547685169303050554a7171485759637a314e6b67735941444a7a68426257634c7846623345704a397a315a62747a51667964334e58464150446e4568525562785439536b71526d73445247646f594a58525171524267707549646e534b752b577a7759456565345152486d723253524654577237536871447667347674475462634d707a46634d4645636a6f62497476433633486e2b633939412f676b4a752b62374d54777939686944513d3d227d7d0000000000000000000000000000000000000000",
"referenceId": "b9cbd7f341cd4ac8b8112cee75822a4e"
}
}
With gasPriority:
{
"dexId": "2200",
"amountIn": "100000",
"amountOutMin": "0",
"path": [
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
],
"to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"gas": "400000",
"deadline": "1706168424",
"gasPriority": "low"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"to": "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",
"value": "0",
"gas": "400000",
"data": "0xe21fd0e90000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f081470f5c6fbccf48cc4e5b82dd926409dcdd67000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000007a000000000000000000000000000000000000000000000000000000000000004a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b4020000000000000000000000000000000000000000000000000000000066c61b33000000000000000000000000000000000000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000408cc7a56b0000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8d6855f0a3c26a1b1b2785ba2604758c0878169bc000100000000000000000317000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000400e00deaa000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000b93f696e5c46b6772fc2ff65e459cf9685fac7820000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000179725d316425fb00000000000000000000000000000000000000000000000000000000000000400e00deaa0000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000800000000000000000000000000e3e2781ee4ed14758c04eca5b4cc4a7aee459cd0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000fb0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000039e996700000000000000000000373ac847abb2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000037395e53bf28000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f081470f5c6fbccf48cc4e5b82dd926409dcdd67000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022c7b22536f75726365223a22657870616e64222c22416d6f756e74496e555344223a22302e3130313034303637363930343033313632222c22416d6f756e744f7574555344223a22302e31353830343236373438343932393436222c22526566657272616c223a22222c22466c616773223a302c22416d6f756e744f7574223a223630373235363037373731303538222c2254696d657374616d70223a313732343235373932332c22496e74656772697479496e666f223a7b224b65794944223a2231222c225369676e6174757265223a224d6e377638305a2b7043706c62463347526a7175632f457261717a6a6d7231347272447544677a61715155345a75435071424250586574487674412f56542b37616a4567556c6a2f4948425631796c76486d6c70576e7a5a6952412b3472526f346168516252784d6d2f6a7a56725537574c654d71326e354d655439734e7a7669716949366d726e696f3676693376476556634b6d304b7753737947516f7935386b50462b7465364c79647a596f5059656d67693645765230424a65417975736e6c30564c7445417353712b795647624b4a656d4f51444e33325a6a667a7a464372755446727450396f6b664f39534d656c574632382b7156797934673374734b767572703247695164586c7676674e6b73794b5a4f43366337514c417248556a7335513856684461496976496d586771516542374962624d4354314c707532327558524666675556595542556e6f7047662b6a34513d3d227d7d0000000000000000000000000000000000000000",
"gasPrice": "3291849997",
"referenceId": "a4cb1cdd02624eca90223fa6d6ea283a"
}
}
With Slippage:
{
"dexId": "2200",
"amountIn": "100000",
"amountOutMin": "0",
"path": [
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
],
"to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"gas": "400000",
"deadline": "1706168424",
"slippage": "10"
}
With Slippage:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"to": "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",
"value": "0",
"gas": "400000",
"data": "0xe21fd0e90000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f081470f5c6fbccf48cc4e5b82dd926409dcdd67000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000056000000000000000000000000000000000000000000000000000000000000007a000000000000000000000000000000000000000000000000000000000000004a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b4020000000000000000000000000000000000000000000000000000000066c61b3a000000000000000000000000000000000000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000408cc7a56b0000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8d6855f0a3c26a1b1b2785ba2604758c0878169bc000100000000000000000317000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000400e00deaa000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000b93f696e5c46b6772fc2ff65e459cf9685fac7820000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000179725d316425fb00000000000000000000000000000000000000000000000000000000000000400e00deaa0000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000800000000000000000000000000e3e2781ee4ed14758c04eca5b4cc4a7aee459cd0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000fb0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000039e996700000000000000000000373ac847abb2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b40200000000000000000000000000000000000000000000000000000000000186a00000000000000000000000000000000000000000000000000000372ca4c06e56000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f081470f5c6fbccf48cc4e5b82dd926409dcdd67000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022c7b22536f75726365223a22657870616e64222c22416d6f756e74496e555344223a22302e3130313034303637363930343033313632222c22416d6f756e744f7574555344223a22302e31353830373235353233373637303937222c22526566657272616c223a22222c22466c616773223a302c22416d6f756e744f7574223a223630373235363037373731303538222c2254696d657374616d70223a313732343235373933302c22496e74656772697479496e666f223a7b224b65794944223a2231222c225369676e6174757265223a224158376b32414f524774466f45433274596c42714c2f486d38466b4533506739446c64486d762b536d4a6f617647313049614d49746e2f4834706e2b4336634138376b71363330324e35533956314d50496148447465503173507573546c376e636a7a382f5737515737544457676f3468682f335a3430694b3041502f4d475350516b5578726b76316a67593833596b6176304433424d4a65564d31452f532f705a71384e5267474d78586c4e704536527472526147667a773861357953434f655a6f73396f505a55774d464534656932704436474d56516c2b6c5a785533714b58786a745356644633545635505479662b304a32712b546a4432656152636b38697675573072464377786e495777652f45675233685070583845656b676262547750582f4b494537646c526d4a764d4a774758377951314b794c7669544a6e2f3171566c37416f414e6178362b66503668303671673d3d227d7d0000000000000000000000000000000000000000",
"referenceId": "5d68b15ce6d64a60bf2384ea8aa9af66"
}
}
Last updated