1inch (Aggregator)

Geofencing Notice

Important: This API is geofenced and cannot be accessed within the United States. Any requests originating from the U.S. will be denied.

/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

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

/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

https://api.expand.network/dex/getliquiditysources?dexId=1702

/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

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

gasPriority

String

low, medium, or high.

{
    "dexId": "1700",
    "amountIn": "100000000000000",
    "path": [
        "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "gas": "873376",
    "from": "0x40B38765696e3d5d8d9d834D8AaD4bB6e418E489"
}

With gasPriority:

{
    "dexId": "1700",
    "amountIn": "100000000000000",
    "path": [
        "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "gas": "873376",
    "gasPriority": "medium",
    "from": "0x40B38765696e3d5d8d9d834D8AaD4bB6e418E489"
}

With Slippage:

{
    "dexId": "1700",
    "amountIn": "100000000000000",
    "path": [
        "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "gas": "873376",
    "gasPriority": "medium",
    "from": "0x40B38765696e3d5d8d9d834D8AaD4bB6e418E489",
    "slippage": "10"
}

Last updated