Kyberswap (Aggregator)
/getprice
Returns the best swap quotation for the given token pair.
GET
https://api.expand.network/dex/getprice
Query Parameters
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
/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
rpc
String
Remote procedural call URL.
dexId*
String
Refer to the DEX ID page for details.
https://api.expand.network/dex/getliquiditysources?dexId=2200
/swap
Initiate a swap transaction on the DEX providing best swap quote.
POST
https://api.expand.network/dex/swap
Request Body
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 <= 100
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; 0
for erc20 -> erc20,
1
for base -> erc20 ("from" address should be of equivalent wrapped token), 2
for erc20 -> base ("to" address should be of equivalent wrapped token).
By default, 0
.
ofacCheck
Boolean
if true,
provides insights of the contract and tokens involved in the transaction.
By Default, false
Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet
{
"dexId": "2200",
"amountIn": "100000",
"amountOutMin": "0",
"path": [
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
],
"to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"gas": "400000",
"deadline": "1706168424"
}
With gasPriority:
{
"dexId": "2200",
"amountIn": "100000",
"amountOutMin": "0",
"path": [
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
],
"to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"gas": "400000",
"deadline": "1706168424",
"gasPriority": "low"
}
With Slippage:
{
"dexId": "2200",
"amountIn": "100000",
"amountOutMin": "0",
"path": [
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
],
"to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"gas": "400000",
"deadline": "1706168424",
"slippage": "10"
}
With ofacCheck:
{
"dexId": "2200",
"amountIn": "100000",
"amountOutMin": "0",
"path": [
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
],
"to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"gas": "400000",
"deadline": "1706168424",
"slippage": "10",
"ofacCheck": true
}
Last updated