# Balancer V2

#### Below is the list of tokens we currently support for the mentioned endpoints. We are happy to add support for additional tokens upon request.

<details>

<summary>Supported Mainnet Token Pairs (For add &#x26; remove liquidity)</summary>

1. **WETH/DAI** \
   0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 0x6B175474E89094C44Da98b954EedeAC495271d0F
2. **wstETH/WETH** - **Composable Stable**\
   0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,\
   0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd,\
   0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
3. **ezETH/WETH**\
   0x596192bb6e41802428ac943d2f1476c1af25cc0e,\
   0xbf5495efe5db9ce00f80364c8b423567e58d2110,\
   0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
4. **wstETH/WETH - Stable** \
   0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,\
   0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
5. **rETH/WETH** \
   0xae78736Cd615f374D3085123A210448E74Fc6393, 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
6. **AAVE/wstETH** \
   0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0, 0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9
7. **weETH/ezETH/rswETH**\
   0x848a5564158d84b8a8fb68ab5d004fae11619a54, \
   0xbf5495efe5db9ce00f80364c8b423567e58d2110,\
   0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee,\
   0xfae103dc9cf190ed75350761e95403b7b8afa6c0
8. **osETH/wETH**\
   0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 0xdacf5fa19b1f720111609043ac67a9818262850c,\
   0xf1c9acdc66974dfb6decb12aa385b9cd01190e38
9. **Gyroscope ECLP GYD/sDAI**\
   0x83f20f44975d03b1b09e64809b757c47f942beea, 0xe07f9d810a48ab5c3c914ba3ca53af14e4491e8a
10. **weETH/rETH** \
    0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee,\
    0xae78736cd615f374d3085123a210448e74fc6393
11. **wstETH-rETH-sfrxETH-BPT**\
    0x42ed016f826165c2e5976fe5bc3df540c5ad0af7, 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,\
    0xac3e018457b222d93114458476f3e3416abbe38f,\
    0xae78736cd615f374d3085123a210448e74fc6393
12. **RDNT/WETH**\
    0x137ddb47ee24eaa998a535ab00378d6bfa84f893, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
13. **20WETH-80PSP**\
    0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 0xcafe001067cdef266afb7eb5a286dcfd277f3de5
14. **STG/USDC**\
    0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xaf5191b0de278c7286d6c7cc6ab6bb8a73ba2cd6
15. **20WETH-80ALCX**\
    0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 0xdbdb4d16eda451d0503b854cf79d55697f90c8df
16. **GHO/USDT/USDC**\
    0x40d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f, 0x8353157092ed8be69a9df8f95af097bbf33cb2af,\
    0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,\
    0xdac17f958d2ee523a2206206994597c13d831ec7
17. **COW/GNO** \
    0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB, 0x6810e776880C02933D47DB1b9fc05908e5386b96
18. **ankrETH/wstETH**\
    0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0, 0xdfe6e7e18f6cc65fa13c8d8966013d4fda74b6ba,\
    0xe95a203b1a91a908f9b9ce46459d101078c2c3cb
19. **50wstETH-ACX**\
    0x44108f0223a3c3028f5fe7aec7f9bb2e66bef82f, 0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0
20. **rsETH / ETHx**\
    0x7761b6e0daa04e70637d81f1da7d186c205c2ade, 0xa1290d69c65a6fe4df752f95823fae25cb99e5a7,\
    0xa35b1b31ce002fbf2058d22f30f95d405200a15b
21. **Gyroscope ECLP wstETH/wETH** \
    0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
22. **20 WETH 80 LIT**\
    0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,\
    0xfd0205066521550d7d7ab19da8f72bb004b4c341
23. **50rETH-50RPL**\
    0xae78736cd615f374d3085123a210448e74fc6393, 0xd33526068d116ce69f19a9ee46f0bd304f21a51f
24. **wstETH-rETH-sfrxETH**\
    0x5aee1e99fe86960377de9f88689616916d5dcabe,\
    0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0,\
    0xac3e018457b222d93114458476f3e3416abbe38f,\
    0xae78736cd615f374d3085123a210448e74fc6393
25. **50KNC-25WETH-25USDC**\
    0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,\
    0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,\
    0xdefa4e8a7bcba345f687a2f1456f5edd9ce97202<br>

</details>

<details>

<summary>Supported Testnet Token Pairs (For add &#x26; remove liquidity)</summary>

1. **USDC/WETH** \
   0xe0C9275E44Ea80eF17579d33c55136b7DA269aEb, 0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1
2. **wstETH/WETH** \
   0x6320cD32aA674d2898A68ec82e869385Fc5f7E2f, 0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1

</details>

### /getprice

Returns the swap quotation for the given token pair.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/getprice`

#### Query Parameters

| Name                                       | Type   | Description                                                                  |
| ------------------------------------------ | ------ | ---------------------------------------------------------------------------- |
| rpc                                        | String | Remote procedural call URL.                                                  |
| dexId<mark style="color:red;">\*</mark>    | String | Refer to the [DEX ID](broken://pages/8x8qwIu19Aq8uFsjOXvI) page for details. |
| path<mark style="color:red;">\*</mark>     | String | Comma separated values of token addresses whose price is to be fetched.      |
| amountIn<mark style="color:red;">\*</mark> | String | Amount of token.                                                             |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/dex/getprice?dexId=1400&path=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2,0x6B175474E89094C44Da98b954EedeAC495271d0F&amountIn=10000000000000000000
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "amountIn": "10000000000000000000",
        "path": [
            "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
            "0x6B175474E89094C44Da98b954EedeAC495271d0F"
        ],
        "amountsOut": [
            "10000000000000000000",
            "15680384060944301565791"
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### /getuserliquidity

Returns the balance of a particular token pair of an account.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/getuserliquidity`

#### Query Parameters

| Name                                      | Type   | Description                                                              |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------ |
| rpc                                       | String | Remote procedural call URL.                                              |
| tokenA<mark style="color:red;">\*</mark>  | String | Address of token.                                                        |
| address<mark style="color:red;">\*</mark> | String | Public address of liquidity provider.                                    |
| dexId<mark style="color:red;">\*</mark>   | String | Refer to [DEX ID](broken://pages/8x8qwIu19Aq8uFsjOXvI) page for details. |
| tokenB<mark style="color:red;">\*</mark>  | String | Address of token.                                                        |
| tokenC                                    | String | Address of token.                                                        |
| tokenD                                    | String | Address of token.                                                        |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/dex/getuserliquidity?tokenA=0x848a5564158d84b8a8fb68ab5d004fae11619a54&tokenB=0xbf5495efe5db9ce00f80364c8b423567e58d2110&address=0xBA12222222228d8Ba445958a75a0704d566BF2C8&dexId=1400&tokenC=0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee&tokenD=0xfae103dc9cf190ed75350761e95403b7b8afa6c0
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "pairAddress": "0x848a5564158d84b8A8fb68ab5D004Fae11619A54",
        "tokenA": "2.5961484292651062e+33",
        "tokenB": "518246888620238960000",
        "tokenC": "405657635213650800000",
        "tokenD": "1.9980975440730658e+21",
        "liquidity": "2596148429268034432222942162585746"
    }
}
```

{% endtab %}
{% endtabs %}

### /getpoolliquidity

Returns the total liquidity for a specified pool.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/getpoolliquidity`

#### Query Parameters

| Name                                          | Type   | Description                                                              |
| --------------------------------------------- | ------ | ------------------------------------------------------------------------ |
| rpc                                           | String | Remote procedural call URL.                                              |
| poolAddress<mark style="color:red;">\*</mark> | String | Pool address whose liquidity is to be fetched.                           |
| dexId<mark style="color:red;">\*</mark>       | String | Refer to [DEX ID](broken://pages/8x8qwIu19Aq8uFsjOXvI) page for details. |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/dex/getpoolliquidity?dexId=1400&poolAddress=0x25Accb7943Fd73Dda5E23bA6329085a3C24bfb6a
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "totalLiquidity": "21939886662955269687535"
    }
}
```

{% endtab %}
{% endtabs %}

### /gettokenliquidity

Returns the individual token liquidity within the specified liquidity pool.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/gettokenliquidity`

