1inch (Aggregator)
/getprice
Returns the best swap quotation for the given token pairs.
GET https://api.expand.network/dex/getprice
Query Parameters
rpc
String
Remote procedural call URL.
path*
String
Comma separated values of token addresses/token symbol whose price is to be fetched.
amountIn*
String
Amount of token.
slippage
String
Percentage of total swap value. By default, 1.
https://api.expand.network/dex/getprice?path=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE%2C0x6B175474E89094C44Da98b954EedeAC495271d0F&amountIn=1000000000000000000&dexId=1700{
    "status": 200,
    "msg": "success",
    "data": {
        "amountIn": "1000000000000000000",
        "path": [
            "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            "0x6B175474E89094C44Da98b954EedeAC495271d0F"
        ],
        "amountsOut": [
            "1000000000000000000",
            "1987156918504513709869"
        ]
    }
}/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.
https://api.expand.network/dex/getliquiditysources?dexId=1702{
    "status": 200,
    "msg": "success",
    "data": [
        "Aave",
        "Curve",
        "Curve V2",
        "Kyber DMM",
        "1inch Limit Order Protocol V2",
        "1inch Limit Order Protocol V3",
        "SushiSwap",
        "Baguette",
        "Canary",
        "ELK",
        "Lydia",
        "OliveSwap",
        "Pangolin",
        "TraderJoe",
        "Yetti",
        "Thorus",
        "Hakuswap",
        "Platypus",
        "WOOFi",
        "Axial",
        "ElasticSwap",
        "GMX",
        "Nerve Finance",
        "RadioShack",
        "KyberSwap Elastic",
        "SwapSicle",
        "Kyber DMM Static",
        "Aave V3",
        "TraderJoe V2",
        "DODO",
        "WOOFi V2",
        "Trident",
        "TraderJoe V2.1",
        "Nomiswap-epcs",
        "Uniswap V3",
        "Balancer V2",
        "PMM11",
        "Wombat"
    ]
}/swap
Initiate a swap transaction on the DEX providing best swap quote.
POST https://api.expand.network/dex/swap
Request Body
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
gasPriority
String
low, medium, or high.
{
    "dexId": "1700",
    "amountIn": "100000000000000",
    "path": [
        "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "gas": "873376",
    "from": "0x356dB816602c85e2075774bB77D13995c8Bab023"
}{
    "status": 200,
    "msg": "success",
    "data": {
        "from": "0x356db816602c85e2075774bb77d13995c8bab023",
        "to": "0x1111111254eeb25477b68fb85ed929f73a960582",
        "data": "0x0502b1c5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000002b88d0919cc91530000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000180000000000000003b6d0340c3d03e4f041fd4cd388c549ee2a29a9e5075882f8b1ccac8",
        "value": "100000000000000",
        "gas": "873376",
        "gasPrice": "25001512486"
    }
}With gasPriority:
{
    "dexId": "1700",
    "amountIn": "100000000000000",
    "path": [
        "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "gas": "873376",
    "gasPriority": "medium",
    "from": "0x356dB816602c85e2075774bB77D13995c8Bab023"
}With gasPriority:
{
    "status": 200,
    "msg": "success",
    "data": {
        "from": "0x356db816602c85e2075774bb77d13995c8bab023",
        "to": "0x1111111254eeb25477b68fb85ed929f73a960582",
        "data": "0x0502b1c5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000002b88d0919cc91530000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000180000000000000003b6d0340c3d03e4f041fd4cd388c549ee2a29a9e5075882f8b1ccac8",
        "value": "100000000000000",
        "gas": "273379",
        "gasPrice": "25001512486"
    }
}With Slippage:
{
    "dexId": "1700",
    "amountIn": "100000000000000",
    "path": [
        "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "gas": "873376",
    "slippage": "10",
    "from": "0x356dB816602c85e2075774bB77D13995c8Bab023"
}With Slippage:
{
    "status": 200,
    "msg": "success",
    "data": {
        "from": "0x356db816602c85e2075774bb77d13995c8bab023",
        "to": "0x1111111254eeb25477b68fb85ed929f73a960582",
        "data": "0x0502b1c5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000002d72efff94823a90000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000180000000000000003b6d0340a478c2975ab1ea89e8196811f51a7b7ade33eb118b1ccac8",
        "value": "100000000000000",
        "gas": "873376",
        "gasPrice": "50274668539"
    }
}Last updated

