1inch (Aggregator)

/getprice

Returns the best swap quotation for the given token pairs.

GET https://api.expand.network/dex/getprice

Query Parameters

NameTypeDescription

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.

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

NameTypeDescription

rpc

String

Remote procedural call URL.

dexId*

String

Refer to the DEX ID page for details.

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

NameTypeDescription

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

gasPriority

String

low, medium, or high.

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

With gasPriority:

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

With Slippage:

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

Last updated