#### Query Parameters

| Name                                          | Type   | Description                                                              |
| --------------------------------------------- | ------ | ------------------------------------------------------------------------ |
| rpc                                           | String | Remote procedural call URL.                                              |
| poolAddress<mark style="color:red;">\*</mark> | String | The pool address.                                                        |
| dexId<mark style="color:red;">\*</mark>       | String | Refer to [DEX ID](broken://pages/8x8qwIu19Aq8uFsjOXvI) page for details. |

{% tabs %}
{% tab title="Sample Request" %}

```
https://api.expand.network/dex/gettokenliquidity?dexId=1400&poolAddress=0x25Accb7943Fd73Dda5E23bA6329085a3C24bfb6a
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "wstETH": "241859600516947967997",
        "bb-a-USD": "503400928836915874116420"
    }
}
```

{% endtab %}
{% endtabs %}

### /getindividualposition

Returns the liquidity position for a specified user address across all the pools for the DEX.&#x20;

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/getindividualposition`

#### Query Parameters

| Name                                      | Type   | Description                                                                     |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------------- |
| rpc                                       | String | Remote procedural call URL.                                                     |
| address<mark style="color:red;">\*</mark> | String | The public address of the liquidity holder.                                     |
| dexId<mark style="color:red;">\*</mark>   | String | Refer to [DEX ID](broken://pages/8x8qwIu19Aq8uFsjOXvI) page for details.        |
| poolAddresses                             | String | The pool Addresses whose liquidity is to be fetched. *(Comma-separated vaules)* |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/dex/getindividualposition?address=0xc29562b045D80fD77c69Bec09541F5c16fe20d9d&dexId=1400&poolAddresses=0xc29562b045D80fD77c69Bec09541F5c16fe20d9d
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "aggregatedLiquidity": "0",
        "poolAddresses": {
            "WETHAURA": {
                "0xc29562b045D80fD77c69Bec09541F5c16fe20d9d": "0"
            }
        }
    }
}
```

{% endtab %}
{% endtabs %}

### /getpool

&#x20;Returns poolAddress, tickSpacing, poolFees, tokensLiquidity and liquidity data based on tokenA and tokenB

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/getpool`

#### Query Parameter

| Name                                     | Type   | Description                                                              |
| ---------------------------------------- | ------ | ------------------------------------------------------------------------ |
| dexId<mark style="color:red;">\*</mark>  | String | Refer to [DEX ID](broken://pages/8x8qwIu19Aq8uFsjOXvI) page for details. |
| tokenA<mark style="color:red;">\*</mark> | String | TokenA address                                                           |
| tokenB<mark style="color:red;">\*</mark> | String | TokenB address                                                           |
| tokenC                                   | String | TokenC address                                                           |
| tokenD                                   | String | TokenD address                                                           |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/dex/getpool?dexId=1400&tokenB=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&tokenA=0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "poolAddress": "0xf01b0684C98CD7aDA480BFDF6e43876422fa1Fc1",
            "poolFees": "NA",
            "tickSpacing": "NA",
            "tokensLiquidity": {
                "wstETH": "608794356880640390",
                "WETH": "143547732443847"
            },
            "liquidity": "709023940579790121"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

### /gethistoricalpoolchartdata

Get the data the OHCLV (Open, High, Close, Low, and Volume) within the specified time interval for pool on Balancer V2. Available on Ethereum only.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/gethistoricalpoolchartdata`

#### Query Parameter

| Name                                          | Type   | Description                                                                                                                                                                           |
| --------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dexId<mark style="color:red;">\*</mark>       | String | Refer to [DEX ID](broken://pages/8x8qwIu19Aq8uFsjOXvI) page for details.                                                                                                              |
| interval                                      | String | <p>A number values representing the number of unix epoch seconds or in format of . For example 1m,1h<br>By default 15m</p>                                                            |
| limit                                         | String | <p>No of iteration.<br>Start limit is 100 and maximum limit is 500.<br>By default 100</p>                                                                                             |
| poolAddress<mark style="color:red;">\*</mark> | String | <p>Pool address whose transactions is to be fetched. <br>Note: We supported pool mentioned in the <a href="#supported-mainnet-token-pairs-for-add-and-remove-liquidity">list</a>.</p> |
| rpc                                           | String | Remote procedural call URL.                                                                                                                                                           |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/dex/gethistoricalpoolchartdata?dexId=1400&poolAddress=0x3de27efa2f1aa663ae5d458857e731c129069f29&interval=15m&limit=100
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "pair": "wstETH/AAVE",
        "chartData": [
            {
                "1719839904-1719840804": {
                    "open": "41.064132382011408",
                    "high": "41.06413238201141",
                    "low": "41.06413238201141",
                    "close": "41.064132382011408",
                    "volume": "24439.663082753745"
                }
            },
            {
                "1719840804-1719841704": {
                    "open": "41.064132382011408",
                    "high": "41.064132382011408",
                    "close": "41.064132382011408",
                    "low": "41.064132382011408",
                    "volume": "0"
                }
            },
            {
                "1719841704-1719842604": {
                    "open": "41.064132382011408",
                    "high": "41.29213830872066",
                    "low": "41.06413238201141",
                    "close": "41.292138308720659",
                    "volume": "221588.52297509776"
                }
            },
            {
                "1719842604-1719843504": {
                    "open": "41.292138308720659",
                    "high": "41.467216162192926",
                    "low": "41.29213830872066",
                    "close": "41.467216162192926",
                    "volume": "142778.9043970995"
                }
            },
            {
                "1719843504-1719844404": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719844404-1719845304": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719845304-1719846204": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719846204-1719847104": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719847104-1719848004": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719848004-1719848904": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719848904-1719849804": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719849804-1719850704": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719850704-1719851604": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719851604-1719852504": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719852504-1719853404": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719853404-1719854304": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719854304-1719855204": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719855204-1719856104": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719856104-1719857004": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719857004-1719857904": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719857904-1719858804": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "close": "41.467216162192926",
                    "low": "41.467216162192926",
                    "volume": "0"
                }
            },
            {
                "1719858804-1719859704": {
                    "open": "41.467216162192926",
                    "high": "41.467216162192926",
                    "low": "41.031012262141864",
                    "close": "41.031012262141864",
                    "volume": "25713.604786159434"
                }
            },
            {
                "1719859704-1719860604": {
                    "open": "41.031012262141864",
                    "high": "41.031012262141864",
                    "close": "41.031012262141864",
                    "low": "41.031012262141864",
                    "volume": "0"
                }
            },
            {
                "1719860604-1719861504": {
                    "open": "41.031012262141864",
                    "high": "41.031012262141864",
                    "close": "41.031012262141864",
                    "low": "41.031012262141864",
                    "volume": "0"
                }
            },
            {
                "1719861504-1719862404": {
                    "open": "41.031012262141864",
                    "high": "41.08198277472719",
                    "low": "41.031012262141864",
                    "close": "41.081982774727187",
                    "volume": "85995.86448448348"
                }
            },
            {
                "1719862404-1719863304": {
                    "open": "41.081982774727187",
                    "high": "41.081982774727187",
                    "close": "41.081982774727187",
                    "low": "41.081982774727187",
                    "volume": "0"
                }
            },
            {
                "1719863304-1719864204": {
                    "open": "41.081982774727187",
                    "high": "41.08198277472719",
                    "low": "40.90754754307026",
                    "close": "40.907547543070258",
                    "volume": "85995.1874796135"
                }
            },
            {
                "1719864204-1719865104": {
                    "open": "40.907547543070258",
                    "high": "40.907547543070258",
                    "close": "40.907547543070258",
                    "low": "40.907547543070258",
                    "volume": "0"
                }
            },
            {
                "1719865104-1719866004": {
                    "open": "40.907547543070258",
                    "high": "40.907547543070258",
                    "close": "40.907547543070258",
                    "low": "40.907547543070258",
                    "volume": "0"
                }
            },
            {
                "1719866004-1719866904": {
                    "open": "40.907547543070258",
                    "high": "40.907547543070258",
                    "close": "40.907547543070258",
                    "low": "40.907547543070258",
                    "volume": "0"
                }
            },
            {
                "1719866904-1719867804": {
                    "open": "40.907547543070258",
                    "high": "40.907547543070258",
                    "close": "40.907547543070258",
                    "low": "40.907547543070258",
                    "volume": "0"
                }
            },
            {
                "1719867804-1719868704": {
                    "open": "40.907547543070258",
                    "high": "40.907547543070258",
                    "close": "40.907547543070258",
                    "low": "40.907547543070258",
                    "volume": "0"
                }
            },
            {
                "1719868704-1719869604": {
                    "open": "40.907547543070258",
                    "high": "40.907547543070258",
                    "close": "40.907547543070258",
                    "low": "40.907547543070258",
                    "volume": "0"
                }
            },
            {
                "1719869604-1719870504": {
                    "open": "40.907547543070258",
                    "high": "40.907547543070258",
                    "close": "40.907547543070258",
                    "low": "40.907547543070258",
                    "volume": "0"
                }
            },
            {
                "1719870504-1719871404": {
                    "open": "40.907547543070258",
                    "high": "40.907547543070258",
                    "close": "40.907547543070258",
                    "low": "40.907547543070258",
                    "volume": "0"
                }
            },
            {
                "1719871404-1719872304": {
                    "open": "40.907547543070258",
                    "high": "40.907547543070258",
                    "close": "40.907547543070258",
                    "low": "40.907547543070258",
                    "volume": "0"
                }
            },
            {
                "1719872304-1719873204": {
                    "open": "40.907547543070258",
                    "high": "40.90754754307026",
                    "low": "40.62297793379955",
                    "close": "40.622977933799547",
                    "volume": "34397.20797441442"
                }
            },
            {
                "1719873204-1719874104": {
                    "open": "40.622977933799547",
                    "high": "40.62297793379955",
                    "low": "40.5713593821584",
                    "close": "40.571359382158398",
                    "volume": "17198.746133980247"
                }
            },
            {
                "1719874104-1719875004": {
                    "open": "40.571359382158398",
                    "high": "40.571359382158398",
                    "close": "40.571359382158398",
                    "low": "40.571359382158398",
                    "volume": "0"
                }
            },
            {
                "1719875004-1719875904": {
                    "open": "40.571359382158398",
                    "high": "40.571359382158398",
                    "close": "40.571359382158398",
                    "low": "40.571359382158398",
                    "volume": "0"
                }
            },
            {
                "1719875904-1719876804": {
                    "open": "40.571359382158398",
                    "high": "40.571359382158398",
                    "close": "40.571359382158398",
                    "low": "40.571359382158398",
                    "volume": "0"
                }
            },
            {
                "1719876804-1719877704": {
                    "open": "40.571359382158398",
                    "high": "40.571359382158398",
                    "close": "40.571359382158398",
                    "low": "40.571359382158398",
                    "volume": "0"
                }
            },
            {
                "1719877704-1719878604": {
                    "open": "40.571359382158398",
                    "high": "41.05025398539319",
                    "low": "40.5713593821584",
                    "close": "41.050253985393191",
                    "volume": "2104457.824647459"
                }
            },
            {
                "1719878604-1719879504": {
                    "open": "41.050253985393191",
                    "high": "41.13993945355519",
                    "low": "41.05025398539319",
                    "close": "41.139939453555193",
                    "volume": "1612244.078705859"
                }
            },
            {
                "1719879504-1719880404": {
                    "open": "41.139939453555193",
                    "high": "41.139939453555193",
                    "close": "41.139939453555193",
                    "low": "41.139939453555193",
                    "volume": "0"
                }
            },
            {
                "1719880404-1719881304": {
                    "open": "41.139939453555193",
                    "high": "41.139939453555193",
                    "close": "41.139939453555193",
                    "low": "41.139939453555193",
                    "volume": "0"
                }
            },
            {
                "1719881304-1719882204": {
                    "open": "41.139939453555193",
                    "high": "41.139939453555193",
                    "close": "41.139939453555193",
                    "low": "41.139939453555193",
                    "volume": "0"
                }
            },
            {
                "1719882204-1719883104": {
                    "open": "41.139939453555193",
                    "high": "41.15738777330809",
                    "low": "41.13993945355519",
                    "close": "41.157387773308088",
                    "volume": "453333.9070743636"
                }
            },
            {
                "1719883104-1719884004": {
                    "open": "41.157387773308088",
                    "high": "41.19794631112469",
                    "low": "41.15738777330809",
                    "close": "41.197946311124689",
                    "volume": "823189.9204179838"
                }
            },
            {
                "1719884004-1719884904": {
                    "open": "41.197946311124689",
                    "high": "41.197946311124689",
                    "close": "41.197946311124689",
                    "low": "41.197946311124689",
                    "volume": "0"
                }
            },
            {
                "1719884904-1719885804": {
                    "open": "41.197946311124689",
                    "high": "41.197946311124689",
                    "close": "41.197946311124689",
                    "low": "41.197946311124689",
                    "volume": "0"
                }
            },
            {
                "1719885804-1719886704": {
                    "open": "41.197946311124689",
                    "high": "41.197946311124689",
                    "close": "41.197946311124689",
                    "low": "41.197946311124689",
                    "volume": "0"
                }
            },
            {
                "1719886704-1719887604": {
                    "open": "41.197946311124689",
                    "high": "41.22546954413207",
                    "low": "41.19794631112469",
                    "close": "41.225469544132068",
                    "volume": "574040.9247605792"
                }
            },
            {
                "1719887604-1719888504": {
                    "open": "41.225469544132068",
                    "high": "41.24607310926254",
                    "low": "41.22546954413207",
                    "close": "41.246073109262539",
                    "volume": "257561.3386499036"
                }
            },
            {
                "1719888504-1719889404": {
                    "open": "41.246073109262539",
                    "high": "41.24607310926254",
                    "low": "40.83442224556452",
                    "close": "40.834422245564518",
                    "volume": "6508.60837328465"
                }
            },
            {
                "1719889404-1719890304": {
                    "open": "40.834422245564518",
                    "high": "40.834422245564518",
                    "close": "40.834422245564518",
                    "low": "40.834422245564518",
                    "volume": "0"
                }
            },
            {
                "1719890304-1719891204": {
                    "open": "40.834422245564518",
                    "high": "40.834422245564518",
                    "close": "40.834422245564518",
                    "low": "40.834422245564518",
                    "volume": "0"
                }
            },
            {
                "1719891204-1719892104": {
                    "open": "40.834422245564518",
                    "high": "40.83442224556452",
                    "low": "40.717142516591004",
                    "close": "40.717142516591004",
                    "volume": "60141.129374726"
                }
            },
            {
                "1719892104-1719893004": {
                    "open": "40.717142516591004",
                    "high": "40.717142516591004",
                    "close": "40.717142516591004",
                    "low": "40.717142516591004",
                    "volume": "0"
                }
            },
            {
                "1719893004-1719893904": {
                    "open": "40.717142516591004",
                    "high": "40.717142516591004",
                    "close": "40.717142516591004",
                    "low": "40.717142516591004",
                    "volume": "0"
                }
            },
            {
                "1719893904-1719894804": {
                    "open": "40.717142516591004",
                    "high": "40.717142516591004",
                    "close": "40.717142516591004",
                    "low": "40.717142516591004",
                    "volume": "0"
                }
            },
            {
                "1719894804-1719895704": {
                    "open": "40.717142516591004",
                    "high": "41.14523010898722",
                    "low": "40.717142516591004",
                    "close": "41.096508730377209",
                    "volume": "5084441.447006281"
                }
            },
            {
                "1719895704-1719896604": {
                    "open": "41.096508730377209",
                    "high": "41.28899695517518",
                    "low": "41.09650873037721",
                    "close": "41.288996955175179",
                    "volume": "3432359.522578925"
                }
            },
            {
                "1719896604-1719897504": {
                    "open": "41.288996955175179",
                    "high": "41.288996955175179",
                    "close": "41.288996955175179",
                    "low": "41.288996955175179",
                    "volume": "0"
                }
            },
            {
                "1719897504-1719898404": {
                    "open": "41.288996955175179",
                    "high": "41.288996955175179",
                    "close": "41.288996955175179",
                    "low": "41.288996955175179",
                    "volume": "0"
                }
            },
            {
                "1719898404-1719899304": {
                    "open": "41.288996955175179",
                    "high": "41.288996955175179",
                    "close": "41.288996955175179",
                    "low": "41.288996955175179",
                    "volume": "0"
                }
            },
            {
                "1719899304-1719900204": {
                    "open": "41.288996955175179",
                    "high": "41.288996955175179",
                    "close": "41.288996955175179",
                    "low": "41.288996955175179",
                    "volume": "0"
                }
            },
            {
                "1719900204-1719901104": {
                    "open": "41.288996955175179",
                    "high": "41.288996955175179",
                    "close": "41.288996955175179",
                    "low": "41.288996955175179",
                    "volume": "0"
                }
            },
            {
                "1719901104-1719902004": {
                    "open": "41.288996955175179",
                    "high": "41.288996955175179",
                    "close": "41.288996955175179",
                    "low": "41.288996955175179",
                    "volume": "0"
                }
            },
            {
                "1719902004-1719902904": {
                    "open": "41.288996955175179",
                    "high": "41.288996955175179",
                    "close": "41.288996955175179",
                    "low": "41.288996955175179",
                    "volume": "0"
                }
            },
            {
                "1719902904-1719903804": {
                    "open": "41.288996955175179",
                    "high": "41.288996955175179",
                    "close": "41.288996955175179",
                    "low": "41.288996955175179",
                    "volume": "0"
                }
            },
            {
                "1719903804-1719904704": {
                    "open": "41.288996955175179",
                    "high": "41.288996955175179",
                    "close": "41.288996955175179",
                    "low": "41.288996955175179",
                    "volume": "0"
                }
            },
            {
                "1719904704-1719905604": {
                    "open": "41.288996955175179",
                    "high": "41.288996955175179",
                    "close": "41.288996955175179",
                    "low": "41.288996955175179",
                    "volume": "0"
                }
            },
            {
                "1719905604-1719906504": {
                    "open": "41.288996955175179",
                    "high": "41.288996955175179",
                    "close": "41.288996955175179",
                    "low": "41.288996955175179",
                    "volume": "0"
                }
            },
            {
                "1719906504-1719907404": {
                    "open": "41.288996955175179",
                    "high": "41.288996955175179",
                    "close": "41.288996955175179",
                    "low": "41.288996955175179",
                    "volume": "0"
                }
            },
            {
                "1719907404-1719908304": {
                    "open": "41.288996955175179",
                    "high": "41.54919609302778",
                    "low": "41.28899695517518",
                    "close": "41.549196093027781",
                    "volume": "345286.01712099643"
                }
            },
            {
                "1719908304-1719909204": {
                    "open": "41.549196093027781",
                    "high": "41.549196093027781",
                    "close": "41.549196093027781",
                    "low": "41.549196093027781",
                    "volume": "0"
                }
            },
            {
                "1719909204-1719910104": {
                    "open": "41.549196093027781",
                    "high": "41.549196093027781",
                    "close": "41.549196093027781",
                    "low": "41.549196093027781",
                    "volume": "0"
                }
            },
            {
                "1719910104-1719911004": {
                    "open": "41.549196093027781",
                    "high": "41.99939215611474",
                    "low": "41.54919609302778",
                    "close": "41.999392156114737",
                    "volume": "9138942.1174517"
                }
            },
            {
                "1719911004-1719911904": {
                    "open": "41.999392156114737",
                    "high": "41.999392156114737",
                    "close": "41.999392156114737",
                    "low": "41.999392156114737",
                    "volume": "0"
                }
            },
            {
                "1719911904-1719912804": {
                    "open": "41.999392156114737",
                    "high": "41.999392156114737",
                    "close": "41.999392156114737",
                    "low": "41.999392156114737",
                    "volume": "0"
                }
            },
            {
                "1719912804-1719913704": {
                    "open": "41.999392156114737",
                    "high": "42.03644038097751",
                    "low": "41.99939215611474",
                    "close": "42.036440380977510",
                    "volume": "841782.5677245092"
                }
            },
            {
                "1719913704-1719914604": {
                    "open": "42.036440380977510",
                    "high": "42.036440380977510",
                    "close": "42.036440380977510",
                    "low": "42.036440380977510",
                    "volume": "0"
                }
            },
            {
                "1719914604-1719915504": {
                    "open": "42.036440380977510",
                    "high": "42.036440380977510",
                    "close": "42.036440380977510",
                    "low": "42.036440380977510",
                    "volume": "0"
                }
            },
            {
                "1719915504-1719916404": {
                    "open": "42.036440380977510",
                    "high": "42.10029101106189",
                    "low": "42.03644038097751",
                    "close": "42.100291011061891",
                    "volume": "860301.816796245"
                }
            },
            {
                "1719916404-1719917304": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719917304-1719918204": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719918204-1719919104": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719919104-1719920004": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719920004-1719920904": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719920904-1719921804": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719921804-1719922704": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719922704-1719923604": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719923604-1719924504": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719924504-1719925404": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719925404-1719926304": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719926304-1719927204": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719927204-1719928104": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719928104-1719929004": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            },
            {
                "1719929004-1719929904": {
                    "open": "42.100291011061891",
                    "high": "42.100291011061891",
                    "close": "42.100291011061891",
                    "low": "42.100291011061891",
                    "volume": "0"
                }
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### /swap

Initiate a swap transaction on a specified DEX.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/dex/swap`

#### Request Body

<table><thead><tr><th width="177">Name</th><th width="146">Type</th><th>Description</th></tr></thead><tbody><tr><td>dexId<mark style="color:red;">*</mark></td><td>String</td><td>Refer to the <a href="/pages/8x8qwIu19Aq8uFsjOXvI">DEX ID</a> page for details. </td></tr><tr><td>path<mark style="color:red;">*</mark></td><td>Array</td><td>Comma-separated values of token addresses, inside an array, to swap.</td></tr><tr><td>amountIn<mark style="color:red;">*</mark></td><td>String</td><td>Amount of token to be swapped.</td></tr><tr><td>from<mark style="color:red;">*</mark></td><td>String</td><td>Address of the sender of the token.</td></tr><tr><td>gas</td><td>String</td><td>Maximum gas limit provided by the sender, for the transaction.</td></tr><tr><td>rpc</td><td>String</td><td>Remote procedural call URL.</td></tr><tr><td>swapKind<mark style="color:red;">*</mark></td><td>String</td><td>The type of batch swap we want to perform.</td></tr><tr><td>deadline<mark style="color:red;">*</mark></td><td>String</td><td>Deadline for the transaction to be executed (UNIX Timestamp). </td></tr><tr><td>gasPriority</td><td>String</td><td>low, medium, or high.</td></tr><tr><td>slippage</td><td>String</td><td><p>Percentage of total swap value. <br>By default, 1.</p><p>0 &#x3C;= slippage  value &#x3C;= 100</p></td></tr></tbody></table>

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "dexId": "1400",
    "swapKind": "0",
    "path": [
        "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
        "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
    ],
    "amountIn": "100000",
    "gas": "800000",
    "from": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
    "deadline": "1668973383"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
        "to": "0xba12222222228d8ba445958a75a0704d566bf2c8",
        "value": "0",
        "gas": "800000",
        "estimationCheck": true,
        "data": "0x945bcec90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000003000000000000000000000000004c99d660a51d41be5d47d66a3d89d5b83d92f27e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c99d660a51d41be5d47d66a3d89d5b83d92f27e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000637a834700000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010087a867f5d240a782d43d90b6b06dea470f3f8f220002000000000000000005160000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000003b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000c00e94cb662c3520282e6f5717214004a7f268880000000000000000000000007fc66500c84a76ad7e9c93437bfc5ac33e2ddae900000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000460f1f0000000000000000000000000000000000000000000000000000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7960"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}
**With gasPriority:**

```json
{
    "dexId": "1400",
    "swapKind": "0",
    "path": [
        "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
        "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
    ],
    "amountIn": "100000",
    "gas": "800000",
    "gasPriority": "medium",
    "from": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
    "deadline": "1668973383"
}
```

{% endtab %}

{% tab title="Sample Response" %}
**With gasPriority:**

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
        "to": "0xba12222222228d8ba445958a75a0704d566bf2c8",
        "value": "0",
        "gas": "800000",
        "data": "0x945bcec90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000003000000000000000000000000004c99d660a51d41be5d47d66a3d89d5b83d92f27e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c99d660a51d41be5d47d66a3d89d5b83d92f27e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000637a834700000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010087a867f5d240a782d43d90b6b06dea470f3f8f220002000000000000000005160000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000003b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000c00e94cb662c3520282e6f5717214004a7f268880000000000000000000000007fc66500c84a76ad7e9c93437bfc5ac33e2ddae900000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000460f1f0000000000000000000000000000000000000000000000000000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7960",
        "gasPrice": "19734722723"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}
**With slippage:**&#x20;

```json
{
    "dexId": "1400",
    "swapKind": "0",
    "path": [
        "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
        "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
    ],
    "amountIn": "100000",
    "gas": "800000",
    "slippage": "1",
    "from": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
    "deadline": "1668973383"
}
```

{% endtab %}

{% tab title="Sample Response" %}
**With slippage:**&#x20;

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
        "to": "0xba12222222228d8ba445958a75a0704d566bf2c8",
        "value": "0",
        "gas": "800000",
        "data": "0x945bcec90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000003000000000000000000000000004c99d660a51d41be5d47d66a3d89d5b83d92f27e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c99d660a51d41be5d47d66a3d89d5b83d92f27e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000637a834700000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010087a867f5d240a782d43d90b6b06dea470f3f8f220002000000000000000005160000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000003b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000c00e94cb662c3520282e6f5717214004a7f268880000000000000000000000007fc66500c84a76ad7e9c93437bfc5ac33e2ddae900000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000460f1f0000000000000000000000000000000000000000000000000000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7960"
    }
}
```

{% endtab %}
{% endtabs %}

### /addliquidity

Add liquidity to a specified pool in a specified DEX.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/dex/addliquidity`

#### Request Body

| Name                                                  | Type    | Description                                                                                 |
| ----------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------- |
| dexId<mark style="color:red;">\*</mark>               | String  | Refer to the [DEX ID](broken://pages/8x8qwIu19Aq8uFsjOXvI) page for details.                |
| path<mark style="color:red;">\*</mark>                | Array   | Comma separated values of token addresses.                                                  |
| amountIn<mark style="color:red;">\*</mark>            | Array   | Amount of tokens to add liquidity.                                                          |
| amountOut<mark style="color:red;">\*</mark>           | String  | Amount of tokens accepted as a result of the transaction.                                   |
| from<mark style="color:red;">\*</mark>                | 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.                                                                 |
| fromInternalBalance<mark style="color:red;">\*</mark> | Boolean | `True` if sending from internal token balances. `False` if sending ERC20.                   |
| to<mark style="color:red;">\*</mark>                  | String  | Address of the recipient of the token.                                                      |
| gasPriority                                           | String  | low, medium, or high.                                                                       |
| slippage                                              | String  | <p>Percentage of total swap value. <br>By default, 1.</p><p>0 <= slippage  value <= 100</p> |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "dexId": "1400",
    "path": ["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0x6B175474E89094C44Da98b954EedeAC495271d0F"],
    "amountIn": ["0","100000000"],
    "amountOut": "2331262690208301876",
    "fromInternalBalance": false,
    "gas": "2307200",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
        "value": "0",
        "gas": "2307200",
        "data": "0xb95cac280b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a00000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000205a4f10affcc33400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000005f5e1000000000000000000000000000000000000000000000000000000000000000000",
        "referenceId": "f0011836bfdf441d88eda385c2171e3f"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}
**With gasPriority:**

```json
{
    "dexId": "1400",
    "amountIn": [
        "1000000000000000000",
        "1000000000000000000"
    ],
    "amountOut": "0",
    "path": [
        "0x6B175474E89094C44Da98b954EedeAC495271d0F",
        "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
    ],
    "to": "0xDeBB1a42a27051FD18d6d6C2055A44d330A4D80a",
    "deadline": "1710209834351",
    "from": "0xDeBB1a42a27051FD18d6d6C2055A44d330A4D80a",
    "gas": "273376",
    "fromInternalBalance": false,
    "gasPriority": "low"
}
```

{% endtab %}

{% tab title="Sample Response" %}
**With gasPriority:**

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xDeBB1a42a27051FD18d6d6C2055A44d330A4D80a",
        "to": "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
        "value": "0",
        "gas": "273376",
        "data": "0xb95cac280b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a000000000000000000000000debb1a42a27051fd18d6d6c2055a44d330a4d80a000000000000000000000000debb1a42a27051fd18d6d6c2055a44d330a4d80a0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a7640000",
        "gasPrice": "2212191686",
        "referenceId": "b2a9bcc354d745b5a601828a4c361cb2"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}
**With slippage:**

```json
{
    "dexId": "1400",
    "path": [
        "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "amountIn": [
        "0",
        "100000000"
    ],
    "amountOut": "2331262690208301876",
    "fromInternalBalance": false,
    "gas": "2307200",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "slippage": "7.02"
}
```

{% endtab %}

{% tab title="Sample Response" %}
**With slippage:**

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
        "value": "0",
        "gas": "2307200",
        "data": "0xb95cac280b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a00000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000001e14e409521f660000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000005f5e1000000000000000000000000000000000000000000000000000000000000000000",
        "referenceId": "0aa88b50c73f4970b77afe3cf8d63826"
    }
}
```

{% endtab %}
{% endtabs %}

### /removeliquidity

Remove liquidity from a specified pool for a specified DEX.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/dex/removeliquidity`

#### Request Body

| Name                                                | Type    | Description                                                                                 |
| --------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------- |
| dexId<mark style="color:red;">\*</mark>             | String  | Refer to the [DEX ID](broken://pages/8x8qwIu19Aq8uFsjOXvI) page for details.                |
| path<mark style="color:red;">\*</mark>              | Array   | Comma separated values of token addresses.                                                  |
| amountIn<mark style="color:red;">\*</mark>          | String  | Amount of tokens to add liquidity.                                                          |
| amountOut<mark style="color:red;">\*</mark>         | Array   | Amount of tokens accepted as a result of the transaction.                                   |
| from<mark style="color:red;">\*</mark>              | 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.                                                                 |
| toInternalBalance<mark style="color:red;">\*</mark> | Boolean | `True` if you receiving tokens as internal token balances. `False` if receiving as ERC20.   |
| to<mark style="color:red;">\*</mark>                | String  | Address of the recipient of the token.                                                      |
| gasPriority                                         | String  | low, medium, or high.                                                                       |
| slippage                                            | String  | <p>Percentage of total swap value. <br>By default, 1.</p><p>0 <= slippage  value <= 100</p> |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "dexId": "1400",
    "path": ["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0x6B175474E89094C44Da98b954EedeAC495271d0F"],
    "amountOut": ["0","100000000"],
    "amountIn": "2427326557218525461",
    "toInternalBalance": false,
    "gas": "2307200",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
        "value": "0",
        "gas": "2307200",
        "data": "0x8bdb39130b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a00000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000021af98a4ace1d11500000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000005f5e1000000000000000000000000000000000000000000000000000000000000000000",
        "referenceId": "685902196c9d46c2a68ed13b8b0a8ffd"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}
**With gasPriority (medium):**

```json
{
    "dexId": "1400",
    "path": [
        "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "amountOut": [
        "0",
        "100000000"
    ],
    "amountIn": "2427326557218525461",
    "toInternalBalance": false,
    "gas": "2307200",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gasPriority": "medium"
}
```

{% endtab %}

{% tab title="Sample Response" %}
**With gasPriority:**

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
        "value": "0",
        "gas": "2307200",
        "data": "0x8bdb39130b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a00000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000021af98a4ace1d11500000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000005f5e1000000000000000000000000000000000000000000000000000000000000000000",
        "gasPrice": "2555097500",
        "referenceId": "c05267e2aae746e8bdec057255e2d3f9"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}
**With Slippage:**

```json
{
    "dexId": "1400",
    "path": [
        "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "amountOut": [
        "100",
        "100000000"
    ],
    "amountIn": "2427326557218525461",
    "toInternalBalance": false,
    "gas": "2307200",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "slippage": "6.01"
}
```

{% endtab %}

{% tab title="Sample Response" %}
**With Slippage:**

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
        "value": "0",
        "gas": "2307200",
        "data": "0x8bdb39130b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a00000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000021af98a4ace1d11500000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000005f5e1000000000000000000000000000000000000000000000000000000000000000064",
        "referenceId": "c1037b0907484e62906881ff65da2fcf"
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.expand.network/integrations/dex-and-dex-aggregators/balancer-v2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
